作者 shenhailong

HomeNew.vue添加版本号

修改出港业务 用户信息获取方式
出港装载 理货  代码优化以及测试
@@ -66,6 +66,8 @@ @@ -66,6 +66,8 @@
66 import ElFormItem from "element-ui/packages/form/src/form-item"; 66 import ElFormItem from "element-ui/packages/form/src/form-item";
67 import TabMenu from "@/components/TabMenu" 67 import TabMenu from "@/components/TabMenu"
68 import NavMenu from "@/components/NavMenu" 68 import NavMenu from "@/components/NavMenu"
  69 + import loginuserInfo from "@/api/base";
  70 + import axios from "axios";
69 import {mapActions, mapGetters} from 'vuex' 71 import {mapActions, mapGetters} from 'vuex'
70 import jsutil from "@/common/js/util"; 72 import jsutil from "@/common/js/util";
71 73
@@ -223,6 +225,17 @@ @@ -223,6 +225,17 @@
223 collapse:function(){ 225 collapse:function(){
224 this.collapsed=!this.collapsed; 226 this.collapsed=!this.collapsed;
225 }, 227 },
  228 + checkUpdate() {
  229 + axios.get('http://localhost:12021/static/nmmsVer.json').then(function(response) {
  230 + // 判断版本号是否与本地一致
  231 + if (response.data.nmmsVer != localStorage.getItem('nmmsVer')) {
  232 + localStorage.setItem('nmmsVer', response.data.nmmsVer)
  233 + location.reload()
  234 + } else {
  235 + }
  236 + }).catch(function(error) {
  237 + })
  238 + },
