作者 shenhailong

excel 导入 出港预配装载理货 新增删除修改操作 用户名称插入回执表

@@ -23,3 +23,7 @@ export const sendDeleteMt2201 = params =>{return http.post(`${baseUrl}/sendDelet @@ -23,3 +23,7 @@ export const sendDeleteMt2201 = params =>{return http.post(`${baseUrl}/sendDelet
23 export const sendUpdateMt2201 = params =>{return http.post(`${baseUrl}/sendUpdateMt2201`,params)} 23 export const sendUpdateMt2201 = params =>{return http.post(`${baseUrl}/sendUpdateMt2201`,params)}
24 24
25 export const sendCreateMt2201 = params =>{return http.post(`${baseUrl}/sendCreateMt2201`,params)} 25 export const sendCreateMt2201 = params =>{return http.post(`${baseUrl}/sendCreateMt2201`,params)}
  26 +
  27 +export const uploadFileExcel = params =>{return http.post(`${baseUrl}/uploadFileExcel`,params)}
  28 +
  29 +
@@ -316,7 +316,7 @@ @@ -316,7 +316,7 @@
316 </el-table-column> 316 </el-table-column>
317 <el-table-column label="操作人" width="100"> 317 <el-table-column label="操作人" width="100">
318 <template slot-scope="scope"> 318 <template slot-scope="scope">
319 - {{scope.row.operusername}} 319 + {{scope.row.opersystemname}}
320 </template> 320 </template>
321 </el-table-column> 321 </el-table-column>
322 </el-table> 322 </el-table>
@@ -460,7 +460,10 @@ @@ -460,7 +460,10 @@
460 goodsname: undefined, 460 goodsname: undefined,
461 customcode: undefined, 461 customcode: undefined,
462 arrivetime: undefined, 462 arrivetime: undefined,
463 - messageType: 'MT3201' 463 + messageType: 'MT3201',
  464 + user :{
  465 + username : JSON.parse(sessionStorage.getItem('user')).username
  466 + }
464 }, 467 },
465 respModel: { 468 respModel: {
466 uuid: undefined, 469 uuid: undefined,
@@ -627,7 +630,10 @@ @@ -627,7 +630,10 @@
627 this.arriveModel.customcode = row.customcode 630 this.arriveModel.customcode = row.customcode
628 this.dialogStatus = 'create' 631 this.dialogStatus = 'create'
629 this.fenStatus = 'addAwbh' 632 this.fenStatus = 'addAwbh'
630 - this.dialogFormVisible = true 633 + this.dialogFormVisible = true,
  634 + row.user = {
  635 + username: JSON.parse(sessionStorage.getItem('user')).username
  636 + }
631 this.$nextTick(() => { 637 this.$nextTick(() => {
632 this.$refs.arriveFormData.clearValidate() 638 this.$refs.arriveFormData.clearValidate()
633 }) 639 })
@@ -664,6 +670,9 @@ @@ -664,6 +670,9 @@
664 goodsname: undefined, 670 goodsname: undefined,
665 customcode: undefined, 671 customcode: undefined,
666 arrivetime: undefined, 672 arrivetime: undefined,
  673 + user: {
  674 + username: JSON.parse(sessionStorage.getItem('user')).username
  675 + }
667 } 676 }
668 }, 677 },
669 // 编辑 678 // 编辑
@@ -683,7 +692,11 @@ @@ -683,7 +692,11 @@
683 }) 692 })
684 }, 693 },
685 updateData() { 694 updateData() {
  695 + var _this = this
686 this.$refs.arriveFormData.validate(valid => { 696 this.$refs.arriveFormData.validate(valid => {
  697 + _this.arriveModel.user= {
  698 + username : JSON.parse(sessionStorage.getItem('user')).username
  699 + }
687 if (valid) { 700 if (valid) {
688 updateMT3201(this.arriveModel).then(res => { 701 updateMT3201(this.arriveModel).then(res => {
689 if (res.data.count > 0) { 702 if (res.data.count > 0) {
@@ -710,6 +723,11 @@ @@ -710,6 +723,11 @@
710 } 723 }
711 delete row.parent 724 delete row.parent
712 delete row.children 725 delete row.children
  726 +
  727 + row.user = {
  728 + username : JSON.parse(sessionStorage.getItem('user')).username
  729 + }
  730 +
713 sendCreateMt3201(row).then(res => { 731 sendCreateMt3201(row).then(res => {
714 if (res.data.count > 0) { 732 if (res.data.count > 0) {
715 Message.success(res.data.respMessage) 733 Message.success(res.data.respMessage)
@@ -735,7 +753,8 @@ @@ -735,7 +753,8 @@
735 awba: undefined, 753 awba: undefined,
736 customCode: undefined, 754 customCode: undefined,
737 flightDate: undefined, 755 flightDate: undefined,
738 - awbh: undefined 756 + awbh: undefined,
  757 + username: JSON.parse(sessionStorage.getItem('user')).username,
739 } 758 }
740 this.dialogDeleteVisible = true 759 this.dialogDeleteVisible = true
741 this.respModel.flightNo = row.flightno 760 this.respModel.flightNo = row.flightno
@@ -41,6 +41,16 @@ @@ -41,6 +41,16 @@
41 size="mini" 41 size="mini"
42 @click="handleAddpre">新增预配舱单 42 @click="handleAddpre">新增预配舱单
43 </el-button> 43 </el-button>
  44 + <el-upload
  45 + style="display: inline; margin-left: 10px;margin-right: 10px;"
  46 + action=""
  47 + :http-request="uploadFile"
  48 + :limit=1
  49 + :on-exceed="fileExceed"
  50 + accept="application/vnd.ms-excel,application/vnd.ms-excels"
  51 + ref="fileupload">
  52 + <el-button slot="trigger" size="small" type="primary">导入excel</el-button>
  53 + </el-upload>
44 </div> 54 </div>
45 </div> 55 </div>
46 </el-col> 56 </el-col>
@@ -158,7 +168,7 @@ @@ -158,7 +168,7 @@
158 <pagination background layout="total, prev, pager, next" v-show="total>0" :total="total" :page.sync="preQuery.pageSize" :limit.sync="preQuery.limitSize" 168 <pagination background layout="total, prev, pager, next" v-show="total>0" :total="total" :page.sync="preQuery.pageSize" :limit.sync="preQuery.limitSize"
159 @pagination="getList"/> 169 @pagination="getList"/>
160 170
161 - <el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="90%"> 171 + <el-dialog top="5vh" :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="90%">
162 <el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right" 172 <el-form ref="preFormData" :model="preModel" :rules="preRoles" label-position="right"
163 label-width="78px" size="mini" class="el-dialog-div" style="height: 90%"> 173 label-width="78px" size="mini" class="el-dialog-div" style="height: 90%">
164 <div class="grid-content content" style="font-size: 10px"> 174 <div class="grid-content content" style="font-size: 10px">
@@ -602,7 +612,7 @@ @@ -602,7 +612,7 @@
602 </el-table-column> 612 </el-table-column>
603 <el-table-column label="操作人" width="100"> 613 <el-table-column label="操作人" width="100">
604 <template slot-scope="scope"> 614 <template slot-scope="scope">
605 - {{scope.row.operusername}} 615 + {{scope.row.opersystemname}}
606 </template> 616 </template>
607 </el-table-column> 617 </el-table-column>
608 </el-table> 618 </el-table>
@@ -644,7 +654,8 @@ @@ -644,7 +654,8 @@
644 addMt2201, 654 addMt2201,
645 sendCreateMt2201, 655 sendCreateMt2201,
646 sendDeleteMt2201, 656 sendDeleteMt2201,
647 - sendUpdateMt2201 657 + sendUpdateMt2201,
  658 + uploadFileExcel
648 } from '@/api/exitPre' 659 } from '@/api/exitPre'
649 import {Message} from "element-ui"; 660 import {Message} from "element-ui";
650 import {getResponseForParam} from '@/api/responseDetail' 661 import {getResponseForParam} from '@/api/responseDetail'
@@ -825,6 +836,9 @@ @@ -825,6 +836,9 @@
825 csgcustomerid: undefined, 836 csgcustomerid: undefined,
826 paymodel: '0', 837 paymodel: '0',
827 awbtype: undefined 838 awbtype: undefined
  839 + },
  840 + user: {
  841 + username: this.username
828 } 842 }
829 }, 843 },
830 respModel: { 844 respModel: {
@@ -1106,6 +1120,7 @@ @@ -1106,6 +1120,7 @@
1106 } else { 1120 } else {
1107 getMt2201ListForParam(this.preQuery).then(res => { 1121 getMt2201ListForParam(this.preQuery).then(res => {
1108 this.preData = res.data.dataList 1122 this.preData = res.data.dataList
  1123 +
1109 this.total = res.data.count 1124 this.total = res.data.count
1110 setTimeout(() => { 1125 setTimeout(() => {
1111 this.listLoading = false 1126 this.listLoading = false
@@ -1171,6 +1186,9 @@ @@ -1171,6 +1186,9 @@
1171 eairportid: undefined, 1186 eairportid: undefined,
1172 csgcustomerid: undefined, 1187 csgcustomerid: undefined,
1173 paymodel: '0', 1188 paymodel: '0',
  1189 + },
  1190 + user: {
  1191 + username : JSON.parse(sessionStorage.getItem('user')).username
1174 } 1192 }
1175 } 1193 }
1176 }, 1194 },
@@ -1248,6 +1266,9 @@ @@ -1248,6 +1266,9 @@
1248 if (row.awbh === null) { 1266 if (row.awbh === null) {
1249 row.awbh = '' 1267 row.awbh = ''
1250 } 1268 }
  1269 + row.user = {
  1270 + username : JSON.parse(sessionStorage.getItem('user')).username
  1271 + }
1251 sendCreateMt2201(row).then(res => { 1272 sendCreateMt2201(row).then(res => {
1252 if (res.data.count > 0) { 1273 if (res.data.count > 0) {
1253 Message.success(res.data.respMessage) 1274 Message.success(res.data.respMessage)
@@ -1269,7 +1290,8 @@ @@ -1269,7 +1290,8 @@
1269 }, 1290 },
1270 // >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<< 1291 // >>>>>>>>>>>>>>>>更新运单数据<<<<<<<<<<<<<<<<<<
1271 handleEdit(row) { 1292 handleEdit(row) {
1272 - console.log(row) 1293 + this.dialogStatus = undefined;
  1294 + this.fenStatus = undefined;
1273 this.preModel = Object.assign({}, row) 1295 this.preModel = Object.assign({}, row)
1274 this.dialogStatus = 'update' 1296 this.dialogStatus = 'update'
1275 if (row.awbh !== undefined && row.awbh !== ""){ 1297 if (row.awbh !== undefined && row.awbh !== ""){
@@ -1282,11 +1304,16 @@ @@ -1282,11 +1304,16 @@
1282 }) 1304 })
1283 }, 1305 },
1284 updateData() { 1306 updateData() {
  1307 + let _this = this;
1285 this.$refs.preFormData.validate(valid => { 1308 this.$refs.preFormData.validate(valid => {
1286 if (valid) { 1309 if (valid) {
1287 delete this.preModel.parent 1310 delete this.preModel.parent
1288 delete this.preModel.children 1311 delete this.preModel.children
1289 - updateMT2201(this.preModel).then(res => { 1312 + _this.preModel.user= {
  1313 + username : JSON.parse(sessionStorage.getItem('user')).username
  1314 + }
  1315 +
  1316 + updateMT2201(_this.preModel).then(res => {
1290 if (res.data.count > 0) { 1317 if (res.data.count > 0) {
1291 Message.success("修改成功") 1318 Message.success("修改成功")
1292 this.dialogFormVisible = false 1319 this.dialogFormVisible = false
@@ -1332,6 +1359,8 @@ @@ -1332,6 +1359,8 @@
1332 const reason = this.preModel.reason 1359 const reason = this.preModel.reason
1333 const contactName = this.preModel.contactName 1360 const contactName = this.preModel.contactName
1334 const contactTel = this.preModel.contactTel 1361 const contactTel = this.preModel.contactTel
  1362 + const username = JSON.parse(sessionStorage.getItem('user')).username
  1363 +
1335 1364
1336 this.$refs.preFormData.validate(valid =>{ 1365 this.$refs.preFormData.validate(valid =>{
1337 if(valid){ 1366 if(valid){
@@ -1343,6 +1372,7 @@ @@ -1343,6 +1372,7 @@
1343 'reason' : reason, 1372 'reason' : reason,
1344 'contactName': contactName, 1373 'contactName': contactName,
1345 'contactTel': contactTel, 1374 'contactTel': contactTel,
  1375 + 'username': username,
1346 } 1376 }
1347 sendUpdateMt2201(map).then(res =>{ 1377 sendUpdateMt2201(map).then(res =>{
1348 if(res.data.count >0){ 1378 if(res.data.count >0){
@@ -1370,7 +1400,8 @@ @@ -1370,7 +1400,8 @@
1370 awba: undefined, 1400 awba: undefined,
1371 customCode: undefined, 1401 customCode: undefined,
1372 flightDate: undefined, 1402 flightDate: undefined,
1373 - awbh: '' 1403 + awbh: '',
  1404 + username: JSON.parse(sessionStorage.getItem('user')).username,
1374 } 1405 }
1375 this.rows = row; 1406 this.rows = row;
1376 this.dialogDeleteVisble = true 1407 this.dialogDeleteVisble = true
@@ -1587,6 +1618,23 @@ @@ -1587,6 +1618,23 @@
1587 handelBackStep() { 1618 handelBackStep() {
1588 this.preQuery.messageType = 'MT2201' 1619 this.preQuery.messageType = 'MT2201'
1589 this.$router.push({name: '出港航班信息', params: {scopeRow: this.preQuery}}) 1620 this.$router.push({name: '出港航班信息', params: {scopeRow: this.preQuery}})
  1621 + },
  1622 + // 导入excel
  1623 + fileExceed(){
  1624 + this.$message.error('别贪心!一次只能上传一个哦~');
  1625 + },
  1626 + // 自定义上传
  1627 + uploadFile (item) {
  1628 + const form = new FormData()
  1629 + form.append('file', item.file)
  1630 + uploadFileExcel(form).then(res =>{
  1631 + if(res.data.count >0){
  1632 + Message.success(res.data.respMessage)
  1633 + this.getList();
  1634 + }else {
  1635 + Message.error(res.data.respMessage)
  1636 + }
  1637 + })
1590 } 1638 }
1591 } 1639 }
1592 } 1640 }
@@ -87,12 +87,13 @@ @@ -87,12 +87,13 @@
87 </el-table-column> 87 </el-table-column>
88 <el-table-column label="状态" width="100" align="center"> 88 <el-table-column label="状态" width="100" align="center">
89 <template slot-scope="scope"> 89 <template slot-scope="scope">
90 - <span v-if="scope.row.status ==='01'">未发送</span> 90 + <span v-if="scope.row.status ==='01'">接受申报</span>
91 <span v-if="scope.row.status ==='02'">待人工审核</span> 91 <span v-if="scope.row.status ==='02'">待人工审核</span>
92 <span v-if="scope.row.status ==='03'">退单</span> 92 <span v-if="scope.row.status ==='03'">退单</span>
93 <span v-if="scope.row.status ==='05'">舱单报退单</span> 93 <span v-if="scope.row.status ==='05'">舱单报退单</span>
94 <span v-if="scope.row.status ==='06'">舱单转人工</span> 94 <span v-if="scope.row.status ==='06'">舱单转人工</span>
95 <span v-if="scope.row.status ==='07'">舱单报申报成功</span> 95 <span v-if="scope.row.status ==='07'">舱单报申报成功</span>
  96 + <span v-if="scope.row.status ==='08'">已发舱单删除报</span>
96 <span v-if="scope.row.status ==='09'">舱单删除报退单</span> 97 <span v-if="scope.row.status ==='09'">舱单删除报退单</span>
97 <span v-if="scope.row.status ==='10'">舱单删除报转人工</span> 98 <span v-if="scope.row.status ==='10'">舱单删除报转人工</span>
98 <span v-if="scope.row.status ==='11'">放行</span> 99 <span v-if="scope.row.status ==='11'">放行</span>
@@ -323,7 +324,7 @@ @@ -323,7 +324,7 @@
323 </el-table-column> 324 </el-table-column>
324 <el-table-column label="操作人" width="100"> 325 <el-table-column label="操作人" width="100">
325 <template slot-scope="scope"> 326 <template slot-scope="scope">
326 - {{scope.row.operusername}} 327 + {{scope.row.opersystemname}}
327 </template> 328 </template>
328 </el-table-column> 329 </el-table-column>
329 </el-table> 330 </el-table>
@@ -466,6 +467,9 @@ @@ -466,6 +467,9 @@
466 awbpiece: undefined, 467 awbpiece: undefined,
467 awbweight: undefined, 468 awbweight: undefined,
468 rcfdep: 'MT5202', 469 rcfdep: 'MT5202',
  470 + user: {
  471 + username : JSON.parse(sessionStorage.getItem('user')).username
  472 + }
469 }, 473 },
470 respModel : { 474 respModel : {
471 uuid: undefined, 475 uuid: undefined,
@@ -646,7 +650,9 @@ @@ -646,7 +650,9 @@
646 cancelButtonText: '取消' 650 cancelButtonText: '取消'
647 }).then(() => { 651 }).then(() => {
648 console.log(row) 652 console.log(row)
649 - 653 + row.user = {
  654 + username : JSON.parse(sessionStorage.getItem('user')).username
  655 + }
650 sendCreateMt5202(row).then(res => { 656 sendCreateMt5202(row).then(res => {
651 if (res.data.count > 0) { 657 if (res.data.count > 0) {
652 Message.success(res.data.respMessage) 658 Message.success(res.data.respMessage)
@@ -707,6 +713,7 @@ @@ -707,6 +713,7 @@
707 flightDate: undefined, 713 flightDate: undefined,
708 awbh: undefined, 714 awbh: undefined,
709 rcfdep: 'MT5202', 715 rcfdep: 'MT5202',
  716 + username: JSON.parse(sessionStorage.getItem('user')).username,
710 } 717 }
711 this.dialogDeleteVisible = true 718 this.dialogDeleteVisible = true
712 this.respModel.carrier = row.carrier 719 this.respModel.carrier = row.carrier
@@ -824,6 +831,9 @@ @@ -824,6 +831,9 @@
824 awbpiece: undefined, 831 awbpiece: undefined,
825 awbweight: undefined, 832 awbweight: undefined,
826 rcfdep: 'MT5202', 833 rcfdep: 'MT5202',
  834 + user: {
  835 + username: JSON.parse(sessionStorage.getItem('user')).username
  836 + }
827 } 837 }
828 }, 838 },
829 // 新增出港理货弹框 839 // 新增出港理货弹框
@@ -846,6 +856,7 @@ @@ -846,6 +856,7 @@
846 // 新增出港理货请求 856 // 新增出港理货请求
847 createData() { 857 createData() {
848 this.$refs.tidyFormData.validate(valid => { 858 this.$refs.tidyFormData.validate(valid => {
  859 + console.log(this.tidyModel)
849 if (valid) { 860 if (valid) {
850 addMt520X(this.tidyModel).then(res => { 861 addMt520X(this.tidyModel).then(res => {
851 if (res.data.count > 0) { 862 if (res.data.count > 0) {
@@ -875,10 +886,16 @@ @@ -875,10 +886,16 @@
875 }, 886 },
876 // 更新出港理货请求 887 // 更新出港理货请求
877 updateData() { 888 updateData() {
  889 + let _this = this;
878 this.$refs.tidyFormData.validate(valid => { 890 this.$refs.tidyFormData.validate(valid => {
879 if (valid) { 891 if (valid) {
880 delete this.tidyModel.parent 892 delete this.tidyModel.parent
881 delete this.tidyModel.children 893 delete this.tidyModel.children
  894 +
  895 + _this.tidyModel.user= {
  896 + username : JSON.parse(sessionStorage.getItem('user')).username
  897 + }
  898 +
882 updateMt520X(this.tidyModel).then(res => { 899 updateMt520X(this.tidyModel).then(res => {
883 console.log(res.data) 900 console.log(res.data)
884 if (res.data.count > 0) { 901 if (res.data.count > 0) {