合并分支 'master_dev' 到 'master'
Master dev 查看合并请求 !25
正在显示
6 个修改的文件
包含
1167 行增加
和
0 行删除
@@ -39,3 +39,26 @@ export const selectNameList = params => { return axios.get(`${baseServiceURL}/ma | @@ -39,3 +39,26 @@ export const selectNameList = params => { return axios.get(`${baseServiceURL}/ma | ||
39 | 39 | ||
40 | //多车定位 | 40 | //多车定位 |
41 | export const queryMulVel = params => { return axios.get(`${baseServiceURL}/map/location/queryMulVel`, { params: params }); }; | 41 | export const queryMulVel = params => { return axios.get(`${baseServiceURL}/map/location/queryMulVel`, { params: params }); }; |
42 | + | ||
43 | +//车载运单查询列表 | ||
44 | +export const selectNewInventroyrecords = params => { return axios.get(`${baseServiceURL}/wms/vehicleWaybill/selectNewInventroyrecords`, { params: params }); }; | ||
45 | +//车载运单新增 | ||
46 | +export const addVehicleWaybill = params => { return http.post(`${baseServiceURL}/wms/vehicleWaybill/addVehicleWaybill`, params); }; | ||
47 | +//车载运单删除 | ||
48 | +export const delVehicleWaybill = params => { return axios.get(`${baseServiceURL}/wms/vehicleWaybill/delVehicleWaybill`, { params: params }); }; | ||
49 | +//车载运单更新 | ||
50 | +export const ediVehicleWaybill = params => { return http.post(`${baseServiceURL}/wms/vehicleWaybill/ediVehicleWaybill`, params); }; | ||
51 | +//车辆派单 | ||
52 | +export const paidan = params => { return http.post(`${baseServiceURL}/wms/vehicleWaybill/paidan`, params); }; | ||
53 | +//查询车载派单记录列表 | ||
54 | +export const selectByDispatchList = params => { return axios.get(`${baseServiceURL}/wms/tracker/selectByDispatchList`, { params: params }); }; | ||
55 | +//手动新增车载派单记录 | ||
56 | +export const addTracker = params => { return http.post(`${baseServiceURL}/wms/tracker/addTracker`, params); }; | ||
57 | +//根据派单号查询运单列表 | ||
58 | +export const selectListByDispatch = params => { return axios.get(`${baseServiceURL}/wms/vehicleWaybill/selectListByDispatch`, { params: params }); }; | ||
59 | +//上传EXCEL | ||
60 | +export const UploadExcel = params => { return http.postExcelData(`${baseServiceURL}/wms/vehicleWaybill/upload`, params); }; | ||
61 | +//车载货物图片上传 | ||
62 | +export const uploadGoodsImage = params => { return http.postExcelData(`${baseServiceURL}/wms/vehicleWaybill/uploadGoodsImage`, params); }; | ||
63 | +//查询货物图片列表 | ||
64 | +export const selectPicsByDispatch = params => { return axios.get(`${baseServiceURL}/wms/vehicleWaybill/selectPicsByDispatch`, { params: params }); }; |
@@ -48,6 +48,16 @@ export default { | @@ -48,6 +48,16 @@ export default { | ||
48 | } | 48 | } |
49 | }) | 49 | }) |
50 | }, | 50 | }, |
51 | + postExcelData(url, data) { | ||
52 | + return axios({ | ||
53 | + method: 'POST', // 请求协议 | ||
54 | + url: url, // 请求的地址 | ||
55 | + data: data, // post 请求的数据 | ||
56 | + headers: { | ||
57 | + 'Content-Type': 'multipart/form-data' | ||
58 | + } | ||
59 | + }) | ||
60 | + }, | ||
51 | get(url, params) { | 61 | get(url, params) { |
52 | return axios({ | 62 | return axios({ |
53 | method: 'GET', | 63 | method: 'GET', |
src/api/minio-config.js
0 → 100644
@@ -112,6 +112,8 @@ import myTask from './views/technological/myTask.vue' | @@ -112,6 +112,8 @@ import myTask from './views/technological/myTask.vue' | ||
112 | import definition from './views/technological/definition.vue' | 112 | import definition from './views/technological/definition.vue' |
113 | 113 | ||
114 | //仓库场站管理 | 114 | //仓库场站管理 |
115 | +import Tracker from './views/deploy/Tracker.vue' | ||
116 | +import VehicleWaybill from './views/deploy/VehicleWaybill.vue' | ||
115 | import vehicle from './views/deploy/vehicle.vue' | 117 | import vehicle from './views/deploy/vehicle.vue' |
116 | import trajectory from './views/deploy/trajectory.vue' | 118 | import trajectory from './views/deploy/trajectory.vue' |
117 | import attendance from './views/deploy/attendance.vue' | 119 | import attendance from './views/deploy/attendance.vue' |
@@ -573,6 +575,8 @@ let routes = [ | @@ -573,6 +575,8 @@ let routes = [ | ||
573 | name: '仓库场站管理', | 575 | name: '仓库场站管理', |
574 | iconCls:'el-icon-goods', | 576 | iconCls:'el-icon-goods', |
575 | children:[ | 577 | children:[ |
578 | + {path:'/Tracker',component:Tracker,name:'派单记录'}, | ||
579 | + {path:'/VehicleWaybill',component:VehicleWaybill,name:'车载运单'}, | ||
576 | {path:'/vehicle',component:vehicle,name:'车辆定位'}, | 580 | {path:'/vehicle',component:vehicle,name:'车辆定位'}, |
577 | {path:'/trajectory',component:trajectory,name:'车辆轨迹'}, | 581 | {path:'/trajectory',component:trajectory,name:'车辆轨迹'}, |
578 | {path:'/attendance',component:attendance,name:'出勤历史'}, | 582 | {path:'/attendance',component:attendance,name:'出勤历史'}, |
src/views/deploy/Tracker.vue
0 → 100644
1 | +<template> | ||
2 | + <div> | ||
3 | + <div> | ||
4 | + <el-descriptions class="margin-top" title="车辆信息" :column="3" :size="size" border> | ||
5 | + <el-descriptions-item> | ||
6 | + <template slot="label"> | ||
7 | + <i class="el-icon-user"></i> | ||
8 | + 司机 | ||
9 | + </template> | ||
10 | + {{carinfo.veOwnerName}} | ||
11 | + </el-descriptions-item> | ||
12 | + <el-descriptions-item> | ||
13 | + <template slot="label"> | ||
14 | + <i class="el-icon-mobile-phone"></i> | ||
15 | + 手机号 | ||
16 | + </template> | ||
17 | + {{carinfo.ownerInsideTel}} | ||
18 | + </el-descriptions-item> | ||
19 | + <el-descriptions-item> | ||
20 | + <template slot="label"> | ||
21 | + <i class="el-icon-truck"></i> | ||
22 | + 车号 | ||
23 | + </template> | ||
24 | + {{carinfo.domesticLisenceNo}} | ||
25 | + </el-descriptions-item> | ||
26 | + <el-descriptions-item> | ||
27 | + <template slot="label"> | ||
28 | + <i class="el-icon-tickets"></i> | ||
29 | + 驾驶证有效期 | ||
30 | + </template> | ||
31 | + <el-tag size="small">{{carinfo.veFactoryDate}}</el-tag> | ||
32 | + </el-descriptions-item> | ||
33 | + <el-descriptions-item> | ||
34 | + <template slot="label"> | ||
35 | + <i class="el-icon-shopping-cart-full"></i> | ||
36 | + 车自重 | ||
37 | + </template> | ||
38 | + {{carinfo.selfWt}} | ||
39 | + </el-descriptions-item> | ||
40 | + <el-descriptions-item> | ||
41 | + <template slot="label"> | ||
42 | + <i class="el-icon-office-building"></i> | ||
43 | + 地址 | ||
44 | + </template> | ||
45 | + {{carinfo.proposer}} | ||
46 | + </el-descriptions-item> | ||
47 | + </el-descriptions> | ||
48 | + </div> | ||
49 | + <div style="margin-top: 10px"> | ||
50 | + <el-descriptions class="margin-top" title="派单列表" :column="3" :size="size" border></el-descriptions> | ||
51 | + <el-table | ||
52 | + ref="multipleTable" | ||
53 | + :data="tableData" | ||
54 | + tooltip-effect="dark" | ||
55 | + style="width: 100%" | ||
56 | + > | ||
57 | + <el-table-column | ||
58 | + prop="dispatch" | ||
59 | + label="派单号" | ||
60 | + width="150"> | ||
61 | + </el-table-column> | ||
62 | + <el-table-column | ||
63 | + prop="awba" | ||
64 | + label="主单号" | ||
65 | + width="105"> | ||
66 | + </el-table-column> | ||
67 | + <el-table-column | ||
68 | + prop="awbh" | ||
69 | + label="分单号" | ||
70 | + width="140"> | ||
71 | + </el-table-column> | ||
72 | + <el-table-column | ||
73 | + prop="deststation" | ||
74 | + label="目的港" | ||
75 | + show-overflow-tooltip> | ||
76 | + </el-table-column> | ||
77 | + <el-table-column | ||
78 | + prop="pcs" | ||
79 | + label="件数" | ||
80 | + show-overflow-tooltip> | ||
81 | + </el-table-column> | ||
82 | + <el-table-column | ||
83 | + prop="weight" | ||
84 | + label="毛重" | ||
85 | + show-overflow-tooltip> | ||
86 | + </el-table-column> | ||
87 | + <el-table-column | ||
88 | + prop="vol" | ||
89 | + label="体积" | ||
90 | + show-overflow-tooltip> | ||
91 | + </el-table-column> | ||
92 | + <el-table-column | ||
93 | + prop="charge" | ||
94 | + label="应收" | ||
95 | + show-overflow-tooltip> | ||
96 | + </el-table-column> | ||
97 | + </el-table> | ||
98 | + </div> | ||
99 | + <div style="margin-top: 10px"> | ||
100 | + <el-descriptions class="margin-top" title="车辆跟踪" :column="3" :size="size" border> | ||
101 | + <template slot="extra"> | ||
102 | + <el-button type="primary" size="small" @click="addRecords">添加记录</el-button> | ||
103 | + </template> | ||
104 | + </el-descriptions> | ||
105 | + <div> | ||
106 | + <el-timeline :reverse="reverse"> | ||
107 | + <el-timeline-item | ||
108 | + v-for="(activity, index) in activities" | ||
109 | + :key="index" | ||
110 | + :timestamp="activity.opertime"> | ||
111 | + <span style="color: #5BB75B;font-weight: bold">状态:</span>{{activity.status}}--<span style="color: #5BB75B;font-weight: bold">跟踪信息:</span>{{activity.info}} | ||
112 | + </el-timeline-item> | ||
113 | + </el-timeline> | ||
114 | + </div> | ||
115 | + </div> | ||
116 | + <div> | ||
117 | + <el-dialog | ||
118 | + title="添加车辆跟进信息" | ||
119 | + :visible.sync="dialogVisible" | ||
120 | + width="30%" | ||
121 | + :before-close="handleClose"> | ||
122 | + <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> | ||
123 | + <el-form-item label="派单号" prop="dispatch"> | ||
124 | + <el-input v-model="ruleForm.dispatch" disabled></el-input> | ||
125 | + </el-form-item> | ||
126 | + <el-form-item label="跟进状态" prop="status"> | ||
127 | + <el-select v-model="ruleForm.status" placeholder="请选择状态" style="width: 100%"> | ||
128 | + <el-option label="待装" value="待装"></el-option> | ||
129 | + <el-option label="在途" value="在途"></el-option> | ||
130 | + <el-option label="已到未卸" value="已到未卸"></el-option> | ||
131 | + <el-option label="已完成" value="已完成"></el-option> | ||
132 | + </el-select> | ||
133 | + </el-form-item> | ||
134 | + <el-form-item label="跟进信息" prop="info"> | ||
135 | + <el-input v-model="ruleForm.info"></el-input> | ||
136 | + </el-form-item> | ||
137 | + <el-form-item> | ||
138 | + <el-button type="primary" @click="submitForm('ruleForm')">保存</el-button> | ||
139 | + <el-button @click="resetForm('ruleForm')">取消</el-button> | ||
140 | + </el-form-item> | ||
141 | + </el-form> | ||
142 | + </el-dialog> | ||
143 | + </div> | ||
144 | + <div> | ||
145 | + <el-descriptions class="margin-top" title="货物照片" :column="3" :size="size" border> | ||
146 | + <template slot="extra"> | ||
147 | + <el-upload | ||
148 | + class="upload-demo" | ||
149 | + action="" | ||
150 | + :http-request="uploadRequest" | ||
151 | + :on-change="handleChange" | ||
152 | + :on-success="handleSuccess" | ||
153 | + :on-error="handleError" | ||
154 | + :before-upload="beforeUpload" | ||
155 | + multiple | ||
156 | + accept="image/*" | ||
157 | + > | ||
158 | + <el-button size="small" type="success">上传照片</el-button> | ||
159 | + </el-upload> | ||
160 | + </template> | ||
161 | + </el-descriptions> | ||
162 | + <div> | ||
163 | + <el-image | ||
164 | + v-for="(url, index) in validUrls" | ||
165 | + :key="index" | ||
166 | + :src="url" | ||
167 | + style="width: 200px; height: 200px; margin: 10px;" | ||
168 | + :preview-src-list="validUrls" | ||
169 | + /> | ||
170 | + </div> | ||
171 | + </div> | ||
172 | + </div> | ||
173 | +</template> | ||
174 | +<script> | ||
175 | + import {list} from "../../api/road_verecord/verecord"; | ||
176 | + import { | ||
177 | + selectListByDispatch, | ||
178 | + selectByDispatchList, | ||
179 | + addTracker, | ||
180 | + uploadGoodsImage, | ||
181 | + selectPicsByDispatch | ||
182 | + } from "../../api/consigner/vehicle"; | ||
183 | + export default { | ||
184 | + data() { | ||
185 | + return{ | ||
186 | + ruleForm:{ | ||
187 | + dispatch: "", | ||
188 | + id: "", | ||
189 | + info: "", | ||
190 | + opertime: "", | ||
191 | + status: "" | ||
192 | + }, | ||
193 | + rules:{ | ||
194 | + status: [ | ||
195 | + { required: true, message: '请选择跟进状态', trigger: 'change' } | ||
196 | + ], | ||
197 | + }, | ||
198 | + reverse: false, | ||
199 | + activities: [], | ||
200 | + validUrls:[], | ||
201 | + routerinfo:{}, | ||
202 | + carinfo:{}, | ||
203 | + size: 'medium', | ||
204 | + tableData:[], | ||
205 | + dialogVisible: false | ||
206 | + } | ||
207 | + }, | ||
208 | + methods:{ | ||
209 | + getImgList(){ | ||
210 | + selectPicsByDispatch({dispatch:this.routerinfo.dispatch}).then((response) => { | ||
211 | + const res = response.data | ||
212 | + if (res.code !== '200') { | ||
213 | + return this.$message.error('获取消息收发记录,失败!') | ||
214 | + } | ||
215 | + if(res.data.urls && res.data.urls.trim() !== ''){ | ||
216 | + this.validUrls= res.data.urls | ||
217 | + .split(',') | ||
218 | + .filter(url => url.trim() !== ''); | ||
219 | + } | ||
220 | + }).catch(error => { | ||
221 | + // 关闭加载 | ||
222 | + this.$message.error(error.toString()) | ||
223 | + }) | ||
224 | + }, | ||
225 | + | ||
226 | + beforeUpload(file) { | ||
227 | + const isImage = file.type.startsWith('image/'); | ||
228 | + if (!isImage) { | ||
229 | + this.$message.error('只能上传图片文件!'); | ||
230 | + } | ||
231 | + return isImage; | ||
232 | + }, | ||
233 | + handleChange(file, fileList) { | ||
234 | + console.log(file, fileList); | ||
235 | + }, | ||
236 | + handleSuccess(response, file, fileList) { | ||
237 | + console.log('Upload successful:', response); | ||
238 | + }, | ||
239 | + handleError(err, file, fileList) { | ||
240 | + console.error('Upload failed:', err); | ||
241 | + }, | ||
242 | + uploadRequest({ file, onSuccess, onError }) { | ||
243 | + const formData = new FormData(); | ||
244 | + formData.append('file', file); | ||
245 | + formData.append('dispatch',this.routerinfo.dispatch); | ||
246 | + uploadGoodsImage(formData).then((response) => { | ||
247 | + const res = response.data | ||
248 | + if (res.code !== '200') { | ||
249 | + return this.$message.error(res.msg); | ||
250 | + } | ||
251 | + this.$message.success(res.msg); | ||
252 | + this.getImgList(); | ||
253 | + onSuccess(response.data); // 调用 onSuccess 回调通知上传成功 | ||
254 | + }).catch(error => { | ||
255 | + // 关闭加载 | ||
256 | + this.$message.error(error.toString()) | ||
257 | + onError(error); // 调用 onError 回调通知上传失败 | ||
258 | + }) | ||
259 | + }, | ||
260 | + //添加跟踪记录 | ||
261 | + addRecords(){ | ||
262 | + this.ruleForm.dispatch=this.routerinfo.dispatch; | ||
263 | + this.dialogVisible=true; | ||
264 | + }, | ||
265 | + submitForm(formName) { | ||
266 | + this.$refs[formName].validate((valid) => { | ||
267 | + if (valid) { | ||
268 | + addTracker(this.ruleForm).then((response) => { | ||
269 | + const res = response.data | ||
270 | + if (res.code !== '200') { | ||
271 | + return this.$message.error('跟进信息添加,失败!') | ||
272 | + } | ||
273 | + this.$message.success('跟进信息添加,成功!') | ||
274 | + this.dialogVisible = false; | ||
275 | + this.getRecords(); | ||
276 | + }).catch(error => { | ||
277 | + // 关闭加载 | ||
278 | + this.$message.warning('跟进信息添加,失败!') | ||
279 | + }) | ||
280 | + } else { | ||
281 | + console.log('error submit!!'); | ||
282 | + return false; | ||
283 | + } | ||
284 | + }); | ||
285 | + }, | ||
286 | + resetForm(formName) { | ||
287 | + this.dialogVisible = false; | ||
288 | + this.$refs[formName].resetFields(); | ||
289 | + }, | ||
290 | + //查询跟踪记录 | ||
291 | + getRecords(){ | ||
292 | + selectByDispatchList({dispatch:this.routerinfo.dispatch}).then((response) => { | ||
293 | + const res = response.data | ||
294 | + if (res.code !== '200') { | ||
295 | + return this.$message.error('获取消息收发记录,失败!') | ||
296 | + } | ||
297 | + // 获取列表数据 | ||
298 | + this.activities=res.data; | ||
299 | + }).catch(error => { | ||
300 | + // 关闭加载 | ||
301 | + this.$message.error(error.toString()) | ||
302 | + }) | ||
303 | + }, | ||
304 | + //查询派单列表 | ||
305 | + getLists() { | ||
306 | + selectListByDispatch({dispatch:this.routerinfo.dispatch}).then((response) => { | ||
307 | + const res = response.data | ||
308 | + if (res.code !== '200') { | ||
309 | + return this.$message.error('获取消息收发记录,失败!') | ||
310 | + } | ||
311 | + // 获取列表数据 | ||
312 | + this.tableData=res.data; | ||
313 | + }).catch(error => { | ||
314 | + // 关闭加载 | ||
315 | + this.$message.error(error.toString()) | ||
316 | + }) | ||
317 | + }, | ||
318 | + getDefault(){ | ||
319 | + if(this.$route.query!=null){ | ||
320 | + this.routerinfo=this.$route.query.jilu; | ||
321 | + } | ||
322 | + }, | ||
323 | + //查询车辆信息 | ||
324 | + getReCord() { | ||
325 | + let para = { | ||
326 | + pageSize: 1, | ||
327 | + limitSize: 10, | ||
328 | + trailerFrameNo: this.$route.query.jilu.licenseno, | ||
329 | + veState: '', | ||
330 | + veClassFlag: '', | ||
331 | + userId: '' | ||
332 | + }; | ||
333 | + list(para).then((res) => { | ||
334 | + if(res.data.data.list.length!==0){ | ||
335 | + this.carinfo = res.data.data.list[0]; | ||
336 | + }else{ | ||
337 | + this.$message.warning('无对应车辆信息!') | ||
338 | + } | ||
339 | + }).catch((error) => { | ||
340 | + this.$message.warning('车辆查询,失败!') | ||
341 | + }); | ||
342 | + }, | ||
343 | + getMess(){ | ||
344 | + if(this.routerinfo!=null && this.routerinfo.length!==0){ | ||
345 | + this.getReCord(); | ||
346 | + this.getLists(); | ||
347 | + } | ||
348 | + }, | ||
349 | + handleClose(done) { | ||
350 | + this.$confirm('确认关闭?') | ||
351 | + .then(_ => { | ||
352 | + done(); | ||
353 | + }) | ||
354 | + .catch(_ => {}); | ||
355 | + }, | ||
356 | + | ||
357 | + }, | ||
358 | + activated() { | ||
359 | + this.getDefault(); | ||
360 | + this.getMess(); | ||
361 | + this.getRecords(); | ||
362 | + this.getImgList(); | ||
363 | + } | ||
364 | + } | ||
365 | +</script> |
src/views/deploy/VehicleWaybill.vue
0 → 100644
1 | +<template> | ||
2 | + <div> | ||
3 | + <div> | ||
4 | + <el-form :inline="true" :model="formInline" class="demo-form-inline"> | ||
5 | + <el-form-item label="主单号"> | ||
6 | + <el-input v-model="formInline.awba" placeholder="主单号"></el-input> | ||
7 | + </el-form-item> | ||
8 | + <el-form-item label="车号"> | ||
9 | + <el-input v-model="formInline.licenseno" placeholder="车号"></el-input> | ||
10 | + </el-form-item> | ||
11 | + <el-form-item> | ||
12 | + <div class="block"> | ||
13 | + <span class="demonstration">日期</span> | ||
14 | + <el-date-picker | ||
15 | + v-model="value2" | ||
16 | + type="daterange" | ||
17 | + align="right" | ||
18 | + unlink-panels | ||
19 | + range-separator="至" | ||
20 | + start-placeholder="开始日期" | ||
21 | + end-placeholder="结束日期" | ||
22 | + value-format="yyyy-MM-dd HH:mm:ss" | ||
23 | + :picker-options="pickerOptions"> | ||
24 | + </el-date-picker> | ||
25 | + </div> | ||
26 | + </el-form-item> | ||
27 | + <el-form-item> | ||
28 | + <el-button type="primary" @click="getLists">查询</el-button> | ||
29 | + </el-form-item> | ||
30 | + <el-form-item> | ||
31 | + <el-button type="success" @click="addVehicle">新增</el-button> | ||
32 | + </el-form-item> | ||
33 | + <el-form-item> | ||
34 | + <el-button type="danger" @click="onPaidan">派单</el-button> | ||
35 | + </el-form-item> | ||
36 | + <el-form-item> | ||
37 | + <el-form-item> | ||
38 | + <el-upload | ||
39 | + class="upload-demo" | ||
40 | + action="" | ||
41 | + :before-upload="beforeUpload" | ||
42 | + :http-request="uploadFile" | ||
43 | + :show-file-list="false" | ||
44 | + > | ||
45 | + <el-button size="small" type="primary">导入运单</el-button> | ||
46 | + </el-upload> | ||
47 | + </el-form-item> | ||
48 | + | ||
49 | + <el-button type="success" @click="exportToExcel">导出 Excel</el-button> | ||
50 | + </el-form-item> | ||
51 | + </el-form> | ||
52 | + </div> | ||
53 | + <div> | ||
54 | + <el-table | ||
55 | + ref="multipleTable" | ||
56 | + :data="tableData" | ||
57 | + tooltip-effect="dark" | ||
58 | + style="width: 100%" | ||
59 | + @selection-change="handleSelectionChange"> | ||
60 | + <el-table-column | ||
61 | + type="selection" | ||
62 | + width="55"> | ||
63 | + </el-table-column> | ||
64 | + <el-table-column | ||
65 | + prop="customer" | ||
66 | + label="客户名称" | ||
67 | + width="120"> | ||
68 | + </el-table-column> | ||
69 | + <el-table-column | ||
70 | + prop="taketime" | ||
71 | + label="日期" | ||
72 | + width="120"> | ||
73 | + </el-table-column> | ||
74 | + <el-table-column | ||
75 | + prop="orig" | ||
76 | + label="始发地" | ||
77 | + show-overflow-tooltip> | ||
78 | + </el-table-column> | ||
79 | + <el-table-column | ||
80 | + prop="dest" | ||
81 | + label="目的地" | ||
82 | + show-overflow-tooltip> | ||
83 | + </el-table-column> | ||
84 | + <el-table-column | ||
85 | + prop="licenseno" | ||
86 | + label="车号" | ||
87 | + width="90"> | ||
88 | + <template slot-scope="scope"> | ||
89 | + <a type="text" style="color: #409eff;text-decoration: underline" class="tableInline" | ||
90 | + @click="getReCord(scope.row)">{{scope.row.licenseno}}</a> | ||
91 | + </template> | ||
92 | + </el-table-column> | ||
93 | + <el-table-column | ||
94 | + prop="dispatch" | ||
95 | + label="派单号" | ||
96 | + width="150"> | ||
97 | + <template slot-scope="scope"> | ||
98 | + <router-link :to="{name:'派单记录', query:{jilu:scope.row}}"> | ||
99 | + <a> | ||
100 | + {{scope.row.dispatch}} | ||
101 | + </a> | ||
102 | + </router-link> | ||
103 | + </template> | ||
104 | + </el-table-column> | ||
105 | + <el-table-column | ||
106 | + prop="awbh" | ||
107 | + label="分单号" | ||
108 | + width="140"> | ||
109 | + </el-table-column> | ||
110 | + <el-table-column | ||
111 | + prop="awba" | ||
112 | + label="主单号" | ||
113 | + width="110"> | ||
114 | + </el-table-column> | ||
115 | + <el-table-column | ||
116 | + prop="deststation" | ||
117 | + label="目的港" | ||
118 | + show-overflow-tooltip> | ||
119 | + </el-table-column> | ||
120 | + <el-table-column | ||
121 | + prop="pcs" | ||
122 | + label="件数" | ||
123 | + show-overflow-tooltip> | ||
124 | + </el-table-column> | ||
125 | + <el-table-column | ||
126 | + prop="weight" | ||
127 | + label="毛重" | ||
128 | + show-overflow-tooltip> | ||
129 | + </el-table-column> | ||
130 | + <el-table-column | ||
131 | + prop="vol" | ||
132 | + label="体积" | ||
133 | + show-overflow-tooltip> | ||
134 | + </el-table-column> | ||
135 | + <el-table-column | ||
136 | + prop="charge" | ||
137 | + label="应收" | ||
138 | + show-overflow-tooltip> | ||
139 | + </el-table-column> | ||
140 | + <el-table-column | ||
141 | + fixed="right" | ||
142 | + label="操作" | ||
143 | + width="100"> | ||
144 | + <template slot-scope="scope"> | ||
145 | + <el-button @click="ediVehicle(scope.row)" type="text" size="small">编辑</el-button> | ||
146 | + <el-button @click="delVehicleWaybill(scope.row.id)" type="text" size="small">删除</el-button> | ||
147 | + </template> | ||
148 | + </el-table-column> | ||
149 | + </el-table> | ||
150 | + </div> | ||
151 | + <div> | ||
152 | + <div class="block"> | ||
153 | + <el-row> | ||
154 | + <el-col :span="14"> | ||
155 | + <el-pagination | ||
156 | + @size-change="handleSizeChange" | ||
157 | + @current-change="handleCurrentChange" | ||
158 | + :current-page="formInline.pageNum" | ||
159 | + :page-sizes="[20, 30, 40, 100]" | ||
160 | + :page-size="formInline.pageSize" | ||
161 | + layout="total, sizes, prev, pager, next, jumper" | ||
162 | + :total="total"> | ||
163 | + </el-pagination> | ||
164 | + </el-col> | ||
165 | + </el-row> | ||
166 | + </div> | ||
167 | + </div> | ||
168 | + <div> | ||
169 | + <el-dialog | ||
170 | + :title="'车载运单'+textMap[dialogStatus]" | ||
171 | + :visible.sync="dialogVisible" | ||
172 | + width="75%" | ||
173 | + :before-close="handleClose"> | ||
174 | + <el-form :inline="true" label-width="80px" :model="submitForm" | ||
175 | + class="demo-form-inline"> | ||
176 | + <el-form-item label="客户名称"> | ||
177 | + <el-select v-model="submitForm.customer" | ||
178 | + @click.native="getUsers" | ||
179 | + default-first-option | ||
180 | + :loading="loading" clearable placeholder="请选择" | ||
181 | + style="width: 157px"> | ||
182 | + <el-option | ||
183 | + v-for="item in usernames" | ||
184 | + :key="item.roleName" | ||
185 | + :label="item.roleName" | ||
186 | + :value="item.roleName" | ||
187 | + :disabled="item.disabled"> | ||
188 | + </el-option> | ||
189 | + </el-select> | ||
190 | + </el-form-item> | ||
191 | + <el-form-item label="日期"> | ||
192 | + <div class="block"> | ||
193 | + <el-date-picker | ||
194 | + style="width: 157px" | ||
195 | + v-model="submitForm.taketime" | ||
196 | + type="date" | ||
197 | + format="yyyy-MM-dd" | ||
198 | + placeholder="选择日期"> | ||
199 | + </el-date-picker> | ||
200 | + </div> | ||
201 | + </el-form-item> | ||
202 | + <el-form-item label="始发地"> | ||
203 | + <el-input v-model="submitForm.orig" placeholder="始发地"></el-input> | ||
204 | + </el-form-item> | ||
205 | + <el-form-item label="目的地"> | ||
206 | + <el-input v-model="submitForm.dest" placeholder="目的地"></el-input> | ||
207 | + </el-form-item> | ||
208 | + <el-form-item label="车号"> | ||
209 | + <el-input v-model="submitForm.licenseno" placeholder="车号"></el-input> | ||
210 | + </el-form-item> | ||
211 | + <el-form-item label="派单号"> | ||
212 | + <el-input v-model="submitForm.dispatch" placeholder="派单号"></el-input> | ||
213 | + </el-form-item> | ||
214 | + <el-form-item label="分单号"> | ||
215 | + <el-input v-model="submitForm.awbh" placeholder="分单号"></el-input> | ||
216 | + </el-form-item> | ||
217 | + <el-form-item label="主单号"> | ||
218 | + <el-input v-model="submitForm.awba" placeholder="主单号"></el-input> | ||
219 | + </el-form-item> | ||
220 | + <el-form-item label="目的港"> | ||
221 | + <el-input v-model="submitForm.deststation" placeholder="目的港"></el-input> | ||
222 | + </el-form-item> | ||
223 | + <el-form-item label="件数"> | ||
224 | + <el-input v-model="submitForm.pcs" placeholder="件数"></el-input> | ||
225 | + </el-form-item> | ||
226 | + <el-form-item label="毛重"> | ||
227 | + <el-input v-model="submitForm.weight" placeholder="毛重"></el-input> | ||
228 | + </el-form-item> | ||
229 | + <el-form-item label="体积"> | ||
230 | + <el-input v-model="submitForm.vol" placeholder="体积"></el-input> | ||
231 | + </el-form-item> | ||
232 | + <el-form-item label="应收"> | ||
233 | + <el-input v-model="submitForm.charge" placeholder="应收"></el-input> | ||
234 | + </el-form-item> | ||
235 | + <el-form-item label="危险品"> | ||
236 | + <el-select v-model="submitForm.isdangerous" style="width: 157px"> | ||
237 | + <el-option | ||
238 | + v-for="item in options" | ||
239 | + :key="item.value" | ||
240 | + :label="item.label" | ||
241 | + :value="item.value"> | ||
242 | + </el-option> | ||
243 | + </el-select> | ||
244 | + </el-form-item> | ||
245 | + <el-form-item label="尺寸"> | ||
246 | + <el-input v-model="submitForm.means" placeholder="尺寸"></el-input> | ||
247 | + </el-form-item> | ||
248 | + <el-form-item label="备注"> | ||
249 | + <el-input v-model="submitForm.remark" placeholder="备注"></el-input> | ||
250 | + </el-form-item> | ||
251 | + | ||
252 | + </el-form> | ||
253 | + <span slot="footer" class="dialog-footer" style="margin-right: 50px"> | ||
254 | + <el-button @click="dialogVisible = false">取 消</el-button> | ||
255 | + <el-button type="primary" @click="dialogStatus==='create'?addVehicleWaybill():ediVehicleWaybill()">确 定</el-button> | ||
256 | + </span> | ||
257 | + </el-dialog> | ||
258 | + </div> | ||
259 | + <div> | ||
260 | + <el-dialog | ||
261 | + title="派单申请" | ||
262 | + :visible.sync="PDdialogVisible" | ||
263 | + width="30%" | ||
264 | + :before-close="handleClose"> | ||
265 | + <el-form :model="PDForm" :rules="rules" ref="PDForm" label-width="100px" :label-position="labelPosition" | ||
266 | + class="demo-ruleForm"> | ||
267 | + <el-form-item label="车号" prop="licenseno"> | ||
268 | + <el-input v-model="PDForm.licenseno"></el-input> | ||
269 | + </el-form-item> | ||
270 | + <el-form-item label="派单号" prop="dispatch"> | ||
271 | + <el-input v-model="PDForm.dispatch"></el-input> | ||
272 | + </el-form-item> | ||
273 | + <el-form-item label="始发地" prop="orig"> | ||
274 | + <el-input v-model="PDForm.orig"></el-input> | ||
275 | + </el-form-item> | ||
276 | + <el-form-item label="目的地" prop="dest"> | ||
277 | + <el-input v-model="PDForm.dest"></el-input> | ||
278 | + </el-form-item> | ||
279 | + <el-form-item> | ||
280 | + <el-button type="primary" @click="submitPDForm('PDForm')">派单</el-button> | ||
281 | + <el-button @click="resetForm('PDForm')">取消</el-button> | ||
282 | + </el-form-item> | ||
283 | + </el-form> | ||
284 | + | ||
285 | + </el-dialog> | ||
286 | + </div> | ||
287 | + <div> | ||
288 | + <el-dialog | ||
289 | + :visible.sync="CardialogVisible" | ||
290 | + width="65%" | ||
291 | + :before-close="handleClose"> | ||
292 | + <el-descriptions class="margin-top" title="车辆信息" :column="3" :size="size" border> | ||
293 | + <template slot="extra"> | ||
294 | + <el-button type="primary" @click="CardialogVisible = false">关闭</el-button> | ||
295 | + </template> | ||
296 | + <el-descriptions-item> | ||
297 | + <template slot="label"> | ||
298 | + <i class="el-icon-user"></i> | ||
299 | + 司机 | ||
300 | + </template> | ||
301 | + {{carinfo.veOwnerName}} | ||
302 | + </el-descriptions-item> | ||
303 | + <el-descriptions-item> | ||
304 | + <template slot="label"> | ||
305 | + <i class="el-icon-mobile-phone"></i> | ||
306 | + 手机号 | ||
307 | + </template> | ||
308 | + {{carinfo.ownerInsideTel}} | ||
309 | + </el-descriptions-item> | ||
310 | + <el-descriptions-item> | ||
311 | + <template slot="label"> | ||
312 | + <i class="el-icon-truck"></i> | ||
313 | + 车号 | ||
314 | + </template> | ||
315 | + {{carinfo.domesticLisenceNo}} | ||
316 | + </el-descriptions-item> | ||
317 | + <el-descriptions-item> | ||
318 | + <template slot="label"> | ||
319 | + <i class="el-icon-tickets"></i> | ||
320 | + 驾驶证有效期 | ||
321 | + </template> | ||
322 | + <el-tag size="small">{{carinfo.veFactoryDate}}</el-tag> | ||
323 | + </el-descriptions-item> | ||
324 | + <el-descriptions-item> | ||
325 | + <template slot="label"> | ||
326 | + <i class="el-icon-shopping-cart-full"></i> | ||
327 | + 车自重 | ||
328 | + </template> | ||
329 | + {{carinfo.selfWt}} | ||
330 | + </el-descriptions-item> | ||
331 | + <el-descriptions-item> | ||
332 | + <template slot="label"> | ||
333 | + <i class="el-icon-office-building"></i> | ||
334 | + 地址 | ||
335 | + </template> | ||
336 | + {{carinfo.proposer}} | ||
337 | + </el-descriptions-item> | ||
338 | + </el-descriptions> | ||
339 | + </el-dialog> | ||
340 | + </div> | ||
341 | + </div> | ||
342 | +</template> | ||
343 | +<script> | ||
344 | + import { | ||
345 | + getUserList, | ||
346 | + addVehicleWaybill, | ||
347 | + delVehicleWaybill, | ||
348 | + ediVehicleWaybill, | ||
349 | + selectNewInventroyrecords, | ||
350 | + paidan, | ||
351 | + UploadExcel | ||
352 | + } from "../../api/consigner/vehicle"; | ||
353 | + import {list} from "../../api/road_verecord/verecord"; | ||
354 | + import XLSX from 'xlsx'; | ||
355 | + import { saveAs } from 'file-saver'; | ||
356 | + | ||
357 | + export default { | ||
358 | + data() { | ||
359 | + return { | ||
360 | + size: 'medium', | ||
361 | + PDForm: { | ||
362 | + licenseno: '', | ||
363 | + orig: '', | ||
364 | + dest: '', | ||
365 | + dispatch: '' | ||
366 | + }, | ||
367 | + rules: { | ||
368 | + licenseno: [ | ||
369 | + {required: true, message: '请输入车号', trigger: 'blur'}, | ||
370 | + {min: 3, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur'} | ||
371 | + ], | ||
372 | + dispatch: [ | ||
373 | + {required: true, message: '请输入派单号', trigger: 'blur'}, | ||
374 | + {min: 3, max: 17, message: '长度在 3 到 17 个字符', trigger: 'blur'} | ||
375 | + ], | ||
376 | + orig: [ | ||
377 | + {required: true, message: '请输入始发地', trigger: 'blur'}, | ||
378 | + {min: 2, max: 100, message: '长度在 2 到 100 个字符', trigger: 'blur'} | ||
379 | + ], | ||
380 | + dest: [ | ||
381 | + {required: true, message: '请输入目的地', trigger: 'blur'}, | ||
382 | + {min: 2, max: 100, message: '长度在 3 到 100 个字符', trigger: 'blur'} | ||
383 | + ], | ||
384 | + }, | ||
385 | + labelPosition: 'left', | ||
386 | + tableData: [], | ||
387 | + multipleSelection: [], | ||
388 | + formInline: { | ||
389 | + awba: '', | ||
390 | + licenseno: '', | ||
391 | + starttime: '', | ||
392 | + endtime: '', | ||
393 | + pageNum: 1, | ||
394 | + pageSize: 20 | ||
395 | + }, | ||
396 | + dialogStatus: '', | ||
397 | + loading: false, | ||
398 | + listLoading: false, | ||
399 | + value2: '', | ||
400 | + total: 0, | ||
401 | + pickerOptions: { | ||
402 | + shortcuts: [{ | ||
403 | + text: '最近一周', | ||
404 | + onClick(picker) { | ||
405 | + const end = new Date(); | ||
406 | + const start = new Date(); | ||
407 | + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); | ||
408 | + picker.$emit('pick', [start, end]); | ||
409 | + } | ||
410 | + }, { | ||
411 | + text: '最近一个月', | ||
412 | + onClick(picker) { | ||
413 | + const end = new Date(); | ||
414 | + const start = new Date(); | ||
415 | + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); | ||
416 | + picker.$emit('pick', [start, end]); | ||
417 | + } | ||
418 | + }, { | ||
419 | + text: '最近三个月', | ||
420 | + onClick(picker) { | ||
421 | + const end = new Date(); | ||
422 | + const start = new Date(); | ||
423 | + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); | ||
424 | + picker.$emit('pick', [start, end]); | ||
425 | + } | ||
426 | + }] | ||
427 | + }, | ||
428 | + currentPage4: 4, | ||
429 | + submitForm: { | ||
430 | + awba: "", | ||
431 | + awbh: "", | ||
432 | + charge: 0, | ||
433 | + createtime: "", | ||
434 | + customer: "", | ||
435 | + dest: "", | ||
436 | + deststation: "", | ||
437 | + dispatch: "", | ||
438 | + id: "", | ||
439 | + isdangerous: 0, | ||
440 | + licenseno: "", | ||
441 | + means: "", | ||
442 | + orig: "", | ||
443 | + pcs: 0, | ||
444 | + pic: "", | ||
445 | + relevance: "", | ||
446 | + remark: "", | ||
447 | + remark1: "", | ||
448 | + remark2: "", | ||
449 | + taketime: "", | ||
450 | + vol: 0, | ||
451 | + weight: 0 | ||
452 | + }, | ||
453 | + dialogVisible: false, | ||
454 | + PDdialogVisible: false, | ||
455 | + CardialogVisible: false, | ||
456 | + usernames: [], | ||
457 | + options: [ | ||
458 | + { | ||
459 | + value: 0, | ||
460 | + label: '否' | ||
461 | + }, { | ||
462 | + value: 1, | ||
463 | + label: '是' | ||
464 | + } | ||
465 | + ], | ||
466 | + textMap: { | ||
467 | + update: '编辑', | ||
468 | + create: '新增' | ||
469 | + }, | ||
470 | + carinfo: { | ||
471 | + domesticLisenceNo: '', | ||
472 | + veOwnerName: '', | ||
473 | + ownerInsideTel: '', | ||
474 | + proposer: '', | ||
475 | + selfWt: '', | ||
476 | + veFactoryDate: '', | ||
477 | + veTon: '', | ||
478 | + trailerLicenseNo: '', | ||
479 | + trailerFrameNo: '' | ||
480 | + }, | ||
481 | + } | ||
482 | + }, | ||
483 | + | ||
484 | + methods: { | ||
485 | + //导入运单excel | ||
486 | + beforeUpload(file) { | ||
487 | + // 检查文件类型 | ||
488 | + const isExcel = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' || file.type === 'application/vnd.ms-excel'; | ||
489 | + if (!isExcel) { | ||
490 | + this.$message.error('上传文件只能是 Excel 格式!'); | ||
491 | + return false; // 取消文件上传 | ||
492 | + } | ||
493 | + return true; // 允许上传 | ||
494 | + | ||
495 | + }, | ||
496 | + uploadFile({ file, onSuccess, onError }){ | ||
497 | + // 生成 FormData 对象 | ||
498 | + const formData = new FormData(); | ||
499 | + formData.append('file', file); | ||
500 | + UploadExcel(formData).then((response) => { | ||
501 | + const res = response.data | ||
502 | + if (res.code !== '200') { | ||
503 | + return this.$message.error(res.msg); | ||
504 | + } | ||
505 | + this.$message.success(res.msg); | ||
506 | + this.getLists(); | ||
507 | + onSuccess(response.data); // 调用 onSuccess 回调通知上传成功 | ||
508 | + }).catch(error => { | ||
509 | + // 关闭加载 | ||
510 | + this.$message.error(error.toString()) | ||
511 | + onError(error); // 调用 onError 回调通知上传失败 | ||
512 | + }) | ||
513 | + }, | ||
514 | + //导出excel | ||
515 | + exportToExcel() { | ||
516 | + if(this.multipleSelection.length!==0){ | ||
517 | + const headers = { | ||
518 | + customer: '客户名称', | ||
519 | + taketime: '日期', | ||
520 | + orig: '始发地', | ||
521 | + dest: '目的地', | ||
522 | + licenseno: '车号', | ||
523 | + awba: '主单', | ||
524 | + awbh: '分单', | ||
525 | + deststation: '目的港', | ||
526 | + pcs: '件数', | ||
527 | + weight: '毛重', | ||
528 | + vol: '体积', | ||
529 | + means: '尺寸', | ||
530 | + charge: '应收' | ||
531 | + }; | ||
532 | + | ||
533 | + // Filter data to include only specified columns | ||
534 | + const filteredData = this.multipleSelection.map(row => { | ||
535 | + const newRow = {}; | ||
536 | + for (const key in headers) { | ||
537 | + newRow[headers[key]] = row[key]; | ||
538 | + } | ||
539 | + return newRow; | ||
540 | + }); | ||
541 | + | ||
542 | + // Convert to worksheet and workbook | ||
543 | + const ws = XLSX.utils.json_to_sheet(filteredData, { header: Object.values(headers) }); | ||
544 | + const wb = XLSX.utils.book_new(); | ||
545 | + XLSX.utils.book_append_sheet(wb, ws, 'Sheet1'); | ||
546 | + const wbout = XLSX.write(wb, { bookType: 'xlsx', type: 'array' }); | ||
547 | + | ||
548 | + saveAs(new Blob([wbout], { type: 'application/octet-stream' }), new Date().toLocaleString()+'.xlsx'); | ||
549 | + }else{ | ||
550 | + this.$message.warning('请先勾选要导出的数据!'); | ||
551 | + } | ||
552 | + | ||
553 | + }, | ||
554 | + //查询车牌号 | ||
555 | + getReCord(row) { | ||
556 | + let para = { | ||
557 | + pageSize: 1, | ||
558 | + limitSize: 10, | ||
559 | + trailerFrameNo: row.licenseno, | ||
560 | + veState: '', | ||
561 | + veClassFlag: '', | ||
562 | + userId: '' | ||
563 | + }; | ||
564 | + list(para).then((res) => { | ||
565 | + if(res.data.data.list.length!==0){ | ||
566 | + this.carinfo = res.data.data.list[0]; | ||
567 | + this.CardialogVisible=true; | ||
568 | + }else{ | ||
569 | + this.$message.warning('无对应车辆信息!') | ||
570 | + } | ||
571 | + }).catch((error) => { | ||
572 | + this.$message.warning('车辆查询,失败!') | ||
573 | + }); | ||
574 | + }, | ||
575 | + //提交派单表单申请 | ||
576 | + submitPDForm(formName) { | ||
577 | + this.$refs[formName].validate((valid) => { | ||
578 | + if (valid) { | ||
579 | + this.multipleSelection.forEach(item => { | ||
580 | + item.licenseno = this.PDForm.licenseno; | ||
581 | + item.orig = this.PDForm.orig; | ||
582 | + item.dest = this.PDForm.dest; | ||
583 | + item.dispatch = this.PDForm.dispatch; | ||
584 | + }); | ||
585 | + paidan(this.multipleSelection).then((response) => { | ||
586 | + const res = response.data | ||
587 | + if (res.code !== '200') { | ||
588 | + return this.$message.error('车辆派单,失败!') | ||
589 | + } | ||
590 | + this.$message.success('车辆派单,成功!') | ||
591 | + this.PDdialogVisible = false; | ||
592 | + }).catch(error => { | ||
593 | + // 关闭加载 | ||
594 | + this.$message.warning('车辆派单,失败!') | ||
595 | + }) | ||
596 | + } else { | ||
597 | + return false; | ||
598 | + } | ||
599 | + }); | ||
600 | + }, | ||
601 | + //生成派单号 | ||
602 | + getCurrentFormattedDate() { | ||
603 | + const now = new Date(); | ||
604 | + const pad = (num) => num.toString().padStart(2, '0'); | ||
605 | + | ||
606 | + const yyyy = now.getFullYear(); | ||
607 | + const MM = pad(now.getMonth() + 1); | ||
608 | + const dd = pad(now.getDate()); | ||
609 | + const HH = pad(now.getHours()); | ||
610 | + const mm = pad(now.getMinutes()); | ||
611 | + const ss = pad(now.getSeconds()); | ||
612 | + const SSS = now.getMilliseconds().toString().padStart(3, '0'); | ||
613 | + | ||
614 | + return `${yyyy}${MM}${dd}${HH}${mm}${ss}${SSS}`; | ||
615 | + }, | ||
616 | + | ||
617 | + //派单取消提交 | ||
618 | + resetForm(formName) { | ||
619 | + this.$refs[formName].resetFields(); | ||
620 | + this.PDdialogVisible = false; | ||
621 | + }, | ||
622 | + //更新车载运单 | ||
623 | + ediVehicleWaybill() { | ||
624 | + ediVehicleWaybill(this.submitForm).then((response) => { | ||
625 | + const res = response.data | ||
626 | + if (res.code !== '200') { | ||
627 | + return this.$message.error('更新车载运单,失败!') | ||
628 | + } | ||
629 | + this.$message.success('更新车载运单,成功!') | ||
630 | + this.dialogVisible = false; | ||
631 | + this.getLists(); | ||
632 | + }).catch(error => { | ||
633 | + // 关闭加载 | ||
634 | + this.$message.warning('更新车载运单,失败!') | ||
635 | + }) | ||
636 | + }, | ||
637 | + //删除车载运单 | ||
638 | + delVehicleWaybill(id) { | ||
639 | + // 弹框询问是否删除? | ||
640 | + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { | ||
641 | + confirmButtonText: '确定删除', | ||
642 | + cancelButtonText: '取消', | ||
643 | + type: 'warning' | ||
644 | + } | ||
645 | + ).then(() => { | ||
646 | + delVehicleWaybill({id: id}).then((response) => { | ||
647 | + const res = response.data | ||
648 | + this.$message.success(res.msg) | ||
649 | + this.getLists(); | ||
650 | + }).catch(error => { | ||
651 | + this.$message.error('删除车载运单,失败!') | ||
652 | + }) | ||
653 | + }).catch(() => { | ||
654 | + }) | ||
655 | + }, | ||
656 | + //新增车载运单 | ||
657 | + addVehicleWaybill() { | ||
658 | + addVehicleWaybill(this.submitForm).then((response) => { | ||
659 | + const res = response.data | ||
660 | + if (res.code !== '200') { | ||
661 | + return this.$message.error('新增车载运单,失败!') | ||
662 | + } | ||
663 | + this.$message.success('新增车载运单,成功!') | ||
664 | + this.dialogVisible = false; | ||
665 | + this.getLists(); | ||
666 | + }).catch(error => { | ||
667 | + // 关闭加载 | ||
668 | + this.$message.warning('新增车载运单,失败!') | ||
669 | + }) | ||
670 | + }, | ||
671 | + //查询列表 | ||
672 | + getLists() { | ||
673 | + if (this.value2 !== null) { | ||
674 | + this.formInline.starttime = this.value2[0]; | ||
675 | + this.formInline.endtime = this.value2[1]; | ||
676 | + } | ||
677 | + selectNewInventroyrecords(this.formInline).then((response) => { | ||
678 | + const res = response.data | ||
679 | + if (res.code !== '200') { | ||
680 | + return this.$message.error('获取消息收发记录,失败!') | ||
681 | + } | ||
682 | + // 获取列表数据 | ||
683 | + this.tableData = res.data.list | ||
684 | + // 获取列表的总记录数 | ||
685 | + this.total = res.data.total | ||
686 | + this.$message.success('获取消息收发记录,成功!'); | ||
687 | + this.formInline.endtime = ''; | ||
688 | + this.formInline.starttime = ''; | ||
689 | + }).catch(error => { | ||
690 | + // 关闭加载 | ||
691 | + this.$message.error(error.toString()) | ||
692 | + }) | ||
693 | + }, | ||
694 | + onPaidan() { | ||
695 | + if (this.multipleSelection.length !== 0) { | ||
696 | + this.PDdialogVisible = true; | ||
697 | + this.PDForm.dispatch = this.getCurrentFormattedDate(); | ||
698 | + } else { | ||
699 | + this.$message.error('请选勾取要派车的运单信息!'); | ||
700 | + } | ||
701 | + }, | ||
702 | + //新增 | ||
703 | + addVehicle() { | ||
704 | + this.dialogVisible = true; | ||
705 | + this.dialogStatus = 'create'; | ||
706 | + this.getUsers(); | ||
707 | + }, | ||
708 | + //编辑 | ||
709 | + ediVehicle(row) { | ||
710 | + this.dialogVisible = true; | ||
711 | + this.dialogStatus = 'update'; | ||
712 | + this.submitForm = row; | ||
713 | + }, | ||
714 | + //翻页 | ||
715 | + handleSizeChange(val) { | ||
716 | + this.formInline.pageSize = val; | ||
717 | + this.getLists(); | ||
718 | + }, | ||
719 | + handleCurrentChange(val) { | ||
720 | + this.formInline.pageNum = val; | ||
721 | + this.getLists(); | ||
722 | + }, | ||
723 | + //多选选中 | ||
724 | + handleSelectionChange(val) { | ||
725 | + this.multipleSelection = val; | ||
726 | + console.log(this.multipleSelection) | ||
727 | + }, | ||
728 | + //Dialog关闭提示 | ||
729 | + handleClose(done) { | ||
730 | + this.$confirm('确认关闭?') | ||
731 | + .then(_ => { | ||
732 | + done(); | ||
733 | + }) | ||
734 | + .catch(_ => { | ||
735 | + }); | ||
736 | + }, | ||
737 | + //获取用户名列表 | ||
738 | + getUsers() { | ||
739 | + let para = {orgtype: "C", pageSize: 1, pageNum: 10000}; | ||
740 | + this.listLoading = true; | ||
741 | + getUserList(para).then((res) => { | ||
742 | + this.usernames = res.data.data.list; | ||
743 | + }).catch((error) => { | ||
744 | + this.$message.error(error.toString()); | ||
745 | + }).finally(() => { | ||
746 | + this.listLoading = false; | ||
747 | + }); | ||
748 | + }, | ||
749 | + }, | ||
750 | + mounted() { | ||
751 | + this.getLists(); | ||
752 | + } | ||
753 | + } | ||
754 | +</script> |
-
请 注册 或 登录 后发表评论