226 submitEdit(formName){ 239 submitEdit(formName){
227 this.$refs[formName].validate((valid) => { 240 this.$refs[formName].validate((valid) => {
228 if (valid) { 241 if (valid) {
@@ -254,16 +267,33 @@ @@ -254,16 +267,33 @@
254 this.dialogFormVisible=true; 267 this.dialogFormVisible=true;
255 }, 268 },
256 }, 269 },
  270 +
257 computed: { 271 computed: {
258 ...mapGetters(['getUserInfoStore','getUserMenuStore']) // 动态计算属性,相当于this.$store.getters.resturantName 272 ...mapGetters(['getUserInfoStore','getUserMenuStore']) // 动态计算属性,相当于this.$store.getters.resturantName
259 }, 273 },
  274 +
260 mounted() { 275 mounted() {
  276 +
  277 + this.checkUpdate();
  278 + var _this = this;
  279 + var user = loginuserInfo;
  280 + if (user) {
  281 + this.sysUserName = user.username || '';
  282 + this.sysUserId=user.userId||'';
  283 +
  284 + this.sysUserAvatar = user.userface || '~img/faceDefault.jpg';
  285 + }
261 //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由 286 //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由
262 var userRouters = sessionStorage.getItem('menu'); 287 var userRouters = sessionStorage.getItem('menu');
263 if (userRouters) { 288 if (userRouters) {
264 userRouters = JSON.parse(userRouters); 289 userRouters = JSON.parse(userRouters);
265 _this.$router.options.routes = userRouters; 290 _this.$router.options.routes = userRouters;
266 } 291 }
  292 +
  293 + // 定时获取版本号
  294 + setInterval(() => {
  295 + this.checkUpdate();
  296 + }, 30000);
267 this.$nextTick(function(){ 297 this.$nextTick(function(){
268 this.initUserInfo(); 298 this.initUserInfo();
269 }) 299 })
@@ -371,7 +371,7 @@ @@ -371,7 +371,7 @@
371 validatorNum 371 validatorNum
372 } from "@/utils/validate"; 372 } from "@/utils/validate";
373 import {getResponseForParam} from '@/api/responseDetail'; 373 import {getResponseForParam} from '@/api/responseDetail';
374 - import loginUserInfo from '../../api/base'; 374 + import {loginedUserInfo} from "../../api/user";
375 375
376 export default { 376 export default {
377 name: "ExitArrive", 377 name: "ExitArrive",
@@ -472,7 +472,7 @@ @@ -472,7 +472,7 @@
472 arrivetime: undefined, 472 arrivetime: undefined,
473 messageType: 'MT3201', 473 messageType: 'MT3201',
474 user :{ 474 user :{
475 - username : loginUserInfo.username 475 + username : loginedUserInfo().username
476 } 476 }
477 }, 477 },
478 respModel: { 478 respModel: {
@@ -518,7 +518,7 @@ @@ -518,7 +518,7 @@
518 this.arriveQuery.destinationstation = this.$route.params.flightData.destinationstation 518 this.arriveQuery.destinationstation = this.$route.params.flightData.destinationstation
519 this.getList() 519 this.getList()
520 } 520 }
521 - let username = loginUserInfo.username 521 + let username = loginedUserInfo().username
522 if (username === 'admin') { 522 if (username === 'admin') {
523 this.isAdmin = true 523 this.isAdmin = true
524 } 524 }
@@ -654,7 +654,7 @@ @@ -654,7 +654,7 @@
654 this.fenStatus = 'addAwbh' 654 this.fenStatus = 'addAwbh'
655 this.dialogFormVisible = true, 655 this.dialogFormVisible = true,
656 row.user = { 656 row.user = {
657 - username: loginUserInfo.username 657 + username: loginedUserInfo().username
658 } 658 }
659 this.$nextTick(() => { 659 this.$nextTick(() => {
660 this.$refs.arriveFormData.clearValidate() 660 this.$refs.arriveFormData.clearValidate()
@@ -697,7 +697,7 @@ @@ -697,7 +697,7 @@
697 customcode: undefined, 697 customcode: undefined,
698 arrivetime: undefined, 698 arrivetime: undefined,
699 user: { 699 user: {
700 - username: loginUserInfo.username 700 + username: loginedUserInfo().username
701 } 701 }
702 } 702 }
703 }, 703 },
@@ -720,7 +720,7 @@ @@ -720,7 +720,7 @@
720 var _this = this 720 var _this = this
721 this.$refs.arriveFormData.validate(valid => { 721 this.$refs.arriveFormData.validate(valid => {
722 _this.arriveModel.user= { 722 _this.arriveModel.user= {
723 - username : loginUserInfo.username 723 + username : loginedUserInfo().username
724 } 724 }
725 if (valid) { 725 if (valid) {
726 updateMT3201(this.arriveModel).then(res => { 726 updateMT3201(this.arriveModel).then(res => {
@@ -754,7 +754,7 @@ @@ -754,7 +754,7 @@
754 delete row.children 754 delete row.children
755 755
756 row.user = { 756 row.user = {
757 - username : loginUserInfo.username 757 + username : loginedUserInfo().username
758 } 758 }
759 759
760 sendCreateMt3201(row).then(res => { 760 sendCreateMt3201(row).then(res => {
@@ -783,7 +783,7 @@ @@ -783,7 +783,7 @@
783 customCode: undefined, 783 customCode: undefined,
784 flightDate: undefined, 784 flightDate: undefined,
785 awbh: undefined, 785 awbh: undefined,
786 - username: loginUserInfo.username, 786 + username: loginedUserInfo().username,
787 } 787 }
788 this.dialogDeleteVisible = true 788 this.dialogDeleteVisible = true
789 this.respModel.flightNo = row.flightno 789 this.respModel.flightNo = row.flightno
@@ -835,7 +835,7 @@ @@ -835,7 +835,7 @@
835 //删除运单 835 //删除运单
836 handleAwbDelete(row) { 836 handleAwbDelete(row) {
837 row.user = { 837 row.user = {
838 - username: loginUserInfo.username 838 + username: loginedUserInfo().username
839 } 839 }
840 this.$confirm("是否删除", "确认消息", { 840 this.$confirm("是否删除", "确认消息", {
841 distinguishCancelAndClose: true, 841 distinguishCancelAndClose: true,
@@ -32,7 +32,9 @@ @@ -32,7 +32,9 @@
32 <div class="grid-content"> 32 <div class="grid-content">
33 <el-col :span="4"> 33 <el-col :span="4">
34 <div class="grid-content"> 34 <div class="grid-content">
35 - <el-input clearable v-model="loadingQuery.awba" placeholder="请输入主单号"></el-input> 35 + <el-input clearable v-model="loadingQuery.awba" placeholder="请输入主单号">
  36 + <template slot="prepend">主单号</template>
  37 + </el-input>
36 </div> 38 </div>
37 </el-col> 39 </el-col>
38 <div class="el-btn"> 40 <div class="el-btn">
@@ -54,7 +56,7 @@ @@ -54,7 +56,7 @@
54 <el-table-column type="selection" width="60"></el-table-column> 56 <el-table-column type="selection" width="60"></el-table-column>
55 <el-table-column label="主单号" width="160" align="center"> 57 <el-table-column label="主单号" width="160" align="center">
56 <template slot-scope="scope"> 58 <template slot-scope="scope">
57 - <span>{{scope.row.awba}}</span> 59 + <a type="text" style="color: #409eff;text-decoration: underline" class="tableInline" @click="handleEdit(scope.row)">{{scope.row.awba}}</a>
58 </template> 60 </template>
59 </el-table-column> 61 </el-table-column>
60 <el-table-column label="运载件数" width="70" align="center"> 62 <el-table-column label="运载件数" width="70" align="center">
@@ -110,8 +112,8 @@ @@ -110,8 +112,8 @@
110 <template slot-scope="scope"> 112 <template slot-scope="scope">
111 <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button> 113 <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
112 114
113 - <el-button size="mini" type="success" @click="handleEdit(scope.row)" >编辑  
114 - </el-button> 115 +<!-- <el-button size="mini" type="success" @click="handleEdit(scope.row)" >编辑-->
  116 +<!-- </el-button>-->
115 117
116 <el-button size="mini" type="primary" @click="handleSendAwb(scope.row)" 118 <el-button size="mini" type="primary" @click="handleSendAwb(scope.row)"
117 :disabled="scope.row.status ==='23'">发送出港装载报 119 :disabled="scope.row.status ==='23'">发送出港装载报
@@ -317,9 +319,9 @@ @@ -317,9 +319,9 @@
317 </el-table> 319 </el-table>
318 </el-dialog> 320 </el-dialog>
319 <el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="50%"> 321 <el-dialog title="删除原因" :visible.sync="dialogDeleteVisible" width="50%">
320 - <div style="">  
321 - <el-button type="success" @click="historyList()">选择历史消息</el-button>  
322 - </div> 322 +<!-- <div style="">-->
  323 +<!-- <el-button type="success" @click="historyList()">选择历史消息</el-button>-->
  324 +<!-- </div>-->
323 <el-form ref="loadingDeleteForm" :model="respModel" :rules="loadingDeleteRules" 325 <el-form ref="loadingDeleteForm" :model="respModel" :rules="loadingDeleteRules"
324 label-width="120px" style="margin-right: 50px"> 326 label-width="120px" style="margin-right: 50px">
325 <el-form-item label="删除原因" prop="reason"> 327 <el-form-item label="删除原因" prop="reason">
@@ -369,6 +371,7 @@ @@ -369,6 +371,7 @@
369 } from '@/api/exitLoading' 371 } from '@/api/exitLoading'
370 import {getHistoryList} from '@/api/history/history'; 372 import {getHistoryList} from '@/api/history/history';
371 import {Message} from "element-ui" 373 import {Message} from "element-ui"
  374 + import {loginedUserInfo} from "../../api/user";
372 import { 375 import {
373 validAwb, 376 validAwb,
374 validAlphabets, 377 validAlphabets,
@@ -493,7 +496,7 @@ @@ -493,7 +496,7 @@
493 contactTel: undefined, 496 contactTel: undefined,
494 content: undefined, 497 content: undefined,
495 user: { 498 user: {
496 - username : JSON.parse(sessionStorage.getItem('user')).username 499 + username : loginedUserInfo().username
497 } 500 }
498 }, 501 },
499 respModel: { 502 respModel: {
@@ -509,9 +512,20 @@ @@ -509,9 +512,20 @@
509 awbh: '', 512 awbh: '',
510 }, 513 },
511 loadingDeleteRules: { 514 loadingDeleteRules: {
512 - reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],  
513 - contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],  
514 - contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}] 515 + reason:[{required:true,message:'原因不能为空',trigger:'blur'}],
  516 + contactName:[{required:true,message:'操作人不能为空',trigger:'blur'}],
  517 + contactTel:[
  518 + { required: true, message: '手机号不能为空', trigger: 'blur' },
  519 + { type: 'number', message: '手机号格式不正确', trigger: 'blur',
  520 + transform(value){
  521 + var phone = 11 && /^((13|14|15|16|17|18|19)[0-9]{1}\d{8})$/
  522 + if (!phone.test(value)){
  523 + return false;
  524 + }else {
  525 + return Number(value);
  526 + }
  527 + }}
  528 + ],
515 }, 529 },
516 } 530 }
517 }, 531 },
@@ -528,7 +542,7 @@ @@ -528,7 +542,7 @@
528 this.loadingQuery.destinationstation = this.$route.params.flightData.destinationstation 542 this.loadingQuery.destinationstation = this.$route.params.flightData.destinationstation
529 this.getList() 543 this.getList()
530 } 544 }
531 - let username = JSON.parse(sessionStorage.getItem('user')).username 545 + let username = loginedUserInfo().username
532 if (username === 'admin') { 546 if (username === 'admin') {
533 this.isAdmin = true 547 this.isAdmin = true
534 } 548 }
@@ -652,7 +666,7 @@ @@ -652,7 +666,7 @@
652 this.$refs.loadingFormData.validate(valid => { 666 this.$refs.loadingFormData.validate(valid => {
653 if (valid) { 667 if (valid) {
654 _this.loadingModel.user= { 668 _this.loadingModel.user= {
655 - username : JSON.parse(sessionStorage.getItem('user')).username 669 + username : loginedUserInfo().username
656 } 670 }
657 updateMT4201(this.loadingModel).then(res => { 671 updateMT4201(this.loadingModel).then(res => {
658 if (res.data.count > 0) { 672 if (res.data.count > 0) {
@@ -679,7 +693,7 @@ @@ -679,7 +693,7 @@
679 row.awbh = '' 693 row.awbh = ''
680 } 694 }
681 row.user = { 695 row.user = {
682 - username : JSON.parse(sessionStorage.getItem('user')).username 696 + username : loginedUserInfo().username
683 } 697 }
684 sendCreateMt4201(row).then(res => { 698 sendCreateMt4201(row).then(res => {
685 if (res.data.count > 0) { 699 if (res.data.count > 0) {
@@ -728,7 +742,7 @@ @@ -728,7 +742,7 @@
728 customCode: undefined, 742 customCode: undefined,
729 flightDate: undefined, 743 flightDate: undefined,
730 awbh: '', 744 awbh: '',
731 - username: JSON.parse(sessionStorage.getItem('user')).username, 745 + username: loginedUserInfo().username,
732 } 746 }
733 this.dialogDeleteVisible = true 747 this.dialogDeleteVisible = true
734 this.respModel.carrier = row.carrier 748 this.respModel.carrier = row.carrier
@@ -763,22 +777,25 @@ @@ -763,22 +777,25 @@
763 }, 777 },
764 // 删除 778 // 删除
765 handleAwbDelete(row) { 779 handleAwbDelete(row) {
  780 + row.user = {
  781 + username : loginedUserInfo().username
  782 + }
766 this.$confirm("是否删除", "确认消息", { 783 this.$confirm("是否删除", "确认消息", {
767 distinguishCancelAndClose: true, 784 distinguishCancelAndClose: true,
768 confirmButtonText: '删除', 785 confirmButtonText: '删除',
769 cancelButtonText: '取消' 786 cancelButtonText: '取消'
770 }).then(() => { 787 }).then(() => {
771 deleteByIsDelete(row).then(res => { 788 deleteByIsDelete(row).then(res => {
772 - if (res.data.count > 0) { 789 + if (res.data.code == "200") {
773 this.$message({ 790 this.$message({
774 type: 'success', 791 type: 'success',
775 - message: '删除成功' 792 + message: res.data.msg
776 }) 793 })
777 this.getList() 794 this.getList()
778 } else { 795 } else {
779 this.$message({ 796 this.$message({
780 type: 'danger', 797 type: 'danger',
781 - message: '删除异常,请稍后重试' 798 + message: res.data.msg
782 }) 799 })
783 } 800 }
784 }) 801 })
@@ -844,7 +861,7 @@ @@ -844,7 +861,7 @@
844 awbprice: undefined, 861 awbprice: undefined,
845 awbweight: undefined, 862 awbweight: undefined,
846 user: { 863 user: {
847 - username : JSON.parse(sessionStorage.getItem('user')).username, 864 + username : loginedUserInfo().username,
848 } 865 }
849 } 866 }
850 }, 867 },
@@ -816,7 +816,7 @@ @@ -816,7 +816,7 @@
816 sendUpdateMt2201, 816 sendUpdateMt2201,
817 uploadFileExcel 817 uploadFileExcel
818 } from '@/api/exitPre'; 818 } from '@/api/exitPre';
819 - import loginUserInfo from '../../api/base'; 819 + import {loginedUserInfo} from "../../api/user";
820 import {Message} from "element-ui"; 820 import {Message} from "element-ui";
821 import {getResponseForParam} from '@/api/responseDetail' 821 import {getResponseForParam} from '@/api/responseDetail'
822 import { getList} from '../../api/consigner/consigner'; 822 import { getList} from '../../api/consigner/consigner';
@@ -889,7 +889,7 @@ @@ -889,7 +889,7 @@
889 limitSize: 5, 889 limitSize: 5,
890 }, 890 },
891 dialogSelectVisible: false, 891 dialogSelectVisible: false,
892 - loginUserInfo: loginUserInfo, 892 + loginUserInfo: loginedUserInfo(),
893 preQuery: { 893 preQuery: {
894 pageSize: 1, 894 pageSize: 1,
895 limitSize: 30, 895 limitSize: 30,
@@ -899,9 +899,9 @@ @@ -899,9 +899,9 @@
899 flightdate: '', 899 flightdate: '',
900 originstation: '', 900 originstation: '',
901 destinationstation: '', 901 destinationstation: '',
902 - userId:loginUserInfo.userId, 902 + userId:loginedUserInfo().userId,
903 customCode:'', 903 customCode:'',
904 - enterpriseId:loginUserInfo.companyId, 904 + enterpriseId:loginedUserInfo().companyId,
905 messageType: '' 905 messageType: ''
906 }, 906 },
907 dialogMap: { 907 dialogMap: {
@@ -1077,7 +1077,7 @@ @@ -1077,7 +1077,7 @@
1077 awbtype: undefined 1077 awbtype: undefined
1078 }, 1078 },
1079 user: { 1079 user: {
1080 - username: loginUserInfo.username 1080 + username: loginedUserInfo().username
1081 } 1081 }
1082 }, 1082 },
1083 respModel: { 1083 respModel: {
@@ -1495,7 +1495,7 @@ @@ -1495,7 +1495,7 @@
1495 pageSize: this.consignerQuery.pageSize, 1495 pageSize: this.consignerQuery.pageSize,
1496 limitSize: this.consignerQuery.limitSize, 1496 limitSize: this.consignerQuery.limitSize,
1497 companyName: this.consignerQuery.companyName, 1497 companyName: this.consignerQuery.companyName,
1498 - enterpriseId: loginUserInfo.companyId 1498 + enterpriseId: loginedUserInfo().companyId
1499 }; 1499 };
1500 getList(para).then((res) => { 1500 getList(para).then((res) => {
1501 this.consignerQuery.total = res.data.data.total; 1501 this.consignerQuery.total = res.data.data.total;
@@ -1521,7 +1521,7 @@ @@ -1521,7 +1521,7 @@
1521 pageSize: this.consigneeQuery.pageSize, 1521 pageSize: this.consigneeQuery.pageSize,
1522 limitSize: this.consigneeQuery.limitSize, 1522 limitSize: this.consigneeQuery.limitSize,
1523 companyName: this.consigneeQuery.companyName, 1523 companyName: this.consigneeQuery.companyName,
1524 - enterpriseId: loginUserInfo.companyId 1524 + enterpriseId: loginedUserInfo().companyId
1525 }; 1525 };
1526 neeList(para).then((res) => { 1526 neeList(para).then((res) => {
1527 this.consigneeQuery.total = res.data.data.total; 1527 this.consigneeQuery.total = res.data.data.total;
@@ -1612,7 +1612,7 @@ @@ -1612,7 +1612,7 @@
1612 cancelButtonText: '取消' 1612 cancelButtonText: '取消'
1613 }).then(() => { 1613 }).then(() => {
1614 const form = new FormData() 1614 const form = new FormData()
1615 - form.append("username", loginUserInfo.username); 1615 + form.append("username", loginedUserInfo().username);
1616 form.append("ids", ids); 1616 form.append("ids", ids);
1617 sendCreateMt2201(form).then(res => { 1617 sendCreateMt2201(form).then(res => {
1618 if (res.data.code == "200") { 1618 if (res.data.code == "200") {
@@ -1712,7 +1712,7 @@ @@ -1712,7 +1712,7 @@
1712 }) 1712 })
1713 } 1713 }
1714 const form = new FormData() 1714 const form = new FormData()
1715 - form.append("username", loginUserInfo.username); 1715 + form.append("username", loginedUserInfo().username);
1716 form.append("ids", ids); 1716 form.append("ids", ids);
1717 form.append("reason", this.respModel.reason); 1717 form.append("reason", this.respModel.reason);
1718 form.append("contactName", this.respModel.contactName); 1718 form.append("contactName", this.respModel.contactName);
@@ -1763,7 +1763,7 @@ @@ -1763,7 +1763,7 @@
1763 }) 1763 })
1764 } 1764 }
1765 const form = new FormData() 1765 const form = new FormData()
1766 - form.append("username", loginUserInfo.username); 1766 + form.append("username", loginedUserInfo().username);
1767 form.append("ids", ids); 1767 form.append("ids", ids);
1768 form.append("reason", this.respModel.reason); 1768 form.append("reason", this.respModel.reason);
1769 form.append("contactName", this.respModel.contactName); 1769 form.append("contactName", this.respModel.contactName);
@@ -1970,9 +1970,9 @@ @@ -1970,9 +1970,9 @@
1970 uploadFile (item) { 1970 uploadFile (item) {
1971 const form = new FormData() 1971 const form = new FormData()
1972 form.append('file', item.file) 1972 form.append('file', item.file)
1973 - form.append('userId', loginUserInfo.userId);  
1974 - form.append('enterpriseId', loginUserInfo.companyId);  
1975 - form.append("username", loginUserInfo.username); 1973 + form.append('userId', loginedUserInfo().userId);
  1974 + form.append('enterpriseId', loginedUserInfo().companyId);
  1975 + form.append("username", loginedUserInfo().username);
1976 uploadFileExcel(form).then(res =>{ 1976 uploadFileExcel(form).then(res =>{
1977 if(res.data.code =='200'){ 1977 if(res.data.code =='200'){
1978 Message.success(res.data.msg) 1978 Message.success(res.data.msg)
@@ -1988,8 +1988,8 @@ @@ -1988,8 +1988,8 @@
1988 }, 1988 },
1989 // 用户id 企业id 赋值 1989 // 用户id 企业id 赋值
1990 userId(){ 1990 userId(){
1991 - this.preModel.userId = loginUserInfo.userId;  
1992 - this.preModel.enterpriseId = loginUserInfo.companyId; 1991 + this.preModel.userId = loginedUserInfo().userId;
  1992 + this.preModel.enterpriseId = loginedUserInfo().companyId;
1993 }, 1993 },
1994 1994
1995 // 远程查询运输工具申报是否成功 1995 // 远程查询运输工具申报是否成功
@@ -32,7 +32,9 @@ @@ -32,7 +32,9 @@
32 <div class="grid-content"> 32 <div class="grid-content">
33 <el-col :span="4"> 33 <el-col :span="4">
34 <div class="grid-content"> 34 <div class="grid-content">
35 - <el-input v-model="tidyQuery.awba" placeholder="请输入主单号" clearable></el-input> 35 + <el-input v-model="tidyQuery.awba" placeholder="请输入主单号" clearable>
  36 + <template slot="prepend">主单号</template>
  37 + </el-input>
36 </div> 38 </div>
37 </el-col> 39 </el-col>
38 <div class="grid-content el-btn"> 40 <div class="grid-content el-btn">
@@ -62,27 +64,38 @@ @@ -62,27 +64,38 @@
62 </el-table-column> 64 </el-table-column>
63 <el-table-column label="运单号" width="150" align="center"> 65 <el-table-column label="运单号" width="150" align="center">
64 <template slot-scope="scope"> 66 <template slot-scope="scope">
65 - <span>{{scope.row.awba}}</span>  
66 - </template>  
67 - </el-table-column>  
68 - <el-table-column label="分单号" width="120" align="center">  
69 - <template slot-scope="scope">  
70 - <span>{{scope.row.awbh}}</span> 67 + <a type="text" style="color: #409eff;text-decoration: underline" class="tableInline" @click="handleEdit(scope.row)" v-if="scope.row.awbh !==''">{{scope.row.awbh}}</a>
  68 + <a type="text" style="color: #409eff;text-decoration: underline" class="tableInline" @click="handleEdit(scope.row)" v-else>{{scope.row.awba}}</a>
71 </template> 69 </template>
72 </el-table-column> 70 </el-table-column>
  71 +<!-- <el-table-column label="分单号" width="120" align="center">-->
  72 +<!-- <template slot-scope="scope">-->
  73 +<!-- <span>{{scope.row.awbh}}</span>-->
  74 +<!-- </template>-->
  75 +<!-- </el-table-column>-->
73 <!-- <el-table-column label="运单件数/重量" width="100" align="center">--> 76 <!-- <el-table-column label="运单件数/重量" width="100" align="center">-->
74 <!-- <template slot-scope="scope">--> 77 <!-- <template slot-scope="scope">-->
75 <!-- <span>{{scope.row.awbpiece}} / {{scope.row.awbweight}}</span>--> 78 <!-- <span>{{scope.row.awbpiece}} / {{scope.row.awbweight}}</span>-->
76 <!-- </template>--> 79 <!-- </template>-->
77 <!-- </el-table-column>--> 80 <!-- </el-table-column>-->
78 - <el-table-column label="理货件数/重量" width="100" align="center"> 81 + <el-table-column label="理货件数" width="100" align="center">
  82 + <template slot-scope="scope">
  83 + <span>{{scope.row.piece}}</span>
  84 + </template>
  85 + </el-table-column>
  86 + <el-table-column label="理货重量" width="100" align="center">
  87 + <template slot-scope="scope">
  88 + <span>{{scope.row.weight}}</span>
  89 + </template>
  90 + </el-table-column>
  91 + <el-table-column label="装载开始时间" width="160" align="center">
79 <template slot-scope="scope"> 92 <template slot-scope="scope">
80 - <span>{{scope.row.piece}} / {{scope.row.weight}}</span> 93 + <span>{{scope.row.starttime}}</span>
81 </template> 94 </template>
82 </el-table-column> 95 </el-table-column>
83 - <el-table-column label="装载开始/结束时间" width="260" align="center"> 96 + <el-table-column label="装载结束时间" width="160" align="center">
84 <template slot-scope="scope"> 97 <template slot-scope="scope">
85 - <span>{{scope.row.starttime}} - {{scope.row.endtime}}</span> 98 + <span>{{scope.row.endtime}}</span>
86 </template> 99 </template>
87 </el-table-column> 100 </el-table-column>
88 <el-table-column label="状态" width="100" align="center"> 101 <el-table-column label="状态" width="100" align="center">
@@ -117,7 +130,7 @@ @@ -117,7 +130,7 @@
117 <el-table-column prop="operation" label="操作" width="420px" align="center"> 130 <el-table-column prop="operation" label="操作" width="420px" align="center">
118 <template slot-scope="scope"> 131 <template slot-scope="scope">
119 <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button> 132 <el-button size="mini" @click="handleSend(scope.row)">收发明细</el-button>
120 - <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button> 133 +<!-- <el-button size="mini" type="success" @click="handleEdit(scope.row)">编辑</el-button>-->
121 <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)" 134 <el-button size="mini" type="primary" @click="handleAwbSend(scope.row)"
122 :disabled="addStatus(scope.row.status)">发送出港理货报</el-button> 135 :disabled="addStatus(scope.row.status)">发送出港理货报</el-button>
123 136
@@ -366,6 +379,7 @@ @@ -366,6 +379,7 @@
366 import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate" 379 import {validAwb, validAlphabets, validAlphabetsAndNum, validAlphabetsAndSpanceKey,validatorNum} from "@/utils/validate"
367 import {getCustomCode,getAirportCode} from "@/api/country"; 380 import {getCustomCode,getAirportCode} from "@/api/country";
368 import util from "@/common/js/util.js"; 381 import util from "@/common/js/util.js";
  382 + import {loginedUserInfo} from "../../api/user";
369 383
370 export default { 384 export default {
371 name: "ExitTidy", 385 name: "ExitTidy",
@@ -437,6 +451,8 @@ @@ -437,6 +451,8 @@
437 destinationstation: [{required: true, message:"目的站不能为空"}, { trigger: 'blur', validator: validatorAlphabets}], 451 destinationstation: [{required: true, message:"目的站不能为空"}, { trigger: 'blur', validator: validatorAlphabets}],
438 weight: [{required: true, message:"重量不能为空"}, { trigger: 'change', validator: validatorNums}], 452 weight: [{required: true, message:"重量不能为空"}, { trigger: 'change', validator: validatorNums}],
439 piece: [{required: true, message:"件数不能为空"}, { trigger: 'change', validator: validatorNums}], 453 piece: [{required: true, message:"件数不能为空"}, { trigger: 'change', validator: validatorNums}],
  454 + customcode: [{required: true, message:"关区不能为空",trigger:'change'}],
  455 + starttime: [{required: true, message:"关区不能为空",trigger:'change'}],
440 456
441 }, 457 },
442 tidyData: [], 458 tidyData: [],
@@ -485,9 +501,20 @@ @@ -485,9 +501,20 @@
485 rcfdep: 'MT5202', 501 rcfdep: 'MT5202',
486 }, 502 },
487 tidyDeleteRules: { 503 tidyDeleteRules: {
488 - reason: [{required: true, message: '删除原因不能为空', trigger: 'blur'}],  
489 - contactName: [{required: true, message: '删除操作人不能为空', trigger: 'blur'}],  
490 - contactTel: [{required: true, message: '操作人联系方式不能为空', trigger: 'blur'}] 504 + reason:[{required:true,message:'原因不能为空',trigger:'blur'}],
  505 + contactName:[{required:true,message:'操作人不能为空',trigger:'blur'}],
  506 + contactTel:[
  507 + { required: true, message: '手机号不能为空', trigger: 'blur' },
  508 + { type: 'number', message: '手机号格式不正确', trigger: 'blur',
  509 + transform(value){
  510 + var phone = 11 && /^((13|14|15|16|17|18|19)[0-9]{1}\d{8})$/
  511 + if (!phone.test(value)){
  512 + return false;
  513 + }else {
  514 + return Number(value);
  515 + }
  516 + }}
  517 + ],
491 }, 518 },
492 519
493 rows:{}, 520 rows:{},
@@ -763,12 +790,15 @@ @@ -763,12 +790,15 @@
763 confirmButtonText: '删除', 790 confirmButtonText: '删除',
764 cancelButtonText: '取消' 791 cancelButtonText: '取消'
765 }).then(() => { 792 }).then(() => {
  793 + row.userinfo = {
  794 + username : loginedUserInfo().username
  795 + }
766 deleteByIsDelete(row).then(res => { 796 deleteByIsDelete(row).then(res => {
767 - if (res.data.count > 0) {  
768 - Message.success("删除成功") 797 + if (res.data.code == "200") {
  798 + Message.success(res.data.msg)
769 this.getList() 799 this.getList()
770 } else { 800 } else {
771 - Message.success("删除异常,请稍后重试") 801 + Message.success(res.data.msg)
772 } 802 }
773 }) 803 })
774 }).catch(action => { 804 }).catch(action => {
@@ -857,12 +887,12 @@ @@ -857,12 +887,12 @@
857 this.$refs.tidyFormData.validate(valid => { 887 this.$refs.tidyFormData.validate(valid => {
858 if (valid) { 888 if (valid) {
859 addMt520X(this.tidyModel).then(res => { 889 addMt520X(this.tidyModel).then(res => {
860 - if (res.data.count > 0) {  
861 - Message.success("出港理货新增成功") 890 + if (res.data.code == "200") {
  891 + Message.success(res.data.msg);
862 this.dialogFormVisible = false 892 this.dialogFormVisible = false
863 this.getList() 893 this.getList()
864 } else { 894 } else {
865 - Message.error("出港理货新增失败,请检查数据") 895 + Message.error(res.data.msg);
866 } 896 }
867 }) 897 })
868 } 898 }
@@ -893,6 +923,9 @@ @@ -893,6 +923,9 @@
893 _this.tidyModel.user= { 923 _this.tidyModel.user= {
894 username : JSON.parse(sessionStorage.getItem('user')).username 924 username : JSON.parse(sessionStorage.getItem('user')).username
895 } 925 }
  926 + this.tidyModel.userinfo = {
  927 + username : loginUserInfo().username
  928 + }
896 929
897 updateMt520X(this.tidyModel).then(res => { 930 updateMt520X(this.tidyModel).then(res => {
898 console.log(res.data) 931 console.log(res.data)
  1 +{
  2 + "nmmsVer": "1.0"
  3 +}