正在显示
3 个修改的文件
包含
186 行增加
和
27 行删除
@@ -9,5 +9,7 @@ export const remove = params => {return axios.post(`${base}/remove`, params);}; | @@ -9,5 +9,7 @@ export const remove = params => {return axios.post(`${base}/remove`, params);}; | ||
9 | 9 | ||
10 | export const save = params => {return http.post(`${base}/save`, params);}; | 10 | export const save = params => {return http.post(`${base}/save`, params);}; |
11 | 11 | ||
12 | +export const edit = params => {return http.put(`${base}/edit`, params);}; | ||
13 | + | ||
12 | 14 | ||
13 | 15 |
@@ -82,12 +82,11 @@ | @@ -82,12 +82,11 @@ | ||
82 | <el-row> | 82 | <el-row> |
83 | <el-form-item label="货物类型:" prop="cocode"> | 83 | <el-form-item label="货物类型:" prop="cocode"> |
84 | <el-select v-model="addForm.cocode" placeholder="请选择" size="small" style="width: 180px"> | 84 | <el-select v-model="addForm.cocode" placeholder="请选择" size="small" style="width: 180px"> |
85 | - <el-option | ||
86 | - v-for="item in cocodeOptions" | ||
87 | - :key="item.value" | ||
88 | - :label="item.label" | ||
89 | - :value="item.value"> | ||
90 | - </el-option> | 85 | + <el-option label="转关货" value="转关货"></el-option> |
86 | + <el-option label="换单货" value="换单货"></el-option> | ||
87 | + <el-option label="普通货" selected value="普通货"></el-option> | ||
88 | + <el-option label="退库货" value="退库货"></el-option> | ||
89 | + <el-option label="查验货" value="查验货"></el-option> | ||
91 | </el-select> | 90 | </el-select> |
92 | </el-form-item> | 91 | </el-form-item> |
93 | </el-row> | 92 | </el-row> |
@@ -142,7 +141,7 @@ | @@ -142,7 +141,7 @@ | ||
142 | <el-input | 141 | <el-input |
143 | type="textarea" | 142 | type="textarea" |
144 | :rows="4" | 143 | :rows="4" |
145 | - placeholder="请输入主单号,例如17212341234,多个单号以‘,’(英文)分割" | 144 | + placeholder="请输入主单号,例如172-12341234,多个单号以‘,’(英文)分割" |
146 | v-model="addForm.masterList" | 145 | v-model="addForm.masterList" |
147 | style="width: 180px"> | 146 | style="width: 180px"> |
148 | </el-input> | 147 | </el-input> |
@@ -198,24 +197,6 @@ | @@ -198,24 +197,6 @@ | ||
198 | ] | 197 | ] |
199 | }, | 198 | }, |
200 | options:[], | 199 | options:[], |
201 | - cocodeOptions: [ | ||
202 | - { | ||
203 | - value: '转关货', | ||
204 | - label: '转关货' | ||
205 | - }, { | ||
206 | - value: '换单货', | ||
207 | - label: '换单货' | ||
208 | - }, { | ||
209 | - value: '普通货', | ||
210 | - label: '普通货' | ||
211 | - }, { | ||
212 | - value: '退库货', | ||
213 | - label: '退库货' | ||
214 | - }, { | ||
215 | - value: '查验货', | ||
216 | - label: '查验货' | ||
217 | - } | ||
218 | - ], | ||
219 | filters: { | 200 | filters: { |
220 | waybill: '' | 201 | waybill: '' |
221 | }, | 202 | }, |
@@ -427,6 +408,7 @@ | @@ -427,6 +408,7 @@ | ||
427 | addsubmit(){ | 408 | addsubmit(){ |
428 | this.addForm.masterList = this.wayBillList(); | 409 | this.addForm.masterList = this.wayBillList(); |
429 | this.addForm.remark = this.weightFloat.toString(); | 410 | this.addForm.remark = this.weightFloat.toString(); |
411 | + this.addForm.trailerFrameNo = this.addForm.trailerFrameNo.trim; | ||
430 | let para = Object.assign({}, this.addForm); | 412 | let para = Object.assign({}, this.addForm); |
431 | this.addloading = true; | 413 | this.addloading = true; |
432 | save(para).then((res) => { | 414 | save(para).then((res) => { |
@@ -47,6 +47,7 @@ | @@ -47,6 +47,7 @@ | ||
47 | <el-table-column label="操作" min-width="150"> | 47 | <el-table-column label="操作" min-width="150"> |
48 | <template slot-scope="scope"> | 48 | <template slot-scope="scope"> |
49 | <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button> | 49 | <el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button> |
50 | + <el-button type="small" size="small" @click="handlEdit(scope.$index, scope.row)">修改</el-button> | ||
50 | </template> | 51 | </template> |
51 | </el-table-column> | 52 | </el-table-column> |
52 | </el-table> | 53 | </el-table> |
@@ -154,10 +155,103 @@ | @@ -154,10 +155,103 @@ | ||
154 | <el-button type="primary" @click.native="addSubmit()">保存</el-button> | 155 | <el-button type="primary" @click.native="addSubmit()">保存</el-button> |
155 | </div> | 156 | </div> |
156 | </el-dialog> | 157 | </el-dialog> |
158 | + | ||
159 | + <el-dialog title="修改" :visible.sync="editFormVisible" :close-on-click-modal="false"> | ||
160 | + <el-form :model="editForm" label-width="100px" :rules="editFormRules" ref="editForm"> | ||
161 | + <el-row> | ||
162 | + <el-col :span="10"> | ||
163 | + <el-row> | ||
164 | + <el-form-item label="海关代码" prop="mainPort"> | ||
165 | + <el-input v-model="editForm.mainPort" auto-complete="on" placeholder="海关代码"></el-input> | ||
166 | + </el-form-item> | ||
167 | + </el-row> | ||
168 | + <el-row> | ||
169 | + <el-form-item label="挂靠单位" prop="proposer"> | ||
170 | + <el-input v-model="editForm.proposer" auto-complete="on" placeholder="挂靠单位"></el-input> | ||
171 | + </el-form-item> | ||
172 | + </el-row> | ||
173 | + <el-row> | ||
174 | + <el-form-item label="运输公司名称" label-width="130px" prop="coCode"> | ||
175 | + <el-input v-model="editForm.coCode" auto-complete="on" placeholder="运输公司名称"></el-input> | ||
176 | + </el-form-item> | ||
177 | + </el-row> | ||
178 | + <el-row> | ||
179 | + <el-form-item label="国内车牌" prop="domesticLisenceNo"> | ||
180 | + <el-input v-model="editForm.domesticLisenceNo" :disabled="disabledOne" auto-complete="on" placeholder="国内车牌"></el-input> | ||
181 | + </el-form-item> | ||
182 | + </el-row> | ||
183 | + <el-row> | ||
184 | + <el-form-item label="车主姓名" prop="veOwnerName"> | ||
185 | + <el-input v-model="editForm.veOwnerName" auto-complete="on" placeholder="车主姓名"></el-input> | ||
186 | + </el-form-item> | ||
187 | + </el-row> | ||
188 | + <el-row> | ||
189 | + <el-form-item label="车主联系电话" label-width="130px" prop="ownerInsideTel"> | ||
190 | + <el-input v-model="editForm.ownerInsideTel" auto-complete="on" placeholder="车主联系电话"></el-input> | ||
191 | + </el-form-item> | ||
192 | + </el-row> | ||
193 | + <el-row> | ||
194 | + <el-form-item label="行驶证有效期" label-width="130px" prop="veFactoryDate"> | ||
195 | + <el-date-picker | ||
196 | + v-model="editForm.veFactoryDate" | ||
197 | + type="date" | ||
198 | + placeholder="选择日期"> | ||
199 | + </el-date-picker> | ||
200 | + </el-form-item> | ||
201 | + </el-row> | ||
202 | + </el-col> | ||
203 | + <el-col :span="10"> | ||
204 | + <el-row> | ||
205 | + <el-form-item label="自重(空车重量)" label-width="140px" prop="selfWt"> | ||
206 | + <el-input v-model="editForm.selfWt" auto-complete="on" placeholder="自重(空车重量)"></el-input> | ||
207 | + </el-form-item> | ||
208 | + </el-row> | ||
209 | + <el-row> | ||
210 | + <el-form-item label="核定载货重量" prop="veTon"> | ||
211 | + <el-input v-model="editForm.veTon" auto-complete="on" placeholder="核定载货重量"></el-input> | ||
212 | + </el-form-item> | ||
213 | + </el-row> | ||
214 | + <el-row> | ||
215 | + <el-form-item label="挂车牌号" prop="trailerLicenseNo"> | ||
216 | + <el-input v-model="editForm.trailerLicenseNo" :disabled="disabledOne" auto-complete="on" placeholder="挂车牌号"></el-input> | ||
217 | + </el-form-item> | ||
218 | + </el-row> | ||
219 | + <el-row> | ||
220 | + <el-form-item label="挂车车架号" prop="trailerFrameNo"> | ||
221 | + <el-input v-model="editForm.trailerFrameNo" auto-complete="on" placeholder="挂车车架号"></el-input> | ||
222 | + </el-form-item> | ||
223 | + </el-row> | ||
224 | + <el-row> | ||
225 | + <el-form-item label="车辆备案编号" label-width="110px" prop="apprNo"> | ||
226 | + <el-input v-model="editForm.apprNo" auto-complete="on" placeholder="车辆备案编号"></el-input> | ||
227 | + </el-form-item> | ||
228 | + </el-row> | ||
229 | + <el-row> | ||
230 | + <el-form-item label="车辆属性" label-width="100px" prop="veClassFlag"> | ||
231 | + <el-select v-model="editForm.veClassFlag" placeholder="请选择"> | ||
232 | + <el-option | ||
233 | + v-for="item in options" | ||
234 | + :key="item.value" | ||
235 | + :label="item.label" | ||
236 | + :value="item.value"> | ||
237 | + </el-option> | ||
238 | + </el-select> | ||
239 | + </el-form-item> | ||
240 | + <el-form-item label="备注" label-width="100px" prop="memo"> | ||
241 | + <el-input v-model="editForm.memo" auto-complete="on" placeholder="备注"></el-input> | ||
242 | + </el-form-item> | ||
243 | + </el-row> | ||
244 | + </el-col> | ||
245 | + </el-row> | ||
246 | + </el-form> | ||
247 | + <div slot="footer" class="dialog-footer"> | ||
248 | + <el-button type="primary" @click.native="editSubmit()">保存</el-button> | ||
249 | + </div> | ||
250 | + </el-dialog> | ||
157 | </section> | 251 | </section> |
158 | </template> | 252 | </template> |
159 | <script> | 253 | <script> |
160 | - import { list, save, remove} from '../../api/road_verecord/verecord'; | 254 | + import { list, save, remove, edit} from '../../api/road_verecord/verecord'; |
161 | export default { | 255 | export default { |
162 | 256 | ||
163 | data() { | 257 | data() { |
@@ -171,6 +265,8 @@ | @@ -171,6 +265,8 @@ | ||
171 | limitSize: 10, | 265 | limitSize: 10, |
172 | listLoading: false, | 266 | listLoading: false, |
173 | addFormVisible: false, | 267 | addFormVisible: false, |
268 | + editFormVisible: false, | ||
269 | + disabledOne: true, | ||
174 | addForm: { | 270 | addForm: { |
175 | mainPort: '4604', | 271 | mainPort: '4604', |
176 | proposer: '', | 272 | proposer: '', |
@@ -187,6 +283,22 @@ | @@ -187,6 +283,22 @@ | ||
187 | memo: '', | 283 | memo: '', |
188 | createBy: '' | 284 | createBy: '' |
189 | }, | 285 | }, |
286 | + editForm: { | ||
287 | + mainPort: '', | ||
288 | + proposer: '', | ||
289 | + coCode: '', | ||
290 | + domesticLisenceNo: '', | ||
291 | + veOwnerName: '', | ||
292 | + ownerInsideTel: '', | ||
293 | + veFactoryDate: '', | ||
294 | + selfWt: '', | ||
295 | + veTon: '', | ||
296 | + trailerLicenseNo: '', | ||
297 | + apprNo: '', | ||
298 | + veClassFlag: '', | ||
299 | + memo: '', | ||
300 | + createBy: '' | ||
301 | + }, | ||
190 | options: [{ | 302 | options: [{ |
191 | value: '0', | 303 | value: '0', |
192 | label: '普通车辆' | 304 | label: '普通车辆' |
@@ -219,6 +331,32 @@ | @@ -219,6 +331,32 @@ | ||
219 | selfWt: [ | 331 | selfWt: [ |
220 | { required: true, message: '请输入车辆自重', trigger: 'blur' } | 332 | { required: true, message: '请输入车辆自重', trigger: 'blur' } |
221 | ], | 333 | ], |
334 | + }, | ||
335 | + editFormRules: { | ||
336 | + mainPort: [ | ||
337 | + { required: true, message: '请输入海关关区', trigger: 'blur' } | ||
338 | + ], | ||
339 | + proposer: [ | ||
340 | + { required: true, message: '请输入挂靠单位', trigger: 'blur' } | ||
341 | + ], | ||
342 | + coCode: [ | ||
343 | + { required: true, message: '请输入运输公司名称', trigger: 'blur' } | ||
344 | + ], | ||
345 | + domesticLisenceNo: [ | ||
346 | + { required: true, message: '请输入国内车牌', trigger: 'blur' } | ||
347 | + ], | ||
348 | + veOwnerName: [ | ||
349 | + { required: true, message: '请输入车主姓名', trigger: 'blur' } | ||
350 | + ], | ||
351 | + ownerInsideTel: [ | ||
352 | + { required: true, message: '请输入车主联系方式', trigger: 'blur' } | ||
353 | + ], | ||
354 | + veFactoryDate: [ | ||
355 | + { required: true, message: '请选择驾驶证有效期', trigger: 'blur' } | ||
356 | + ], | ||
357 | + selfWt: [ | ||
358 | + { required: true, message: '请输入车辆自重', trigger: 'blur' } | ||
359 | + ], | ||
222 | } | 360 | } |
223 | } | 361 | } |
224 | }, | 362 | }, |
@@ -231,8 +369,12 @@ | @@ -231,8 +369,12 @@ | ||
231 | let para = { | 369 | let para = { |
232 | pageSize: this.pageSize, | 370 | pageSize: this.pageSize, |
233 | limitSize: this.limitSize, | 371 | limitSize: this.limitSize, |
234 | - trailerFrameNo: this.filters.trailerFrameNo | 372 | + trailerFrameNo: this.filters.trailerFrameNo, |
373 | + userId: this.userid = JSON.parse(sessionStorage.getItem('user')).id | ||
235 | }; | 374 | }; |
375 | + if(JSON.parse(sessionStorage.getItem('user')).roles[0].roleName == "ROLE_admin"){ | ||
376 | + para.userId = ''; | ||
377 | + } | ||
236 | this.listLoading = true; | 378 | this.listLoading = true; |
237 | list(para).then((res) => { | 379 | list(para).then((res) => { |
238 | this.total = res.data.data.total; | 380 | this.total = res.data.data.total; |
@@ -295,6 +437,10 @@ | @@ -295,6 +437,10 @@ | ||
295 | } | 437 | } |
296 | this.getReCord(); | 438 | this.getReCord(); |
297 | }, | 439 | }, |
440 | + handlEdit:function(index, row){ | ||
441 | + this.editFormVisible = true; | ||
442 | + this.editForm = Object.assign({}, row); | ||
443 | + }, | ||
298 | 444 | ||
299 | addSubmit:function(){ | 445 | addSubmit:function(){ |
300 | this.$refs.addForm.validate((valid) => { | 446 | this.$refs.addForm.validate((valid) => { |
@@ -308,6 +454,35 @@ | @@ -308,6 +454,35 @@ | ||
308 | message: '提交成功', | 454 | message: '提交成功', |
309 | type: 'success' | 455 | type: 'success' |
310 | }); | 456 | }); |
457 | + this.addFormVisible = false | ||
458 | + this.getReCord(); | ||
459 | + }else { | ||
460 | + this.$message({ | ||
461 | + message: res.data.msg, | ||
462 | + type: 'error' | ||
463 | + }); | ||
464 | + } | ||
465 | + }).catch(error => alert(error)); | ||
466 | + }) | ||
467 | + } else { | ||
468 | + console.log('error submit!!'); | ||
469 | + return false; | ||
470 | + } | ||
471 | + }); | ||
472 | + }, | ||
473 | + | ||
474 | + editSubmit:function(){ | ||
475 | + this.$refs.editForm.validate((valid) => { | ||
476 | + if (valid) { | ||
477 | + this.$confirm('确认提交吗?', '提示', {}).then(() => { | ||
478 | + let para = Object.assign({}, this.editForm); | ||
479 | + edit(para).then((res) => { | ||
480 | + if (res.data.code == 200){ | ||
481 | + this.$message({ | ||
482 | + message: '修改成功', | ||
483 | + type: 'success' | ||
484 | + }); | ||
485 | + this.editFormVisible = false | ||
311 | this.getReCord(); | 486 | this.getReCord(); |
312 | }else { | 487 | }else { |
313 | this.$message({ | 488 | this.$message({ |
-
请 注册 或 登录 后发表评论