正在显示
3 个修改的文件
包含
752 行增加
和
0 行删除
@@ -9,3 +9,9 @@ export const selectVehicle = params => { return axios.get(`${baseServiceURL}/map | @@ -9,3 +9,9 @@ export const selectVehicle = params => { return axios.get(`${baseServiceURL}/map | ||
9 | 9 | ||
10 | //车辆轨迹 | 10 | //车辆轨迹 |
11 | export const historyTrack = params => { return axios.get(`${baseServiceURL}/map/location/historyTrack`, { params: params }); }; | 11 | export const historyTrack = params => { return axios.get(`${baseServiceURL}/map/location/historyTrack`, { params: params }); }; |
12 | + | ||
13 | +//出勤历史 | ||
14 | +export const selectHistroy = params => { return axios.get(`${baseServiceURL}/map/location/selectHistroy`, { params: params }); }; | ||
15 | + | ||
16 | +//出勤车辆 | ||
17 | +export const selectList = params => { return axios.get(`${baseServiceURL}/map/location/selectList`, { params: params }); }; |
src/views/deploy/attendance.vue
0 → 100644
1 | +<template> | ||
2 | + <el-row> | ||
3 | + <el-card style="background-color: #F5F7FA"> | ||
4 | + <!-- 搜索区域--> | ||
5 | + <el-row class="toolbar"> | ||
6 | + <el-form :model="queryInfo" :rules="rules" ref="ruleForm"> | ||
7 | + <el-col :span="6"> | ||
8 | + <el-form-item label="" prop="lisenceNo"> | ||
9 | + <el-input v-model="queryInfo.lisenceNo" size="small" style="width: 170px" | ||
10 | + placeholder="车牌号" clearable required> | ||
11 | + <template slot="prepend">车牌号</template> | ||
12 | + </el-input> | ||
13 | + </el-form-item> | ||
14 | + </el-col> | ||
15 | + <el-col :span="2"> | ||
16 | + <el-button type="primary" icon="el-icon-search" size="small" @click="getList()"> | ||
17 | + 查询 | ||
18 | + </el-button> | ||
19 | +<!-- <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>--> | ||
20 | + </el-col> | ||
21 | + </el-form> | ||
22 | + </el-row> | ||
23 | + <!-- 列表区域--> | ||
24 | + <el-row> | ||
25 | + <template> | ||
26 | + <el-table | ||
27 | + :data="tableData" | ||
28 | + border | ||
29 | + :cell-style="{textAlign:'center'}" | ||
30 | + style="border-radius: 10px 10px 0px 0px;line-height: 25px" | ||
31 | + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" | ||
32 | + > | ||
33 | + <el-table-column | ||
34 | + fixed | ||
35 | + prop="lisenceNo" | ||
36 | + label="车牌号" | ||
37 | + width="120"> | ||
38 | + </el-table-column> | ||
39 | + <el-table-column | ||
40 | + prop="username" | ||
41 | + label="用户名" | ||
42 | + width="120"> | ||
43 | + </el-table-column> | ||
44 | + <el-table-column | ||
45 | + prop="starttime" | ||
46 | + label="开始时间" | ||
47 | + width="120"> | ||
48 | + </el-table-column> | ||
49 | + <el-table-column | ||
50 | + prop="endtime" | ||
51 | + label="结束时间" | ||
52 | + width="120"> | ||
53 | + </el-table-column> | ||
54 | +<!-- <el-table-column--> | ||
55 | +<!-- prop="orderState"--> | ||
56 | +<!-- label="支付状态"--> | ||
57 | +<!-- width="120">--> | ||
58 | +<!-- <template slot-scope="scope">--> | ||
59 | +<!-- <span v-if="scope.row.orderState ==='000'">未支付</span>--> | ||
60 | +<!-- <span v-if="scope.row.orderState ==='001'">已支付</span>--> | ||
61 | +<!-- <span v-if="scope.row.orderState ==='111'">作废</span>--> | ||
62 | +<!-- </template>--> | ||
63 | +<!-- </el-table-column>--> | ||
64 | +<!-- <el-table-column--> | ||
65 | +<!-- prop="orderOperatorId"--> | ||
66 | +<!-- label="经办人"--> | ||
67 | +<!-- width="120">--> | ||
68 | +<!-- </el-table-column>--> | ||
69 | +<!-- <el-table-column--> | ||
70 | +<!-- prop="orderTotalAmount"--> | ||
71 | +<!-- label="订单总额度"--> | ||
72 | +<!-- width="120">--> | ||
73 | +<!-- </el-table-column>--> | ||
74 | +<!-- <el-table-column--> | ||
75 | +<!-- prop="orderCreatTime"--> | ||
76 | +<!-- label="订单创建时间"--> | ||
77 | +<!-- width="150">--> | ||
78 | +<!-- </el-table-column>--> | ||
79 | +<!-- <el-table-column--> | ||
80 | +<!-- prop="orderUpdateTime"--> | ||
81 | +<!-- label="订单修改时间"--> | ||
82 | +<!-- width="150">--> | ||
83 | +<!-- </el-table-column>--> | ||
84 | +<!-- <el-table-column--> | ||
85 | +<!-- prop="orderRemark"--> | ||
86 | +<!-- label="备注">--> | ||
87 | +<!-- </el-table-column>--> | ||
88 | +<!-- <el-table-column--> | ||
89 | +<!-- fixed="right"--> | ||
90 | +<!-- label="操作"--> | ||
91 | +<!-- width="160">--> | ||
92 | +<!-- <template slot-scope="scope">--> | ||
93 | +<!-- <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>--> | ||
94 | +<!-- <el-button type="danger" size="mini" @click="applyDel(scope.row)">删除</el-button>--> | ||
95 | +<!-- </template>--> | ||
96 | +<!-- </el-table-column>--> | ||
97 | + </el-table> | ||
98 | + </template> | ||
99 | + </el-row> | ||
100 | + <el-row style="margin-top: 10px" class="toolbar"> | ||
101 | + <el-pagination | ||
102 | + @size-change="handleSizeChange" | ||
103 | + @current-change="handleCurrentChange" | ||
104 | + :current-page="queryInfo.pageSize" | ||
105 | + :page-size="queryInfo.pageNum" | ||
106 | + :page-sizes="[10, 50, 100, 500]" | ||
107 | + layout="total, sizes, prev, pager, next, jumper" | ||
108 | + :total="total"> | ||
109 | + </el-pagination> | ||
110 | + </el-row> | ||
111 | + <el-row> | ||
112 | + <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog" width="70%" > | ||
113 | + <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px"> | ||
114 | + <el-row> | ||
115 | + <el-col :span="11"> | ||
116 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderAuthorName"> | ||
117 | + <el-input v-model="addForm.orderAuthorName" autocomplete="off" size="small" style="width: 350px"> | ||
118 | + <template slot="prepend">结算人名称</template> | ||
119 | + </el-input> | ||
120 | + </el-form-item> | ||
121 | + </el-col> | ||
122 | + <el-col :span="12"> | ||
123 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderAuthorid"> | ||
124 | + <el-input v-model="addForm.orderAuthorid" autocomplete="off" size="small" style="width: 350px"> | ||
125 | + <template slot="prepend">结算人ID</template> | ||
126 | + </el-input> | ||
127 | + </el-form-item> | ||
128 | + </el-col> | ||
129 | + </el-row> | ||
130 | + <el-row> | ||
131 | + <el-col :span="11"> | ||
132 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderOperatorId"> | ||
133 | + <el-input v-model="addForm.orderOperatorId" autocomplete="off" size="small" style="width: 350px"> | ||
134 | + <template slot="prepend">经办人</template> | ||
135 | + </el-input> | ||
136 | + </el-form-item> | ||
137 | + </el-col> | ||
138 | + <el-col :span="12"> | ||
139 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderTotalAmount"> | ||
140 | + <el-input v-model="addForm.orderTotalAmount" autocomplete="off" size="small" style="width: 350px"> | ||
141 | + <template slot="prepend">订单总额度</template> | ||
142 | + </el-input> | ||
143 | + </el-form-item> | ||
144 | + </el-col> | ||
145 | + </el-row> | ||
146 | + <el-row> | ||
147 | + <el-col :span="11"> | ||
148 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderType"> | ||
149 | + <div class="my-text-area"> | ||
150 | + <div class="el-input-group__prepend prepand">支付方式</div> | ||
151 | + <el-select v-model="addForm.orderType" placeholder="请选择生效状态" size="small" style="width: 260px"> | ||
152 | + <el-option label="现金" value="现金"></el-option> | ||
153 | + <el-option label="微信" value="微信"></el-option> | ||
154 | + <el-option label="支付宝" value="支付宝"></el-option> | ||
155 | + <el-option label="银行转账" value="银行转账"></el-option> | ||
156 | + </el-select> | ||
157 | + </div> | ||
158 | + </el-form-item> | ||
159 | + </el-col> | ||
160 | + <el-col :span="12"> | ||
161 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderState"> | ||
162 | + <div class="my-text-area"> | ||
163 | + <div class="el-input-group__prepend prepand">支付状态</div> | ||
164 | + <el-select v-model="addForm.orderState" placeholder="请选择生效状态" size="small" style="width: 260px"> | ||
165 | + <el-option label="未支付" value="000"></el-option> | ||
166 | + <el-option label="已支付" value="001"></el-option> | ||
167 | + <el-option label="作废" value="111"></el-option> | ||
168 | + </el-select> | ||
169 | + </div> | ||
170 | + </el-form-item> | ||
171 | + </el-col> | ||
172 | + </el-row> | ||
173 | + <el-row> | ||
174 | + <el-col :span="11"> | ||
175 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderRemark"> | ||
176 | + <el-input v-model="addForm.orderRemark" autocomplete="off" size="small" style="width: 350px"> | ||
177 | + <template slot="prepend">备注</template> | ||
178 | + </el-input> | ||
179 | + </el-form-item> | ||
180 | + </el-col> | ||
181 | + </el-row> | ||
182 | + </el-form> | ||
183 | + <div slot="footer" class="dialog-footer"> | ||
184 | + <el-button @click="apply_dialog = false" size="small">取 消</el-button> | ||
185 | + <el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button> | ||
186 | + </div> | ||
187 | + </el-dialog> | ||
188 | + </el-row> | ||
189 | + </el-card> | ||
190 | + </el-row> | ||
191 | +</template> | ||
192 | + | ||
193 | +<script> | ||
194 | + import {selectHistroy} from '../../api/consigner/vehicle'; | ||
195 | + | ||
196 | + export default { | ||
197 | + name: "attendance", | ||
198 | + data() { | ||
199 | + return { | ||
200 | + queryInfo: { | ||
201 | + lisenceNo:'', | ||
202 | + // busnessType:'', | ||
203 | + // state:'', | ||
204 | + // 当前页数 | ||
205 | + pageNum: 1, | ||
206 | + // 每页几条数据 | ||
207 | + pageSize: 10, | ||
208 | + }, | ||
209 | + total: 0, | ||
210 | + tableData:[], | ||
211 | + dialogMap: { | ||
212 | + update: '编辑', | ||
213 | + create: '新增' | ||
214 | + }, | ||
215 | + dis: undefined, | ||
216 | + dialogApply: 'create', | ||
217 | + apply_dialog: false, | ||
218 | + addForm: { | ||
219 | + orderAuthorName: '', | ||
220 | + orderAuthorid: '', | ||
221 | + orderCreatTime: '', | ||
222 | + orderOperatorId: '', | ||
223 | + orderRemark: '', | ||
224 | + orderState: '', | ||
225 | + orderTotalAmount:'', | ||
226 | + orderUpdateTime:'', | ||
227 | + orderType:'' | ||
228 | + }, | ||
229 | + formLabelWidth: '120px', | ||
230 | + rules: { | ||
231 | + companyId: [ | ||
232 | + { required: true, message: '必填', trigger: 'change' } | ||
233 | + ], | ||
234 | + // needCount: [ | ||
235 | + // { required: true, message: '请输入需要车辆数量', trigger: 'blur' }, | ||
236 | + // ], | ||
237 | + // orginStation: [ | ||
238 | + // { required: true, message: '请输入起始场站', trigger: 'blur' }, | ||
239 | + // ], | ||
240 | + // endStation: [ | ||
241 | + // { required: true, message: '请输入目的场站', trigger: 'blur' }, | ||
242 | + // ], | ||
243 | + }, | ||
244 | + } | ||
245 | + }, | ||
246 | + methods: { | ||
247 | + handleSizeChange(val) { | ||
248 | + this.queryInfo.pageSize = val | ||
249 | + this.getList() | ||
250 | + }, | ||
251 | + handleCurrentChange(val) { | ||
252 | + this.queryInfo.pageNum = val | ||
253 | + this.getList() | ||
254 | + }, | ||
255 | + getList() { | ||
256 | + const _this = this | ||
257 | + selectHistroy(this.queryInfo).then((response) => { | ||
258 | + const res = response.data | ||
259 | + console.log(response.data) | ||
260 | + if (res.code !== '200') { | ||
261 | + return _this.$message.error('获取消息收发记录,失败!') | ||
262 | + } | ||
263 | + // 获取列表数据 | ||
264 | + _this.tableData = res.data | ||
265 | + // 获取列表的总记录数 | ||
266 | + _this.total = res.data.total | ||
267 | + _this.$message.success('获取消息收发记录,成功!') | ||
268 | + }).catch(error => { | ||
269 | + // 关闭加载 | ||
270 | + _this.$message.error(error.toString()) | ||
271 | + }) | ||
272 | + }, | ||
273 | + // 添加对话框,打开事件 | ||
274 | + applyAdd() { | ||
275 | + this.addForm = { | ||
276 | + orderAuthorName: '', | ||
277 | + orderAuthorid: '', | ||
278 | + orderCreatTime: '', | ||
279 | + orderOperatorId: '', | ||
280 | + orderRemark: '', | ||
281 | + orderState: '', | ||
282 | + orderTotalAmount:'', | ||
283 | + orderUpdateTime:'', | ||
284 | + orderType:'' | ||
285 | + }; | ||
286 | + this.dialogApply= 'create'; | ||
287 | + this.dis= 'create'; | ||
288 | + this.apply_dialog = true; | ||
289 | + }, | ||
290 | + // 添加功能 | ||
291 | + add() { | ||
292 | + this.$refs.addForm.validate(valid => { | ||
293 | + // 未通过,表单预校验 | ||
294 | + if (!valid) return; | ||
295 | + save(this.addForm).then((response) => { | ||
296 | + let res = response.data; | ||
297 | + // 添加失败 | ||
298 | + if (res.code !== '200') { | ||
299 | + return this.$message.error(res.msg); | ||
300 | + } | ||
301 | + // 添加,成功 | ||
302 | + this.$message.success(res.msg); | ||
303 | + // 隐藏对话框 | ||
304 | + this.apply_dialog = false; | ||
305 | + // 刷新列表 | ||
306 | + this.getList(); | ||
307 | + }).catch(error => { | ||
308 | + this.$message.error(error.toString()); | ||
309 | + }); | ||
310 | + }) | ||
311 | + }, | ||
312 | +// 打开编辑 | ||
313 | + applyEdit(row) { | ||
314 | + this.apply_dialog = true; | ||
315 | + this.dialogApply = 'update'; | ||
316 | + this.dis= 'update'; | ||
317 | + this.addForm=row; | ||
318 | + }, | ||
319 | + // 编辑功能 | ||
320 | + edit() { | ||
321 | + // 进行表单的预验证 | ||
322 | + this.$refs.addForm.validate(valid => { | ||
323 | + // 未通过,表单预校验 | ||
324 | + if (!valid) return | ||
325 | + edit(this.addForm).then((response) => { | ||
326 | + // console.log(row) | ||
327 | + const res = response.data | ||
328 | + if (res.code != '200') { | ||
329 | + return this.$message.error(res.msg) | ||
330 | + } | ||
331 | + this.$message.success(res.msg) | ||
332 | + // 隐藏对话框 | ||
333 | + this.apply_dialog = false | ||
334 | + // 刷新列表 | ||
335 | + this.getList() | ||
336 | + }).catch(error => { | ||
337 | + this.$message.error(error.toString()) | ||
338 | + }) | ||
339 | + }) | ||
340 | + }, | ||
341 | + // 删除 | ||
342 | + applyDel(row) { | ||
343 | + // 弹框询问是否删除? | ||
344 | + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { | ||
345 | + confirmButtonText: '确定删除', | ||
346 | + cancelButtonText: '取消', | ||
347 | + type: 'warning' | ||
348 | + } | ||
349 | + ).then(() => { | ||
350 | + // console.log(row); | ||
351 | + remove(row).then((response) => { | ||
352 | + // console.log(row) | ||
353 | + const res = response.data | ||
354 | + this.$message.success(res.msg) | ||
355 | + this.getList() | ||
356 | + }).catch(error => { | ||
357 | + this.$message.error(error) | ||
358 | + }) | ||
359 | + }).catch(() => { | ||
360 | + }) | ||
361 | + }, | ||
362 | + }, | ||
363 | + mounted() { | ||
364 | + this.getList(); | ||
365 | + // this.getYardList(); | ||
366 | + | ||
367 | + } | ||
368 | + | ||
369 | + } | ||
370 | +</script> | ||
371 | + | ||
372 | +<style scoped> | ||
373 | + .toolbar{ | ||
374 | + height: 60px; | ||
375 | + background-color: white; | ||
376 | + /*line-height: 60px;*/ | ||
377 | + vertical-align: middle; | ||
378 | + border-radius: 5px 5px 5px 5px; | ||
379 | + padding: 15px 0 0 20px; | ||
380 | + box-shadow: 0px 5px 5px #e5e8eb; | ||
381 | + } | ||
382 | + .my-text-area .prepand{ | ||
383 | + float: left; | ||
384 | + width:89px; | ||
385 | + height: 28px; | ||
386 | + font-size: 12px; | ||
387 | + line-height: 28px; | ||
388 | + } | ||
389 | +</style> | ||
390 | +<style> | ||
391 | + .my-text-area .el-textarea__inner{ | ||
392 | + min-height: 28px; | ||
393 | + height: 28px; | ||
394 | + border-bottom-left-radius: 0; | ||
395 | + border-top-left-radius: 0; | ||
396 | + } | ||
397 | +</style> |
src/views/deploy/conveyance.vue
0 → 100644
1 | +<template> | ||
2 | + <el-row> | ||
3 | + <el-card style="background-color: #F5F7FA"> | ||
4 | + <!-- 搜索区域--> | ||
5 | + <el-row class="toolbar"> | ||
6 | + <el-form :model="queryInfo" :rules="rules" ref="ruleForm"> | ||
7 | + <el-col :span="6"> | ||
8 | + <el-form-item label="" prop="lisenceNo"> | ||
9 | + <el-input v-model="queryInfo.lisenceNo" size="small" style="width: 170px" | ||
10 | + placeholder="车牌号" clearable required> | ||
11 | + <template slot="prepend">车牌号</template> | ||
12 | + </el-input> | ||
13 | + </el-form-item> | ||
14 | + </el-col> | ||
15 | + <el-col :span="2"> | ||
16 | + <el-button type="primary" icon="el-icon-search" size="small" @click="getList()"> | ||
17 | + 查询 | ||
18 | + </el-button> | ||
19 | + <!-- <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>--> | ||
20 | + </el-col> | ||
21 | + </el-form> | ||
22 | + </el-row> | ||
23 | + <!-- 列表区域--> | ||
24 | + <el-row> | ||
25 | + <template> | ||
26 | + <el-table | ||
27 | + :data="tableData" | ||
28 | + border | ||
29 | + :cell-style="{textAlign:'center'}" | ||
30 | + style="border-radius: 10px 10px 0px 0px;line-height: 25px" | ||
31 | + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small" | ||
32 | + > | ||
33 | + <el-table-column | ||
34 | + fixed | ||
35 | + prop="lisenceNo" | ||
36 | + label="车牌号" | ||
37 | + width="120"> | ||
38 | + </el-table-column> | ||
39 | + <el-table-column | ||
40 | + prop="username" | ||
41 | + label="用户名" | ||
42 | + width="120"> | ||
43 | + </el-table-column> | ||
44 | + <el-table-column | ||
45 | + prop="starttime" | ||
46 | + label="开始时间" | ||
47 | + width="120"> | ||
48 | + </el-table-column> | ||
49 | + <!-- <el-table-column--> | ||
50 | + <!-- fixed="right"--> | ||
51 | + <!-- label="操作"--> | ||
52 | + <!-- width="160">--> | ||
53 | + <!-- <template slot-scope="scope">--> | ||
54 | + <!-- <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>--> | ||
55 | + <!-- <el-button type="danger" size="mini" @click="applyDel(scope.row)">删除</el-button>--> | ||
56 | + <!-- </template>--> | ||
57 | + <!-- </el-table-column>--> | ||
58 | + </el-table> | ||
59 | + </template> | ||
60 | + </el-row> | ||
61 | + <el-row style="margin-top: 10px" class="toolbar"> | ||
62 | + <el-pagination | ||
63 | + @size-change="handleSizeChange" | ||
64 | + @current-change="handleCurrentChange" | ||
65 | + :current-page="queryInfo.pageSize" | ||
66 | + :page-size="queryInfo.pageNum" | ||
67 | + :page-sizes="[10, 50, 100, 500]" | ||
68 | + layout="total, sizes, prev, pager, next, jumper" | ||
69 | + :total="total"> | ||
70 | + </el-pagination> | ||
71 | + </el-row> | ||
72 | + <el-row> | ||
73 | + <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog" width="70%" > | ||
74 | + <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px"> | ||
75 | + <el-row> | ||
76 | + <el-col :span="11"> | ||
77 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderAuthorName"> | ||
78 | + <el-input v-model="addForm.orderAuthorName" autocomplete="off" size="small" style="width: 350px"> | ||
79 | + <template slot="prepend">结算人名称</template> | ||
80 | + </el-input> | ||
81 | + </el-form-item> | ||
82 | + </el-col> | ||
83 | + <el-col :span="12"> | ||
84 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderAuthorid"> | ||
85 | + <el-input v-model="addForm.orderAuthorid" autocomplete="off" size="small" style="width: 350px"> | ||
86 | + <template slot="prepend">结算人ID</template> | ||
87 | + </el-input> | ||
88 | + </el-form-item> | ||
89 | + </el-col> | ||
90 | + </el-row> | ||
91 | + <el-row> | ||
92 | + <el-col :span="11"> | ||
93 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderOperatorId"> | ||
94 | + <el-input v-model="addForm.orderOperatorId" autocomplete="off" size="small" style="width: 350px"> | ||
95 | + <template slot="prepend">经办人</template> | ||
96 | + </el-input> | ||
97 | + </el-form-item> | ||
98 | + </el-col> | ||
99 | + <el-col :span="12"> | ||
100 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderTotalAmount"> | ||
101 | + <el-input v-model="addForm.orderTotalAmount" autocomplete="off" size="small" style="width: 350px"> | ||
102 | + <template slot="prepend">订单总额度</template> | ||
103 | + </el-input> | ||
104 | + </el-form-item> | ||
105 | + </el-col> | ||
106 | + </el-row> | ||
107 | + <el-row> | ||
108 | + <el-col :span="11"> | ||
109 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderType"> | ||
110 | + <div class="my-text-area"> | ||
111 | + <div class="el-input-group__prepend prepand">支付方式</div> | ||
112 | + <el-select v-model="addForm.orderType" placeholder="请选择生效状态" size="small" style="width: 260px"> | ||
113 | + <el-option label="现金" value="现金"></el-option> | ||
114 | + <el-option label="微信" value="微信"></el-option> | ||
115 | + <el-option label="支付宝" value="支付宝"></el-option> | ||
116 | + <el-option label="银行转账" value="银行转账"></el-option> | ||
117 | + </el-select> | ||
118 | + </div> | ||
119 | + </el-form-item> | ||
120 | + </el-col> | ||
121 | + <el-col :span="12"> | ||
122 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderState"> | ||
123 | + <div class="my-text-area"> | ||
124 | + <div class="el-input-group__prepend prepand">支付状态</div> | ||
125 | + <el-select v-model="addForm.orderState" placeholder="请选择生效状态" size="small" style="width: 260px"> | ||
126 | + <el-option label="未支付" value="000"></el-option> | ||
127 | + <el-option label="已支付" value="001"></el-option> | ||
128 | + <el-option label="作废" value="111"></el-option> | ||
129 | + </el-select> | ||
130 | + </div> | ||
131 | + </el-form-item> | ||
132 | + </el-col> | ||
133 | + </el-row> | ||
134 | + <el-row> | ||
135 | + <el-col :span="11"> | ||
136 | + <el-form-item label=" " :label-width="formLabelWidth" prop="orderRemark"> | ||
137 | + <el-input v-model="addForm.orderRemark" autocomplete="off" size="small" style="width: 350px"> | ||
138 | + <template slot="prepend">备注</template> | ||
139 | + </el-input> | ||
140 | + </el-form-item> | ||
141 | + </el-col> | ||
142 | + </el-row> | ||
143 | + </el-form> | ||
144 | + <div slot="footer" class="dialog-footer"> | ||
145 | + <el-button @click="apply_dialog = false" size="small">取 消</el-button> | ||
146 | + <el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button> | ||
147 | + </div> | ||
148 | + </el-dialog> | ||
149 | + </el-row> | ||
150 | + </el-card> | ||
151 | + </el-row> | ||
152 | +</template> | ||
153 | + | ||
154 | +<script> | ||
155 | + import {selectList} from '../../api/consigner/vehicle'; | ||
156 | + | ||
157 | + export default { | ||
158 | + name: "conveyance", | ||
159 | + data() { | ||
160 | + return { | ||
161 | + queryInfo: { | ||
162 | + lisenceNo:'', | ||
163 | + // busnessType:'', | ||
164 | + // state:'', | ||
165 | + // 当前页数 | ||
166 | + pageNum: 1, | ||
167 | + // 每页几条数据 | ||
168 | + pageSize: 10, | ||
169 | + }, | ||
170 | + total: 0, | ||
171 | + tableData:[], | ||
172 | + dialogMap: { | ||
173 | + update: '编辑', | ||
174 | + create: '新增' | ||
175 | + }, | ||
176 | + dis: undefined, | ||
177 | + dialogApply: 'create', | ||
178 | + apply_dialog: false, | ||
179 | + addForm: { | ||
180 | + orderAuthorName: '', | ||
181 | + orderAuthorid: '', | ||
182 | + orderCreatTime: '', | ||
183 | + orderOperatorId: '', | ||
184 | + orderRemark: '', | ||
185 | + orderState: '', | ||
186 | + orderTotalAmount:'', | ||
187 | + orderUpdateTime:'', | ||
188 | + orderType:'' | ||
189 | + }, | ||
190 | + formLabelWidth: '120px', | ||
191 | + rules: { | ||
192 | + companyId: [ | ||
193 | + // { required: true, message: '必填', trigger: 'change' } | ||
194 | + ], | ||
195 | + }, | ||
196 | + } | ||
197 | + }, | ||
198 | + methods: { | ||
199 | + handleSizeChange(val) { | ||
200 | + this.queryInfo.pageSize = val | ||
201 | + this.getList() | ||
202 | + }, | ||
203 | + handleCurrentChange(val) { | ||
204 | + this.queryInfo.pageNum = val | ||
205 | + this.getList() | ||
206 | + }, | ||
207 | + getList() { | ||
208 | + const _this = this | ||
209 | + selectList(this.queryInfo).then((response) => { | ||
210 | + const res = response.data | ||
211 | + console.log(response.data) | ||
212 | + if (res.code !== '200') { | ||
213 | + return _this.$message.error('获取消息收发记录,失败!') | ||
214 | + } | ||
215 | + // 获取列表数据 | ||
216 | + _this.tableData = res.data | ||
217 | + // 获取列表的总记录数 | ||
218 | + _this.total = res.data.total | ||
219 | + _this.$message.success('获取消息收发记录,成功!') | ||
220 | + }).catch(error => { | ||
221 | + // 关闭加载 | ||
222 | + _this.$message.error(error.toString()) | ||
223 | + }) | ||
224 | + }, | ||
225 | + // 添加对话框,打开事件 | ||
226 | + applyAdd() { | ||
227 | + this.addForm = { | ||
228 | + orderAuthorName: '', | ||
229 | + orderAuthorid: '', | ||
230 | + orderCreatTime: '', | ||
231 | + orderOperatorId: '', | ||
232 | + orderRemark: '', | ||
233 | + orderState: '', | ||
234 | + orderTotalAmount:'', | ||
235 | + orderUpdateTime:'', | ||
236 | + orderType:'' | ||
237 | + }; | ||
238 | + this.dialogApply= 'create'; | ||
239 | + this.dis= 'create'; | ||
240 | + this.apply_dialog = true; | ||
241 | + }, | ||
242 | + // 添加功能 | ||
243 | + add() { | ||
244 | + this.$refs.addForm.validate(valid => { | ||
245 | + // 未通过,表单预校验 | ||
246 | + if (!valid) return; | ||
247 | + save(this.addForm).then((response) => { | ||
248 | + let res = response.data; | ||
249 | + // 添加失败 | ||
250 | + if (res.code !== '200') { | ||
251 | + return this.$message.error(res.msg); | ||
252 | + } | ||
253 | + // 添加,成功 | ||
254 | + this.$message.success(res.msg); | ||
255 | + // 隐藏对话框 | ||
256 | + this.apply_dialog = false; | ||
257 | + // 刷新列表 | ||
258 | + this.getList(); | ||
259 | + }).catch(error => { | ||
260 | + this.$message.error(error.toString()); | ||
261 | + }); | ||
262 | + }) | ||
263 | + }, | ||
264 | +// 打开编辑 | ||
265 | + applyEdit(row) { | ||
266 | + this.apply_dialog = true; | ||
267 | + this.dialogApply = 'update'; | ||
268 | + this.dis= 'update'; | ||
269 | + this.addForm=row; | ||
270 | + }, | ||
271 | + // 编辑功能 | ||
272 | + edit() { | ||
273 | + // 进行表单的预验证 | ||
274 | + this.$refs.addForm.validate(valid => { | ||
275 | + // 未通过,表单预校验 | ||
276 | + if (!valid) return | ||
277 | + edit(this.addForm).then((response) => { | ||
278 | + // console.log(row) | ||
279 | + const res = response.data | ||
280 | + if (res.code != '200') { | ||
281 | + return this.$message.error(res.msg) | ||
282 | + } | ||
283 | + this.$message.success(res.msg) | ||
284 | + // 隐藏对话框 | ||
285 | + this.apply_dialog = false | ||
286 | + // 刷新列表 | ||
287 | + this.getList() | ||
288 | + }).catch(error => { | ||
289 | + this.$message.error(error.toString()) | ||
290 | + }) | ||
291 | + }) | ||
292 | + }, | ||
293 | + // 删除 | ||
294 | + applyDel(row) { | ||
295 | + // 弹框询问是否删除? | ||
296 | + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { | ||
297 | + confirmButtonText: '确定删除', | ||
298 | + cancelButtonText: '取消', | ||
299 | + type: 'warning' | ||
300 | + } | ||
301 | + ).then(() => { | ||
302 | + // console.log(row); | ||
303 | + remove(row).then((response) => { | ||
304 | + // console.log(row) | ||
305 | + const res = response.data | ||
306 | + this.$message.success(res.msg) | ||
307 | + this.getList() | ||
308 | + }).catch(error => { | ||
309 | + this.$message.error(error) | ||
310 | + }) | ||
311 | + }).catch(() => { | ||
312 | + }) | ||
313 | + }, | ||
314 | + }, | ||
315 | + mounted() { | ||
316 | + this.getList(); | ||
317 | + // this.getYardList(); | ||
318 | + | ||
319 | + } | ||
320 | + | ||
321 | + } | ||
322 | +</script> | ||
323 | + | ||
324 | +<style scoped> | ||
325 | + .toolbar{ | ||
326 | + height: 60px; | ||
327 | + background-color: white; | ||
328 | + /*line-height: 60px;*/ | ||
329 | + vertical-align: middle; | ||
330 | + border-radius: 5px 5px 5px 5px; | ||
331 | + padding: 15px 0 0 20px; | ||
332 | + box-shadow: 0px 5px 5px #e5e8eb; | ||
333 | + } | ||
334 | + .my-text-area .prepand{ | ||
335 | + float: left; | ||
336 | + width:89px; | ||
337 | + height: 28px; | ||
338 | + font-size: 12px; | ||
339 | + line-height: 28px; | ||
340 | + } | ||
341 | +</style> | ||
342 | +<style> | ||
343 | + .my-text-area .el-textarea__inner{ | ||
344 | + min-height: 28px; | ||
345 | + height: 28px; | ||
346 | + border-bottom-left-radius: 0; | ||
347 | + border-top-left-radius: 0; | ||
348 | + } | ||
349 | +</style> |
-
请 注册 或 登录 后发表评论