作者 小范

进港快件新增8个界面

1 import http from './http.js' 1 import http from './http.js'
2 let baseUrl = 'nmms-server-import/nmms/mt1201' 2 let baseUrl = 'nmms-server-import/nmms/mt1201'
3 let baseUrlCross = 'nmms-server-import/nmms/crossday' 3 let baseUrlCross = 'nmms-server-import/nmms/crossday'
  4 +let baseUrl2 = 'nmms-server-import/nmms/awbm'
  5 +
  6 +
  7 +//进港快件
  8 +//快件导入
  9 +export const importExcelAWBM=params=>{return http.get(`${baseUrl2}/importExcelAWBM`, params);};
  10 +//获取进港快件列表
  11 +export const getAWBM1List=params=>{return http.get(`${baseUrl2}/getAWBM1List`, params);};
  12 +
4 13
5 //跨天配置 14 //跨天配置
6 export const addCrossday=params=>{return http.post(`${baseUrlCross}/addCrossday`, params);}; 15 export const addCrossday=params=>{return http.post(`${baseUrlCross}/addCrossday`, params);};
  1 +<template>
  2 + <el-container>
  3 + <el-main>
  4 + <div style="background-color:white;padding-top: 20px;padding-bottom: 20px ">
  5 + <el-row>
  6 + <el-col :span="6">
  7 + <el-upload
  8 + class="upload-demo"
  9 + action="https://jsonplaceholder.typicode.com/posts/"
  10 + :on-preview="handlePreview"
  11 + :on-remove="handleRemove"
  12 + :before-remove="beforeRemove"
  13 + multiple
  14 + :limit="3"
  15 + :on-exceed="handleExceed"
  16 + :file-list="fileList">
  17 + <el-button size="small" type="primary">点击上传原始数据</el-button>
  18 + <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
  19 + </el-upload>
  20 + </el-col>
  21 + <el-col :span="6">
  22 + <el-upload
  23 + class="upload-demo"
  24 + action="https://jsonplaceholder.typicode.com/posts/"
  25 + :on-preview="handlePreview"
  26 + :on-remove="handleRemove"
  27 + :before-remove="beforeRemove"
  28 + multiple
  29 + :limit="3"
  30 + :on-exceed="handleExceed"
  31 + :file-list="fileList">
  32 + <el-button size="small" type="primary">点击上传理货数据</el-button>
  33 + <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
  34 + </el-upload>
  35 + </el-col>
  36 + </el-row>
  37 + </div>
  38 + </el-main>
  39 + </el-container>
  40 +</template>
  41 +<!--自定义CSS-->
  42 +<style scoped>
  43 + .el-container{text-align: center}
  44 + .el-main{margin:0 auto;height:400px;}
  45 + p{font-size:25px;font-weight: bold;}
  46 + .row-bg{padding:30px 0;}
  47 + .el-form-item {margin-bottom: 0px;}
  48 +</style>
  49 +
  50 +<script>
  51 + import { selectAirport } from '../../api/mt1201'
  52 + import jsutil from "@/common/js/util";
  53 + export default {
  54 + data() {
  55 + return {
  56 + };
  57 + },
  58 + methods:{
  59 + },
  60 + computed:{
  61 + },
  62 + /*渲染方法*/
  63 + activated(){
  64 + },
  65 + };
  66 +</script>
  67 +
  1 +<template>
  2 + <el-container>
  3 + <el-main>
  4 + <!--检索条件-->
  5 + <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  6 + <el-row>
  7 + <el-col :span="24"><div class="grid-content"><p>请输入航班信息:</p></div></el-col>
  8 + </el-row>
  9 + <el-row>
  10 + <el-col :span="24"><div class="grid-content"><h1>Please Enter The Flight Information:</h1></div></el-col>
  11 + </el-row>
  12 + <el-row type="flex" class="row-bg" justify="center" style="margin-top: 30px">
  13 + <el-col :span="5">
  14 + <el-form-item label="航班号" prop="flightno">
  15 + <el-input placeholder="" v-model="flightno" style="width:100%"></el-input>
  16 + </el-form-item>
  17 + </el-col>
  18 + <el-col :span="6">
  19 + <el-form-item label="航班日期" required>
  20 + <el-col :span="24">
  21 + <el-form-item prop="flightdate">
  22 + <el-date-picker type="date" placeholder="选择日期" :clearable="false" v-model="ruleForm.flightdate" style="width: 100%;"></el-date-picker>
  23 + </el-form-item>
  24 + </el-col>
  25 + </el-form-item>
  26 + </el-col>
  27 + <el-col :span="5">
  28 + <el-form-item label="始发站" prop="originstation">
  29 + <el-select v-model="originstation"
  30 + filterable
  31 + allow-create
  32 + default-first-option
  33 + remote
  34 + :remote-method="remoteMethod"
  35 + :loading="loading"
  36 + placeholder="请选择">
  37 + <el-option
  38 + v-for="item in options"
  39 + :key="item.airportid"
  40 + :label="item.airportid"
  41 + :value="item.airportid">
  42 + <span style="float: left">{{ item.airportid }}</span>
  43 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportdescchn }}</span>
  44 + </el-option>
  45 + </el-select>
  46 + </el-form-item>
  47 + </el-col>
  48 + <el-col :span="5">
  49 + <el-form-item label="目的站" prop="destinationstation">
  50 + <el-select v-model="destinationstation" filterable
  51 + allow-create
  52 + default-first-option
  53 + remote
  54 + :remote-method="remoteMethod"
  55 + :loading="loading" placeholder="请选择">
  56 + <el-option
  57 + v-for="item in options2"
  58 + :key="item.airportid"
  59 + :label="item.airportid"
  60 + :value="item.airportid">
  61 + <span style="float: left">{{ item.airportid }}</span>
  62 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportdescchn }}</span>
  63 + </el-option>
  64 + </el-select>
  65 + </el-form-item>
  66 + </el-col>
  67 + </el-row>
  68 + <el-row>
  69 + <el-col :span="4" :offset="10">
  70 + <div class="grid-content">
  71 + <el-button type="primary" @click="submitForm('ruleForm')">下一步</el-button>
  72 + </div>
  73 + </el-col>
  74 + </el-row>
  75 + </el-form>
  76 + </el-main>
  77 + </el-container>
  78 +</template>
  79 +<!--自定义CSS-->
  80 +<style scoped>
  81 + .el-container{text-align: center}
  82 + .el-main{margin:0 auto;height:400px;}
  83 + p{font-size:25px;font-weight: bold;}
  84 + .row-bg{padding:30px 0;}
  85 + .el-form-item {margin-bottom: 0px;}
  86 +</style>
  87 +
  88 +<script>
  89 + import { selectAirport } from '../../api/mt1201'
  90 + import jsutil from "@/common/js/util";
  91 + export default {
  92 + data() {
  93 + return {
  94 + /*初始化值*/
  95 + ruleForm: {
  96 + flightno:'',
  97 + flightdate:'',
  98 + originstation:'',
  99 + destinationstation:''
  100 + },
  101 + options: [],
  102 + options2:[],
  103 + airportid:'',
  104 + loading: false,
  105 + /*表单校验规则*/
  106 + rules: {
  107 + flightno: [
  108 + {required: true, message: '请输入航班号', trigger: 'blur'},
  109 + {min: 3, max: 6, message: '输入不符合规范', trigger: 'blur'}
  110 + ],
  111 + originstation: [
  112 + {required: true, message: '请输入航班起始站', trigger: 'blur'},
  113 + {min: 3, max: 3, message: '长度为 3 ', trigger: 'blur'}
  114 + ],
  115 + destinationstation: [
  116 + {required: true, message: '请输入目的站', trigger: 'blur'},
  117 + {min: 3, max: 3, message: '长度为 3 ', trigger: 'blur'}
  118 + ],
  119 + flightdate: [
  120 + { required: true, message: '请选择日期', trigger: 'blur' }
  121 + ]
  122 + }
  123 + };
  124 + },
  125 + methods:{
  126 + remoteMethod:function(query) {
  127 + this.options = [];
  128 + this.options2=[];
  129 + let param={airportid:query};
  130 + this.loading = true;
  131 + selectAirport(param).then(res=>{
  132 + if (res !== '') {
  133 + setTimeout(() => {
  134 + this.loading = false;
  135 + this.options=res.data.data;
  136 + this.options2=res.data.data;
  137 + }, 200);
  138 + } else {
  139 + this.options = [];
  140 + this.options2=[];
  141 + }
  142 + });
  143 + },
  144 + /*按钮点击请求方法*/
  145 + submitForm(formName) {
  146 + this.$refs[formName].validate((valid) => {
  147 + if (valid) {
  148 + this.$router.push(
  149 + {
  150 + path:'/origmasters',
  151 + query:{
  152 + flightno: this.ruleForm.flightno,
  153 + flightdate: this.ruleForm.flightdate,
  154 + originstation: this.ruleForm.originstation,
  155 + destinationstation: this.ruleForm.destinationstation,
  156 + awba: ''
  157 + }
  158 + }
  159 + );
  160 + } else {
  161 + console.log('error submit!!');
  162 + return false;
  163 + }
  164 + });
  165 + },
  166 + /*航班日期格式化方法*/
  167 + dateConversion(value){
  168 + var date = new Date(value);
  169 + date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  170 + return date;
  171 + },
  172 + /*加载默认参数*/
  173 + getDefaultData(){
  174 + if(
  175 + jsutil.checkNull(this.$route.query)
  176 + && jsutil.checkNull(this.$route.query.flightno)
  177 + && jsutil.checkNull(this.$route.query.flightdate)
  178 + && jsutil.checkNull(this.$route.query.originstation)
  179 + && jsutil.checkNull(this.$route.query.destinationstation)
  180 + ){
  181 + this.ruleForm.flightno=(this.$route.query.flightno);
  182 + this.ruleForm.flightdate=(this.$route.query.flightdate);
  183 + this.ruleForm.originstation=(this.$route.query.originstation);
  184 + this.ruleForm.destinationstation=(this.$route.query.destinationstation);
  185 + }
  186 + }
  187 + },
  188 + computed:{
  189 + originstation:{
  190 + get:function () {
  191 + return this.ruleForm.originstation;
  192 + },
  193 + set:function (val) {
  194 + this.ruleForm.originstation=val.toUpperCase();
  195 + }
  196 + },
  197 + destinationstation:{
  198 + get:function () {
  199 + return this.ruleForm.destinationstation;
  200 + },
  201 + set:function (val) {
  202 + this.ruleForm.destinationstation=val.toUpperCase();
  203 + }
  204 + },
  205 + flightno:{
  206 + get:function () {
  207 + return this.ruleForm.flightno;
  208 + },
  209 + set:function (val) {
  210 + this.ruleForm.flightno=val.toUpperCase();
  211 + }
  212 + }
  213 + },
  214 + /*渲染方法*/
  215 + activated(){
  216 + this.getDefaultData();
  217 + //this.getFlightList();
  218 + },
  219 + };
  220 +</script>
  1 +<template>
  2 + <el-container>
  3 + <el-main>
  4 + <!--表单检索条件-->
  5 + <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
  6 + <el-row>
  7 + <el-col :span="24"><div class="grid-content"><p>请输入航班信息:</p></div></el-col>
  8 + </el-row>
  9 + <el-row>
  10 + <el-col :span="24"><div class="grid-content"><h1>Please Enter The Flight Information:</h1></div></el-col>
  11 + </el-row>
  12 + <el-row type="flex" class="row-bg" justify="center" style="margin-top: 30px">
  13 + <el-col :span="5">
  14 + <el-form-item label="航班号" prop="flightno">
  15 + <el-input onkeyup="value=value.replace(/[\u4e00-\u9fa5]/ig,'')" placeholder="" v-model="flightno" style="width:100%"></el-input>
  16 + </el-form-item>
  17 + </el-col>
  18 + <el-col :span="6">
  19 + <el-form-item label="航班日期" required>
  20 + <el-col :span="24">
  21 + <el-form-item prop="flightdate">
  22 + <el-date-picker type="date" placeholder="选择日期" :clearable="false" v-model="ruleForm.flightdate" style="width: 100%;"></el-date-picker>
  23 + </el-form-item>
  24 + </el-col>
  25 + </el-form-item>
  26 + </el-col>
  27 + <el-col :span="5">
  28 + <!--<el-form-item label="始发站" prop="originstation">
  29 + <el-input placeholder="" v-model="ruleForm.originstation"></el-input>
  30 + </el-form-item>-->
  31 + <el-form-item label="始发站" prop="originstation">
  32 + <el-select v-model="originstation" filterable
  33 + allow-create
  34 + default-first-option
  35 + remote
  36 + :remote-method="remoteMethod"
  37 + :loading="loading"
  38 + placeholder="请选择">
  39 + <el-option
  40 + v-for="item in options"
  41 + :key="item.airportid"
  42 + :label="item.airportid"
  43 + :value="item.airportid">
  44 + <span style="float: left">{{ item.airportid }}</span>
  45 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportdescchn }}</span>
  46 + </el-option>
  47 + </el-select>
  48 + </el-form-item>
  49 + </el-col>
  50 + <el-col :span="5">
  51 + <!--<el-form-item label="目的站" prop="destinationstation">
  52 + <el-input placeholder="" v-model="ruleForm.destinationstation" :disabled="true"></el-input>
  53 + </el-form-item>-->
  54 + <el-form-item label="目的站" prop="destinationstation">
  55 + <el-select v-model="destinationstation"
  56 + filterable
  57 + allow-create
  58 + default-first-option
  59 + remote
  60 + :remote-method="remoteMethod"
  61 + :loading="loading"
  62 + placeholder="请选择">
  63 + <el-option
  64 + v-for="item in options"
  65 + :key="item.airportid"
  66 + :label="item.airportid"
  67 + :value="item.airportid">
  68 + <span style="float: left">{{ item.airportid }}</span>
  69 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.airportdescchn }}</span>
  70 + </el-option>
  71 + </el-select>
  72 + </el-form-item>
  73 + </el-col>
  74 + </el-row>
  75 + <el-row>
  76 + <el-col :span="4" :offset="10">
  77 + <div class="grid-content">
  78 + <el-button type="primary" @click="submitForm('ruleForm')">下一步</el-button>
  79 + </div>
  80 + </el-col>
  81 + </el-row>
  82 + </el-form>
  83 + </el-main>
  84 + </el-container>
  85 +</template>
  86 +<!--自定义CSS-->
  87 +<style scoped>
  88 + .el-container{text-align: center}
  89 + .el-main{margin:0 auto;height:400px;}
  90 + p{font-size:25px;font-weight: bold;}
  91 + .row-bg{padding:30px 0;}
  92 + .el-form-item {margin-bottom: 0px;}
  93 +</style>
  94 +
  95 +<script>
  96 + import { selectAirport } from '../../api/mt1201'
  97 + import jsutil from "@/common/js/util";
  98 +
  99 + export default {
  100 + data() {
  101 + return {
  102 + /*初始化值*/
  103 + ruleForm: {
  104 + flightno: '',
  105 + flightdate:'',
  106 + originstation:'',
  107 + destinationstation:'',
  108 + },
  109 + options: [],
  110 + airportid:'',
  111 + loading: false,
  112 + /*表单验证方法*/
  113 + rules: {
  114 + flightno: [
  115 + {required: true, message: '请输入航班号', trigger: 'blur'},
  116 + {min: 3, max: 6, message: '输入不符合规范', trigger: 'blur'}
  117 + ],
  118 + originstation: [
  119 + {required: true, message: '请输入航班起始站', trigger: 'blur'},
  120 + {min: 3, max: 3, message: '长度为 3 ', trigger: 'blur'}
  121 + ],
  122 + destinationstation: [
  123 + {required: true, message: '请输入目的站', trigger: 'blur'},
  124 + {min: 3, max: 3, message: '长度为 3 ', trigger: 'blur'}
  125 + ],
  126 + flightdate: [
  127 + { required: true, message: '请选择日期', trigger: 'change' }
  128 + ]
  129 + }
  130 + };
  131 + },
  132 + computed:{
  133 + originstation:{
  134 + get:function () {
  135 + return this.ruleForm.originstation;
  136 + },
  137 + set:function (val) {
  138 + this.ruleForm.originstation=val.toUpperCase();
  139 + }
  140 + },
  141 + destinationstation:{
  142 + get:function () {
  143 + return this.ruleForm.destinationstation;
  144 + },
  145 + set:function (val) {
  146 + this.ruleForm.destinationstation=val.toUpperCase();
  147 + }
  148 + },
  149 + flightno:{
  150 + get:function () {
  151 + return this.ruleForm.flightno;
  152 + },
  153 + set:function (val) {
  154 + this.ruleForm.flightno=val.toUpperCase();
  155 + }
  156 + }
  157 + },
  158 + methods:{
  159 + remoteMethod:function(query) {
  160 + this.options = [];
  161 + let params={airportid:query};
  162 + this.loading = true;
  163 + selectAirport(params).then(res=>{
  164 + if (res !== '') {
  165 + setTimeout(() => {
  166 + this.loading = false;
  167 + this.options=res.data.data;
  168 + this.options2=res.data.data;
  169 + }, 200);
  170 + } else {
  171 + this.options = [];
  172 + }
  173 + });
  174 + },
  175 + /*按钮点击请求方法*/
  176 + submitForm(formName) {
  177 + this.$refs[formName].validate((valid) => {
  178 + if (valid) {
  179 + this.$router.push({path:'/tallymasters',query:
  180 + {flightno:JSON.stringify(this.ruleForm.flightno),
  181 + flightdate:JSON.stringify(this.dateConversion(this.ruleForm.flightdate)),
  182 + originstation:JSON.stringify(this.ruleForm.originstation),
  183 + destinationstation:JSON.stringify(this.ruleForm.destinationstation),
  184 + awba:JSON.stringify("")}});
  185 + } else {
  186 + //console.log('error submit!!');
  187 + return false;
  188 + }
  189 + });
  190 + },
  191 + /*航班日期格式化方法*/
  192 + dateConversion(value){
  193 + var date = new Date(value);
  194 + var date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
  195 + return date;
  196 + },
  197 + /*获取默认值方法*/
  198 + getDefaultData(){
  199 + if(
  200 + jsutil.checkNull(this.$route.query)
  201 + && jsutil.checkNull(this.$route.query.flightno)
  202 + && jsutil.checkNull(this.$route.query.flightdate)
  203 + && jsutil.checkNull(this.$route.query.originstation)
  204 + && jsutil.checkNull(this.$route.query.destinationstation)
  205 + )
  206 + {
  207 + this.ruleForm.flightno=(this.$route.query.flightno);
  208 + this.ruleForm.flightdate=(this.$route.query.flightdate);
  209 + this.ruleForm.originstation=(this.$route.query.originstation);
  210 + this.ruleForm.destinationstation=(this.$route.query.destinationstation);
  211 + }
  212 + }
  213 + },
  214 + /*渲染方法*/
  215 + activated(){
  216 + this.getDefaultData();
  217 + }
  218 + };
  219 +
  220 +</script>
  1 +<template>
  2 + <el-container>
  3 + <el-main >
  4 + <!--检索条件-->
  5 + <el-row class="toolbar" style="background-color: white;margin-bottom: 10px">
  6 + <el-col :span="6">
  7 + <template>
  8 + 航班号
  9 + </template>
  10 + <el-input v-model="vcarrier" placeholder="航班号" style="width: 150px">
  11 + </el-input>
  12 + </el-col>
  13 + <el-col :span="6">
  14 + <template>
  15 + 航班日期
  16 + </template>
  17 + <el-date-picker
  18 + v-model="flighttime"
  19 + type="date"
  20 + value-format="yyyy-MM-dd"
  21 + placeholder="航班日期"
  22 + :picker-options="dataPickerOptions"
  23 + style="width: 150px">
  24 + </el-date-picker>
  25 + </el-col>
  26 + <el-col :span="3">
  27 + <el-button type="primary" v-on:click="getFlightList">查询</el-button>
  28 + </el-col>
  29 + </el-row>
  30 + <!--TableList-->
  31 + <el-row>
  32 + <template>
  33 + <el-table
  34 + v-loading="tableloading"
  35 + :data="tableData"
  36 + style="width: 100%"
  37 + :default-sort = "{prop: 'date', order: 'descending'}"
  38 + >
  39 + <el-table-column
  40 + prop="flightno"
  41 + label="航班号"
  42 + >
  43 + </el-table-column>
  44 + <el-table-column
  45 + prop="flightdate"
  46 + label="航班日期"
  47 + >
  48 + </el-table-column>
  49 + <el-table-column
  50 + prop="originstation"
  51 + label="始发站"
  52 + >
  53 + </el-table-column>
  54 + <el-table-column
  55 + prop="destinationstation"
  56 + label="目的站"
  57 + >
  58 + </el-table-column>
  59 + <el-table-column
  60 + fixed="right"
  61 + label="操作"
  62 + width="200">
  63 + <template slot-scope="scope">
  64 + <el-button
  65 + size="mini"
  66 + type="primary"
  67 + @click="handleEdit(scope.$index, scope.row)">原始舱单</el-button>
  68 + <el-button
  69 + size="mini"
  70 + type="success"
  71 + @click="handleDelete(scope.$index, scope.row)">进港理货</el-button>
  72 + </template>
  73 + </el-table-column>
  74 + </el-table>
  75 + </template>
  76 + </el-row>
  77 + <!--分页模块-->
  78 + <el-row style="float: right;margin-top: 20px">
  79 + <div class="block">
  80 + <el-pagination
  81 + @size-change="handleSizeChange"
  82 + @current-change="handleCurrentChange"
  83 + :current-page="currentPage"
  84 + :page-sizes="[10, 20, 30, 40]"
  85 + :page-size="pageSize"
  86 + layout="total, sizes, prev, pager, next, jumper"
  87 + :total="total">
  88 + </el-pagination>
  89 + </div>
  90 + </el-row>
  91 + </el-main>
  92 + </el-container>
  93 +
  94 +</template>
  95 +<style scoped>
  96 + .el-input-group{
  97 + display: table;
  98 + }
  99 +</style>
  100 +
  101 +<script>
  102 + import { selectFlightLists } from '../../api/mt1201'
  103 + import {mapActions, mapGetters} from 'vuex'
  104 + import {loginedUserInfo} from "../../api/user";
  105 + export default {
  106 + name:'OrigFlightLists',
  107 + data() {
  108 + /*初始化值*/
  109 + return {
  110 + carrier:'',
  111 + tableData: [],
  112 + flighttime: undefined,
  113 + currentPage:1,
  114 + pageSize:10,
  115 + total:0,
  116 + tableloading:true,
  117 + departmentid:'',
  118 + dataPickerOptions: {
  119 + shortcuts: [{
  120 + text: '今天',
  121 + onClick(picker) {
  122 + picker.$emit('pick', new Date());
  123 + }
  124 + }, {
  125 + text: '昨天',
  126 + onClick(picker) {
  127 + const date = new Date();
  128 + date.setTime(date.getTime() - 3600 * 1000 * 24);
  129 + picker.$emit('pick', date);
  130 + }
  131 + }, {
  132 + text: '一周前',
  133 + onClick(picker) {
  134 + const date = new Date();
  135 + date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  136 + picker.$emit('pick', date);
  137 + }
  138 + }]
  139 + }
  140 + }
  141 + },
  142 + mounted() {
  143 + this.getdatatime();
  144 + this.getFlightList();
  145 + },
  146 + methods: {
  147 + /*设置默认航班时间*/
  148 + getdatatime(){
  149 + this.flighttime=new Date();
  150 + },
  151 + /*分页方法*/
  152 + handleSizeChange(val) {
  153 + this.pageSize=val;
  154 + this.getFlightList();
  155 + },
  156 + handleCurrentChange(val) {
  157 + this.currentPage=val;
  158 + this.getFlightList();
  159 + },
  160 + /*查询列表请求*/
  161 + getFlightList:function() {
  162 + let params={
  163 + currentPage:this.currentPage,
  164 + pageSize:this.pageSize,
  165 + flighttime:this.flighttime,
  166 + carrier:this.carrier,
  167 + departmentid:loginedUserInfo().companyInfo.departmentid
  168 + };
  169 + this.listLoading = true;
  170 + selectFlightLists(params).then(res=>{
  171 + let response=res.data.data;
  172 + this.tableData=response.list;
  173 + this.tableloading=false;
  174 + this.total=response.total;
  175 + this.listLoading = false;
  176 + });
  177 + },
  178 + /*原始舱单跳转*/
  179 + handleEdit(index, row) {
  180 + // row.waybillType = 'MT1201'
  181 + this.$router.push(
  182 + {
  183 + path:'/enters',
  184 + query:row
  185 + }
  186 + )
  187 + },
  188 + /*进港理货跳转*/
  189 + handleDelete(index, row) {
  190 + // row.waybillType = 'MT5201'
  191 + this.$router.push(
  192 + {
  193 + path:'entertalls',
  194 + query:row
  195 + }
  196 + )
  197 + }
  198 + },
  199 + computed:{
  200 + vcarrier:{
  201 + get:function () {
  202 + return this.carrier;
  203 + },
  204 + set:function (val) {
  205 + this.carrier=val.toUpperCase();
  206 + }
  207 + },
  208 + ...mapGetters(['getUserInfoStore','getUserMenuStore']) // 动态计算属性,相当于this.$store.getters.resturantName
  209 + },
  210 + /*渲染方法*/
  211 + activated() {
  212 + let that=this;
  213 +
  214 + },
  215 + }
  216 +</script>
  217 +
  218 +<style>
  219 + .el-main{padding: 10px 0px 10px 0px; }
  220 + .el-col{margin-right: 10px;}
  221 +</style>
  1 +<template>
  2 + <el-container>
  3 + <el-main style="background-color: white">
  4 + <!--检索条目部分-->
  5 + <el-row class="row-bg">
  6 + <el-col :span="24">
  7 + <div class="grid-content content">航班信息</div>
  8 + </el-col>
  9 + <el-col :span="24">
  10 + <div class="grid-content co">
  11 + <el-col :span="1">
  12 + <div class="grid-content"></div>
  13 + </el-col>
  14 + <el-col :span="20">
  15 + <div class="grid-content">
  16 + <span>航班号:{{defaultQuery.flightno}}</span>
  17 + <span>航班日期:{{defaultQuery.flightdate}}</span>
  18 + <span>航段:{{defaultQuery.originstation}}-{{defaultQuery.destinationstation}}</span>
  19 + </div>
  20 + </el-col>
  21 + </div>
  22 + </el-col>
  23 + <el-col :span="24">
  24 + <div class="grid-content content">进港舱单查询</div>
  25 + </el-col>
  26 + <el-col :span="24">
  27 + <div class="grid-content co">
  28 + <el-col :span="1">
  29 + <div class="grid-content"></div>
  30 + </el-col>
  31 + <el-col :span="22">
  32 + <div class="grid-content">
  33 + <el-col :span="9" class="pub">
  34 + <div class="grid-content">
  35 + <el-input v-model="defaultQuery.awba" placeholder="请输入主单号" style="width: 250px" clearable>
  36 + <template slot="prepend">主单号</template>
  37 + </el-input>
  38 + </div>
  39 + </el-col>
  40 + <el-col :span="3" class="pub">
  41 + <div class="grid-content">
  42 + <el-button type="primary" size="mini" v-on:click="getList" icon="el-icon-search">&nbsp;查&emsp;&nbsp;询&nbsp;</el-button>
  43 + </div>
  44 + </el-col>
  45 + <el-col :span="3" class="pub">
  46 + <div class="grid-content">
  47 + <el-dropdown @command="handleCommand">
  48 + <el-button size="mini" type="success" icon="el-icon-download">
  49 + 导出文件
  50 + </el-button>
  51 + <el-dropdown-menu slot="dropdown">
  52 + <el-dropdown-item command="PDF">导出PDF</el-dropdown-item>
  53 + <el-dropdown-item command="EXCEL">导出EXCEL</el-dropdown-item>
  54 + </el-dropdown-menu>
  55 + </el-dropdown>
  56 + </div>
  57 + </el-col>
  58 + <el-col :span="3">
  59 + <div class="grid-content">
  60 + <el-button type="warning" @click="toggleRowExpansion" icon="el-icon-sort" size="mini">
  61 + 全部{{ isExpansion ? "折叠" : "展开" }}
  62 + </el-button>
  63 + </div>
  64 + </el-col>
  65 + </div>
  66 + </el-col>
  67 + </div>
  68 + </el-col>
  69 + <el-col :span="24">
  70 + <div class="grid-content content" style="margin-top: 6px">舱单明细</div>
  71 + </el-col>
  72 + </el-row>
  73 + <!--查询列表部分-->
  74 + <el-row>
  75 + <el-col :span="24">
  76 + <template>
  77 + <el-table
  78 + class="table"
  79 + id="pdfDom"
  80 + v-loading="tableloading"
  81 + ref="dataTreeList"
  82 + :data="tableData"
  83 + tooltip-effect="dark"
  84 + style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
  85 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
  86 + @selection-change="handleSelectionChange"
  87 + row-key="uuid"
  88 + border
  89 + default-expand-all
  90 + :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
  91 + <el-table-column
  92 + type="selection"
  93 + width="50">
  94 + </el-table-column>
  95 + <el-table-column
  96 + label="运单号"
  97 + width="185">
  98 + <template slot-scope="scope">
  99 + <span v-if="scope.row.awbh==''||scope.row.awbh==null">
  100 + {{scope.row.awba}}<i style="margin-left: 2px" class="el-icon-menu" :style="{'color':scope.row.splitcode=='P'?'rgb(255,77,81)'
  101 + :scope.row.splitcode=='M'?'rgb(255,77,81)':scope.row.splitcode=='D'?'rgb(255,77,81)':'rgba(255,255,255,0)'}"></i>
  102 + </span>
  103 + <span v-else>
  104 + {{scope.row.awbh}}
  105 + </span>
  106 + </template>
  107 + </el-table-column>
  108 + <el-table-column
  109 + prop="awbinfo.pcs"
  110 + label="总件数"
  111 + width="70">
  112 +
  113 + </el-table-column>
  114 + <el-table-column
  115 + prop="awbinfo.weight"
  116 + label="总重量"
  117 + width="70">
  118 + </el-table-column>
  119 + <el-table-column
  120 + prop="piece"
  121 + label="舱单件数"
  122 + width="80">
  123 + <template slot-scope="scope">
  124 + <span v-if="scope.row.awbinfo==null" style="color: #ff4d51;font-weight: bold">
  125 + {{scope.row.piece}}
  126 + </span>
  127 + <span v-else-if="scope.row.awbinfo.pcs!=scope.row.piece" style="color: #ff4d51;font-weight: bold">
  128 + {{scope.row.piece}}
  129 + </span>
  130 + <span v-else>
  131 + {{scope.row.piece}}
  132 + </span>
  133 + </template>
  134 + </el-table-column>
  135 + <el-table-column
  136 + prop="weight"
  137 + label="舱单重量"
  138 + width="100">
  139 + <template slot-scope="scope" style="text-align: center">
  140 + <span v-if="scope.row.awbinfo==null" style="color: #ff4d51;font-weight: bold">
  141 + {{scope.row.weight}}
  142 + </span>
  143 + <span v-else-if="scope.row.weight != scope.row.awbinfo.weight" style="color: #ff4d51;font-weight: bold">
  144 + {{scope.row.weight}}
  145 + </span>
  146 + <span v-else>
  147 + {{scope.row.weight}}
  148 + </span>
  149 + </template>
  150 + </el-table-column>
  151 + <el-table-column
  152 + prop="goodsname"
  153 + label="货品名称"
  154 + width="140">
  155 + </el-table-column>
  156 + <el-table-column
  157 + prop="status"
  158 + label="状态"
  159 + width="100" :formatter="formatStatus">
  160 + </el-table-column>
  161 + <el-table-column
  162 + label="回执内容"
  163 + width="260">
  164 + <template slot-scope="scope">
  165 + <span v-if="scope.row.ext5 && scope.row.ext5.indexOf('异常') != -1" style="color: #F56C6C">
  166 + {{scope.row.ext5}}
  167 + </span>
  168 + <span v-else-if="scope.row.ext5 && scope.row.ext5.indexOf('不通过') != -1" style="color: #F56C6C">
  169 + {{scope.row.ext5}}
  170 + </span>
  171 + <span v-else-if="scope.row.ext5 && scope.row.ext5.indexOf('不接受') != -1" style="color: #F56C6C">
  172 + {{scope.row.ext5}}
  173 + </span>
  174 + <span v-else-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
  175 + {{scope.row.ext5}}
  176 + </span>
  177 + <span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
  178 + {{scope.row.ext5}}
  179 + </span>
  180 + <span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
  181 + {{scope.row.ext5}}
  182 + </span>
  183 + <span v-else style="color: #909399;">
  184 + {{scope.row.ext5}}
  185 + </span>
  186 + </template>
  187 + </el-table-column>
  188 + <el-table-column
  189 + prop="operation"
  190 + label="操作"
  191 + width="380"
  192 + show-overflow-tooltip>
  193 + <template slot-scope="scope">
  194 + <el-row>
  195 + <el-button
  196 + size="mini"
  197 + type="info"
  198 + @click="handleDetail(scope.$index, scope.row)">收发明细
  199 + </el-button>
  200 + <el-button
  201 + v-if="scope.row.awbh==''||scope.row.awbh==null"
  202 + size="mini"
  203 + type="success"
  204 + @click="handleEdit(scope.$index, scope.row)">编辑主单
  205 + </el-button>
  206 + <el-button
  207 + v-else
  208 + size="mini"
  209 + type="success"
  210 + @click="handleFen(scope.$index, scope.row)">编辑分单
  211 + </el-button>
  212 + <el-button
  213 + size="mini"
  214 + type="primary"
  215 + @click="handleSend(scope.$index, scope.row)"
  216 + :disabled="btSendStatusFormater(scope.row.status)">发舱单报
  217 + </el-button>
  218 + <el-button
  219 + size="mini"
  220 + type="warning"
  221 + @click="UpdateStatus(scope.$index, scope.row)">更改状态
  222 + </el-button>
  223 + </el-row>
  224 + <el-row style="margin-bottom: 5px;margin-top: 30px">
  225 +
  226 + <el-button
  227 + v-if="scope.row.awbh==''||scope.row.awbh==null"
  228 + size="mini"
  229 + @click="Importallocation(scope.$index, scope.row)">分拨申请
  230 + </el-button>
  231 + <el-button
  232 + v-else
  233 + disabled=""
  234 + size="mini"
  235 + @click="Importallocation(scope.$index, scope.row)">分拨申请
  236 + </el-button>
  237 + <!-- style="background-color: #63cdda;color: white"-->
  238 + <el-button
  239 + v-if="scope.row.awbh==''||scope.row.awbh==null"
  240 + size="mini"
  241 + @click="Allocatearrive(scope.$index, scope.row)">分拨运抵
  242 + </el-button>
  243 + <el-button
  244 + v-else
  245 + disabled=""
  246 + size="mini"
  247 + @click="Allocatearrive(scope.$index, scope.row)">分拨运抵
  248 + </el-button>
  249 + <!-- style="background-color:#778beb;color: white"-->
  250 + <el-button
  251 + size="mini"
  252 + style="background-color:#f19066;color: white"
  253 + @click="handleUpdate(scope.$index, scope.row)"
  254 + :disabled="btEditStatusFormater(scope.row.status)">发修改报
  255 + </el-button>
  256 + <el-button
  257 + size="mini"
  258 + type="danger"
  259 + @click="handleDelete(scope.$index, scope.row)"
  260 + :disabled="btDeleStatusFormater(scope.row.status)">发删除报
  261 + </el-button>
  262 + </el-row>
  263 +
  264 + </template>
  265 + </el-table-column>
  266 + </el-table>
  267 + </template>
  268 + </el-col>
  269 + </el-row>
  270 + <!--编辑主单-->
  271 + <el-dialog :title="'原始舱单信息'+textMap[dialogStatus]" :visible.sync="outerVisible" width="90%">
  272 + <el-form :model="ruleForm" :rules="rules" ref="ruleForm" :label-position="labelPosition" size="mini">
  273 + <!--航班信息部分-->
  274 + <el-row class="flightInfo">
  275 + <el-col :span="24">
  276 + <div class="grid-content content">航班信息</div>
  277 + </el-col>
  278 + <el-row class="flightInfo">
  279 + <el-col :span="6">
  280 + <el-form-item prop="awba">
  281 + <div v-if="dialogStatus === 'update'">
  282 + <el-input disabled="" v-model="ruleForm.awba" style="width: 200px">
  283 + <template slot="prepend">运单号</template>
  284 + </el-input>
  285 + </div>
  286 + <div v-else>
  287 + <el-input v-model="ruleForm.awba" style="width: 200px">
  288 + <template slot="prepend">运单号</template>
  289 + </el-input>
  290 + </div>
  291 + </el-form-item>
  292 + </el-col>
  293 + <el-col :span="6">
  294 + <el-form-item prop="flightno">
  295 + <el-input disabled="" v-model="ruleForm.flightno" style="width: 200px">
  296 + <template slot="prepend">航班号</template>
  297 + </el-input>
  298 + </el-form-item>
  299 + </el-col>
  300 + <el-col :span="6">
  301 + <el-form-item prop="originstation">
  302 + <el-input disabled="" v-model="ruleForm.originstation" style="width: 200px">
  303 + <template slot="prepend">航段</template>
  304 + </el-input>
  305 + </el-form-item>
  306 + </el-col>
  307 + <el-col :span="6">
  308 + <el-form-item label="" required>
  309 + <el-form-item prop="flightdate">
  310 + <div class="ip">
  311 + 航班日期
  312 + </div>
  313 + <el-date-picker disabled="" type="date" placeholder="选择日期" :clearable="false"
  314 + v-model="ruleForm.flightdate"
  315 + style="width: 145px">
  316 +
  317 + </el-date-picker>
  318 + </el-form-item>
  319 + </el-form-item>
  320 + </el-col>
  321 + </el-row>
  322 + <el-row class="flightInfo">
  323 + <el-col :span="6">
  324 + <el-form-item prop="splitcode">
  325 + <div class="ip">
  326 + 是否分批
  327 + </div>
  328 + <el-select v-model="ruleForm.splitcode" placeholder="" style="width: 110px">
  329 + <el-option v-for="item in splitcodes" :key="item.value" :label="item.label"
  330 + :value="item.value"></el-option>
  331 + </el-select>
  332 + </el-form-item>
  333 + </el-col>
  334 + <el-col :span="1.5">
  335 + <el-form-item prop="splitcode">
  336 + <el-button size="mini" type="primary" @click="dialogStatus==='create'?createData('ruleForm'):updateData('ruleForm')" style="float: right">保存</el-button>
  337 + </el-form-item>
  338 + </el-col>
  339 + </el-row>
  340 + <el-row class="flightInfo">
  341 + <el-col :span="6">
  342 + <div v-if="FenStatus === 'addAwbh'">
  343 + <el-form-item prop="awbh">
  344 + <el-input v-model="ruleForm.awbh" style="width: 200px">
  345 + <template slot="prepend">分单号</template>
  346 + </el-input>
  347 + </el-form-item>
  348 + </div>
  349 + <div v-else>
  350 + <el-form-item style="display: none" prop="awbh" >
  351 + <el-input v-model="ruleForm.awbh" style="width: 200px">
  352 + <template slot="prepend">分单号</template>
  353 + </el-input>
  354 + </el-form-item>
  355 + </div>
  356 + </el-col>
  357 + </el-row>
  358 + </el-row>
  359 + <!--运单信息部分-->
  360 + <el-row class="flightInfo">
  361 + <el-col :span="24">
  362 + <div class="grid-content content">运单信息</div>
  363 + </el-col>
  364 + </el-row>
  365 + <!--航程信息部分-->
  366 + <el-row class="flightInfo">
  367 + <el-col :span="24">
  368 + <el-divider content-position="left">航程信息</el-divider>
  369 + </el-col>
  370 + </el-row>
  371 + <el-row style="margin-bottom: 0px;">
  372 + <el-col :span="6">
  373 + <el-form-item prop="awbinfo.sairportid" >
  374 + <el-input v-model="ruleForm.awbinfo.sairportid" onkeyup="this.value=this.value.toUpperCase()" style="width: 200px">
  375 + <template slot="prepend">起始站</template>
  376 + </el-input>
  377 + </el-form-item>
  378 + </el-col>
  379 + <el-col :span="6">
  380 + <el-form-item prop="awbinfo.by1">
  381 + <el-input v-model="ruleForm.awbinfo.by1" onkeyup="this.value=this.value.toUpperCase()" style="width: 200px">
  382 + <template slot="prepend">承运人1</template>
  383 + </el-input>
  384 + </el-form-item>
  385 + </el-col>
  386 + <el-col :span="6">
  387 + <el-form-item prop="awbinfo.dest1">
  388 + <el-input v-model="ruleForm.awbinfo.dest1" style="width: 200px">
  389 + <template slot="prepend">到达站1</template>
  390 +
  391 + </el-input>
  392 + </el-form-item>
  393 + </el-col>
  394 + <el-col :span="6">
  395 + <el-form-item prop="awbinfo.by2">
  396 + <el-input v-model="ruleForm.awbinfo.by2" onkeyup="this.value=this.value.toUpperCase()" style="width: 200px">
  397 + <template slot="prepend">承运人2</template>
  398 +
  399 + </el-input>
  400 + </el-form-item>
  401 + </el-col>
  402 + </el-row>
  403 + <el-row>
  404 + <el-col :span="6">
  405 + <el-form-item prop="awbinfo.dest2">
  406 + <el-input v-model="ruleForm.awbinfo.dest2" onkeyup="this.value=this.value.toUpperCase()" style="width: 200px">
  407 + <template slot="prepend">到达站2</template>
  408 + </el-input>
  409 + </el-form-item>
  410 + </el-col>
  411 + <el-col :span="6">
  412 + <el-form-item prop="awbinfo.by3">
  413 + <el-input v-model="ruleForm.awbinfo.by3" onkeyup="this.value=this.value.toUpperCase()" style="width: 200px">
  414 + <template slot="prepend">承运人3</template>
  415 + </el-input>
  416 + </el-form-item>
  417 + </el-col>
  418 + <el-col :span="6">
  419 + <el-form-item prop="awbinfo.dest3">
  420 + <el-input v-model="ruleForm.awbinfo.dest3" onkeyup="this.value=this.value.toUpperCase()" style="width: 200px">
  421 + <template slot="prepend">到达站3</template>
  422 + </el-input>
  423 + </el-form-item>
  424 + </el-col>
  425 + <el-col :span="6">
  426 + <el-form-item prop="awbinfo.eairportid">
  427 + <el-input v-model="ruleForm.awbinfo.eairportid" onkeyup="this.value=this.value.toUpperCase()" style="width: 200px">
  428 + <template slot="prepend">目的站</template>
  429 + </el-input>
  430 + </el-form-item>
  431 + </el-col>
  432 + </el-row>
  433 + <!--货物信息部分-->
  434 + <el-row class="flightInfo">
  435 + <el-col :span="24">
  436 + <el-divider content-position="left">货物信息</el-divider>
  437 + </el-col>
  438 + </el-row>
  439 + <el-row style="margin-bottom: 0px;">
  440 + <el-row class="product">
  441 + <el-col :span="6">
  442 + <el-form-item label="" prop="awbinfo.pcs">
  443 + <el-input type="number" v-model="ruleForm.awbinfo.pcs" style="width: 200px">
  444 + <template slot="prepend">总件数</template>
  445 + </el-input>
  446 + </el-form-item>
  447 + </el-col>
  448 + <el-col :span="6">
  449 + <el-form-item label="" prop="awbinfo.weight">
  450 + <el-input type="number" v-model="ruleForm.awbinfo.weight" style="width: 200px">
  451 + <template slot="prepend">总重量</template>
  452 + </el-input>
  453 + </el-form-item>
  454 + </el-col>
  455 + <el-col :span="6">
  456 + <el-form-item label="" prop="piece">
  457 + <el-input type="number" v-model="ruleForm.piece" style="width: 200px">
  458 + <template slot="prepend">舱单件数</template>
  459 + </el-input>
  460 + </el-form-item>
  461 + </el-col>
  462 + <el-col :span="6">
  463 + <el-form-item label="" prop="weight">
  464 + <el-input type="number" v-model="ruleForm.weight" style="width: 200px">
  465 + <template slot="prepend">舱单重量</template>
  466 + </el-input>
  467 + </el-form-item>
  468 + </el-col>
  469 + </el-row>
  470 + <el-row class="product">
  471 + <el-col :span="6">
  472 + <el-form-item label="" prop="specopeid">
  473 + <el-input v-model="ruleForm.awbinfo.specopeid" style="width: 200px">
  474 + <template slot="prepend">特货代码</template>
  475 + </el-input>
  476 + </el-form-item>
  477 + </el-col>
  478 + <el-col :span="6">
  479 + <el-form-item label="" prop="customcode">
  480 + <div class="ip">
  481 + 海关关区
  482 + </div>
  483 + <el-select v-model="ruleForm.customcode"
  484 + filterable
  485 + allow-create
  486 + default-first-option
  487 + remote
  488 + :remote-method="remoteMethod2"
  489 + :loading="loading" placeholder="请选择" style="width: 115px">
  490 + <el-option
  491 + v-for="item in customcodes"
  492 + :key="item.customcode"
  493 + :label="item.customcode"
  494 + :value="item.customcode">
  495 + <span style="float: left">{{ item.customcode }}</span>
  496 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
  497 + </el-option>
  498 + </el-select>
  499 + </el-form-item>
  500 + </el-col>
  501 + <el-col :span="6" >
  502 + <el-form-item label="" prop="awbinfo.awbtype">
  503 + <div class="ip">
  504 + 海关状态
  505 + </div>
  506 + <el-select v-model="ruleForm.awbinfo.awbtype" placeholder="" style="width: 110px">
  507 + <el-option v-for="(item,index) in customext5" :key="index" :label="item.label"
  508 + :value="item.value"></el-option>
  509 + </el-select>
  510 + </el-form-item>
  511 + </el-col>
  512 + <el-col :span="6">
  513 + <el-form-item label="" prop="paymodel">
  514 + <div class="ip">
  515 + 付费方式
  516 + </div>
  517 + <el-select v-model="ruleForm.awbinfo.paymodel" placeholder="" style="width: 120px">
  518 + <el-option v-for="item in paymodel" :key="item.value" :label="item.label"
  519 + :value="item.value"></el-option>
  520 + </el-select>
  521 + </el-form-item>
  522 + </el-col>
  523 + </el-row>
  524 + <el-row class="product">
  525 + <el-col :span="12">
  526 + <el-form-item label="" prop="goodsname">
  527 + <el-input v-model="ruleForm.goodsname" style="width: 100%">
  528 + <template slot="prepend">货物描述</template>
  529 + </el-input>
  530 + </el-form-item>
  531 + </el-col>
  532 + </el-row>
  533 + </el-row>
  534 + <!--发货人信息部分-->
  535 + <el-row class="flightInfo">
  536 + <el-col :span="24">
  537 + <el-divider content-position="left">发货人信息</el-divider>
  538 + </el-col>
  539 + </el-row>
  540 + <el-row style="margin-bottom: 0px;">
  541 + <el-col :span="6">
  542 + <el-form-item label="" prop="awbinfo.shprname">
  543 + <el-input v-model="ruleForm.awbinfo.shprname" style="width: 200px">
  544 + <template slot="prepend">发货人称</template>
  545 + </el-input>
  546 + </el-form-item>
  547 + </el-col>
  548 +
  549 + <el-col :span="6">
  550 + <el-form-item label="" prop="awbinfo.shpraddress">
  551 + <el-input v-model="ruleForm.awbinfo.shpraddress" style="width: 200px">
  552 + <template slot="prepend">地址</template>
  553 + </el-input>
  554 + </el-form-item>
  555 + </el-col>
  556 + <el-col :span="5">
  557 + <el-form-item label="" prop="awbinfo.shprtel">
  558 + <el-input v-model="ruleForm.awbinfo.shprtel" style="width: 200px">
  559 + <template slot="prepend">电话</template>
  560 + </el-input>
  561 + </el-form-item>
  562 + </el-col>
  563 + <el-col :span="7">
  564 + <el-form-item label="" prop="awbinfo.shprcountyr">
  565 + <div class="ip">
  566 + 国家代码
  567 + </div>
  568 + <el-select v-model="ruleForm.awbinfo.shprcountyr"
  569 + filterable
  570 + allow-create
  571 + default-first-option
  572 + remote
  573 + :remote-method="remoteMethod" style="width: 110px"
  574 + :loading="loading" placeholder="请选择">
  575 + <el-option
  576 + v-for="item in shprcountyrs"
  577 + :key="item.countryCode"
  578 + :label="item.countryCode"
  579 + :value="item.countryCode">
  580 + <span style="float: left">{{ item.countryNameCn }}</span>
  581 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.countryCode }}</span>
  582 + </el-option>
  583 + </el-select>
  584 + </el-form-item>
  585 + </el-col>
  586 + </el-row>
  587 + <!--收货人信息部分-->
  588 + <el-row class="flightInfo">
  589 + <el-col :span="24">
  590 + <el-divider content-position="left">收货人信息</el-divider>
  591 + </el-col>
  592 + </el-row>
  593 + <el-row style="margin-bottom: 5px">
  594 + <el-col :span="6">
  595 + <el-form-item label="" prop="awbinfo.cnsnname">
  596 + <el-input v-model="ruleForm.awbinfo.cnsnname" style="width: 200px">
  597 + <template slot="prepend">收货人称</template>
  598 + </el-input>
  599 + </el-form-item>
  600 + </el-col>
  601 +
  602 + <el-col :span="6">
  603 + <el-form-item label="" prop="awbinfo.cnsnaddress">
  604 + <el-input v-model="ruleForm.awbinfo.cnsnaddress" style="width: 200px">
  605 + <template slot="prepend">地址</template>
  606 + </el-input>
  607 + </el-form-item>
  608 + </el-col>
  609 + <el-col :span="5">
  610 + <el-form-item label="" prop="awbinfo.cnsntel">
  611 + <el-input v-model="ruleForm.awbinfo.cnsntel" style="width: 200px">
  612 + <template slot="prepend">电话</template>
  613 + </el-input>
  614 + </el-form-item>
  615 + </el-col>
  616 + <el-col :span="7">
  617 + <el-form-item label="" prop="awbinfo.cnscountyr">
  618 + <div class="ip">
  619 + 国家代码
  620 + </div>
  621 + <el-select v-model="ruleForm.awbinfo.cnscountyr"
  622 + filterable
  623 + allow-create
  624 + default-first-option
  625 + remote
  626 + :remote-method="remoteMethod" style="width: 110px"
  627 + :loading="loading" placeholder="请选择">
  628 + <el-option
  629 + v-for="item in cnscountyrs"
  630 + :key="item.countryCode"
  631 + :label="item.countryCode"
  632 + :value="item.countryCode">
  633 + <span style="float: left">{{ item.countryNameCn }}</span>
  634 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.countryCode }}</span>
  635 + </el-option>
  636 + </el-select>
  637 + </el-form-item>
  638 + </el-col>
  639 + </el-row>
  640 + <!--分单信息部分-->
  641 + <el-row class="flightInfo">
  642 + <el-col :span="24">
  643 + <div class="grid-content content" v-if="dialogStatus === 'update'">
  644 + <span>航班信息</span>
  645 + <el-button type="primary" v-on:click="addFen('ruleForm')" size="mini">新增分单</el-button>
  646 + </div>
  647 + <div class="grid-content content" v-else>
  648 + <span>航班信息</span>
  649 + <el-button type="primary" disabled="" @click="innerVisible = true" size="mini">新增分单</el-button>
  650 + </div>
  651 + </el-col>
  652 + </el-row>
  653 + <!--分单列表-->
  654 + <el-row>
  655 + <el-col :span="24">
  656 + <template>
  657 + <el-table
  658 + :data="tableData2"
  659 + style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
  660 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small">
  661 + <el-table-column
  662 + prop="awbh"
  663 + label="分单号"
  664 + width="150">
  665 + </el-table-column>
  666 + <el-table-column
  667 + prop="pcs"
  668 + label="件数"
  669 + width="120">
  670 + </el-table-column>
  671 + <el-table-column
  672 + prop="wei"
  673 + label="重量"
  674 + width="120">
  675 + </el-table-column>
  676 + <el-table-column
  677 + prop="piece"
  678 + label="舱单件数"
  679 + width="120">
  680 + </el-table-column>
  681 + <el-table-column
  682 + prop="weight"
  683 + label="舱单重量"
  684 + width="120">
  685 + </el-table-column>
  686 + <el-table-column
  687 + prop="goodsname"
  688 + label="货物名称"
  689 + width="300">
  690 + </el-table-column>
  691 + <el-table-column
  692 + fixed="right"
  693 + label="操作"
  694 + width="130">
  695 + <template slot-scope="scope">
  696 + <el-button @click="handleClick(scope.row)" type="text" size="small">编辑
  697 + </el-button>
  698 + </template>
  699 + </el-table-column>
  700 + </el-table>
  701 + </template>
  702 + </el-col>
  703 + </el-row>
  704 + </el-form>
  705 + </el-dialog>
  706 + <!--footer部分-->
  707 + <el-row style="margin-top: 20px">
  708 + <el-col :span="2.5" class="pub">
  709 + <div class="grid-content">
  710 + <el-button type="primary" size="mini" v-on:click="addOrig()">新增原始舱单</el-button>
  711 + </div>
  712 + </el-col>
  713 + <el-col :span="2.5" class="pub">
  714 + <div class="grid-content">
  715 + <el-button type="primary" size="mini" :disabled="batich" @click="batchdel()">批量发送删除报</el-button>
  716 + </div>
  717 + </el-col>
  718 + <el-col :span="2.5" class="pub">
  719 + <div class="grid-content">
  720 + <el-button type="primary" size="mini" :disabled="batich" @click="batchaplly()">批量申请</el-button>
  721 + </div>
  722 + </el-col>
  723 + <el-col :span="1.5" class="pub">
  724 + <div class="grid-content">
  725 + <el-button type="primary" @click="back" size="mini">返回</el-button>
  726 + </div>
  727 + </el-col>
  728 + <el-col :span="2.5" class="pub">
  729 + <div class="grid-content"><span>主单数:{{sumNmmsCount}}</span></div>
  730 + </el-col>
  731 + <el-col :span="3.5" class="pub">
  732 + <div class="grid-content"><span>舱单总件数:{{sumNmmsPrice}}</span></div>
  733 + </el-col>
  734 + <el-col :span="7.5" class="pub">
  735 + <div class="grid-content"><span>舱单总重量:{{sumNmmsWeight}}</span></div>
  736 + </el-col>
  737 + </el-row>
  738 + <!--对话提示框-->
  739 + <el-row>
  740 + <el-dialog
  741 + title="系统提示"
  742 + :visible.sync="centerDialogVisible"
  743 + width="30%"
  744 + center>
  745 + <span>{{msg}}</span>
  746 + <span slot="footer" class="dialog-footer">
  747 + <el-button @click="centerDialogVisible = false">取 消</el-button>
  748 + <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
  749 + </span>
  750 + </el-dialog>
  751 + </el-row>
  752 + <!--发送删除报修改报提示框-->
  753 + <el-row>
  754 + <el-dialog :title="'提交'+Reason[udStatus]+'信息'" :visible.sync="dialogFormVisible">
  755 + <el-form :model="Udform" :rules="udrules" ref="Udform" class="demo-ruleForm">
  756 + <el-row style="margin: 10px auto">
  757 + <el-col :span="22">
  758 + <el-form-item label="" prop="operreason">
  759 + <div class="ip">
  760 + 操作原因
  761 + </div>
  762 + <el-input autosize type="textarea" v-model="Udform.operreason" style="width: 80%">
  763 + </el-input>
  764 + </el-form-item>
  765 + </el-col>
  766 + </el-row>
  767 + <el-row>
  768 + <el-col :span="11" style="margin-right: 10px">
  769 + <el-form-item label="" prop="operperson">
  770 + <el-input v-model="Udform.operperson" style="width: 200px">
  771 + <template slot="prepend">操作人</template>
  772 + </el-input>
  773 + </el-form-item>
  774 + </el-col>
  775 + <el-col :span="10">
  776 + <el-form-item label="" prop="opertel">
  777 + <el-input v-model="Udform.opertel" style="width: 250px">
  778 + <template slot="prepend">联系电话</template>
  779 + </el-input>
  780 + </el-form-item>
  781 + </el-col>
  782 + </el-row>
  783 + </el-form>
  784 + <div slot="footer" class="dialog-footer" style="margin-top: 30px" align="center">
  785 + <el-button @click="dialogFormVisible = false">取 消</el-button>
  786 + <el-button type="primary" @click="udStatus==='delete'?deleteUdForm('Udform'):updateUdForm('Udform')">确 定</el-button>
  787 + </div>
  788 + </el-dialog>
  789 + </el-row>
  790 + <!--明细列表弹出框-->
  791 + <el-row>
  792 + <el-dialog title="回执明细列表" :visible.sync="dialogTableVisible" width="70%">
  793 + <el-table :data="gridData" style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
  794 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small">
  795 + <el-table-column property="busdate" label="时间" width="160"></el-table-column>
  796 + <el-table-column property="operusername" label="操作人" width="130"></el-table-column>
  797 + <el-table-column property="buspiece" label="发送件数" width="130"></el-table-column>
  798 + <el-table-column property="busweight" label="发送重量" width="130"></el-table-column>
  799 + <el-table-column property="cusrestext" label="回执内容"></el-table-column>
  800 + </el-table>
  801 + </el-dialog>
  802 + </el-row>
  803 + </el-main>
  804 + </el-container>
  805 +</template>
  806 +<!--自定义CSS样式-->
  807 +<style scoped>
  808 + .ip{
  809 + max-width: 100px;
  810 + margin-right: -4px;
  811 + display: inline-block;
  812 + background-color: #6F8294;
  813 + color: #ffffff;
  814 + border: 1px solid #DCDFE6;
  815 + vertical-align: middle;
  816 + padding: 0 18px;
  817 + white-space: nowrap;
  818 + border-top-right-radius: 0px;
  819 + border-top-left-radius: 4px;
  820 + border-bottom-left-radius: 4px;
  821 + border-bottom-right-radius: 0px;
  822 + font-size: 10px;
  823 + }
  824 + .grid-content {
  825 + height: 36px;
  826 + line-height: 36px;
  827 + }
  828 + .el-dialog__body{text-align: center}
  829 + .content {
  830 + border-left: 4px #409EFF solid;
  831 + padding-left: 10px;
  832 + background-color: #f9fafc;
  833 + margin-bottom: 2px
  834 + }
  835 +
  836 + .row-bg, .co {
  837 + background-color: white;
  838 + }
  839 +
  840 + span {
  841 + font-weight: bold;
  842 + margin-right: 35px;
  843 + }
  844 +
  845 + .el-table td, .el-table th {
  846 + text-align: center
  847 + }
  848 +
  849 + .el-form-item {
  850 + margin-bottom: 2px;
  851 + }
  852 +
  853 + .flightInfo {
  854 + margin-bottom: 0px
  855 + }
  856 +
  857 + .el-dialog__body {
  858 + padding: 10px 20px;
  859 + }
  860 +
  861 + .el-col {
  862 + margin-right: 0px
  863 + }
  864 +
  865 + .product {
  866 + margin-bottom: 5px;
  867 + }
  868 +
  869 + .pub {
  870 + margin-right: 10px;
  871 + }
  872 + .el-dropdown {
  873 + vertical-align: top;
  874 + }
  875 + .el-dropdown + .el-dropdown {
  876 + margin-left: 15px;
  877 + }
  878 + .el-icon-arrow-down {
  879 + font-size: 12px;
  880 + }
  881 +</style>
  882 +
  883 +<script>
  884 + import { getMt1201List,addMt1201,ediMt1201,getFenList,getCountryCode,selectCustomcode,sendCreateMt1201,sendEditeMt1201,sendRemoveMt1201,sendBatchDelMt1201,sendBatchApllyMt1201 } from '../../api/mt1201'
  885 + import{addResponse,selectResponseList} from "../../api/InResponse";
  886 + import FileSaver from "file-saver";
  887 + import XLSX from "xlsx";
  888 + import htmlToPdf from "../../api/htmlToPdf";
  889 + import loginUserInfo from '@/api/base.js'
  890 + import {mapActions, mapGetters} from 'vuex'
  891 + import {loginedUserInfo} from "../../api/user";
  892 + import jsutil from "@/common/js/util";
  893 + export default {
  894 + name:'Origmasters',
  895 + data() {
  896 + /*初始数据*/
  897 + return {
  898 + isExpansion:true,
  899 + defaultQuery:{
  900 + flightno: undefined,
  901 + flightdate: undefined,
  902 + originstation: undefined,
  903 + destinationstation: undefined,
  904 + awba: undefined
  905 + },
  906 + LoginUserInfo: loginedUserInfo(),
  907 + FenQuery:{
  908 + flightno: undefined,
  909 + flightdate: undefined,
  910 + originstation: undefined,
  911 + destinationstation: undefined,
  912 + awba: undefined
  913 + },
  914 + tableData: [],
  915 + tableData2: [],
  916 + multipleSelection: [],
  917 + outerVisible: false,
  918 + innerVisible: false,
  919 + dialogStatus:'',
  920 + textMap:{
  921 + update: '编辑',
  922 + create: '添加'
  923 + },
  924 + Reason:{
  925 + update: '修改',
  926 + delete: '删除'
  927 + },
  928 + ruleForm: {
  929 + awba: undefined,
  930 + awbh: undefined,
  931 + passage: undefined,
  932 + customcode: undefined,
  933 + flightno: undefined,
  934 + flightdate: undefined,
  935 + originstation: undefined,
  936 + destinationstation: undefined,
  937 + piece: undefined,
  938 + weight: undefined,
  939 + goodsname: undefined,
  940 + splitcode: 'T',
  941 + isDelete:0,
  942 + uldType: undefined,
  943 + uldNo: undefined,
  944 + status: '22',
  945 + awbinfo: {
  946 + specopeid: undefined,
  947 + shprname: undefined,
  948 + shprmobiletype: undefined,
  949 + shprtel: undefined,
  950 + shpraddress: undefined,
  951 + shprcountyr: undefined,
  952 + shpcomidpre: undefined,
  953 + shpcomidpno: undefined,
  954 + cnsnname: undefined,
  955 + cnsrmobiletype: undefined,
  956 + cnsntel: undefined,
  957 + cnsnaddress: undefined,
  958 + cnscountyr: undefined,
  959 + cnscomidpre: undefined,
  960 + cnscomidno: undefined,
  961 + cnsrctcname: undefined,
  962 + cnsrctctel: undefined,
  963 + cargonm: undefined,
  964 + sairportid: '',
  965 + dest1city: undefined,
  966 + by1: undefined,
  967 + dest1: undefined,
  968 + by2: undefined,
  969 + dest2: undefined,
  970 + by3: undefined,
  971 + dest3: undefined,
  972 + eairportid: undefined,
  973 + csgcustomerid: undefined,
  974 + paymodel: 'PP',
  975 + pcs: undefined,
  976 + weight: undefined,
  977 + awbtype:'001',
  978 + },
  979 + userinfo: {
  980 + username: loginedUserInfo().username
  981 + },
  982 + waybill:undefined,
  983 + customText:undefined
  984 + },
  985 + paymodel:[{value:'PP',label:'预付'},{value:'CC',label:'到付'}],
  986 + customext5: [
  987 + {value:'001',label:'普通货物'},
  988 + {value:'002',label:'国际转运货物'},
  989 + {value:'003',label:'国内转关'},
  990 + {value:'004',label:'空箱'},
  991 + {value:'005',label:'快件'}],
  992 + customcodes:[],
  993 + customcode:'',
  994 + rules: {
  995 + waybill: [{required: true, message: '请输入运单号', trigger: 'blur'}],
  996 + flightno: [{required: true, message: '航班号必须输入', trigger: 'blur'}],
  997 + flightdate: [{required: true, message: '航班日期必须选择', trigger: 'blur'}],
  998 + originstation: [{required: true, message: '航段必须输入', trigger: 'blur'}],
  999 + splitcode: [{required: true, message: '必须选择', trigger: 'blur'}],
  1000 + piece: [{required: true, message: '舱单件数必须输入且为数字', trigger: 'blur'}],
  1001 + weight: [{required: true, message: '舱单重量必须输入且为数字', trigger: 'blur'}],
  1002 + 'awbinfo.sairportid': [{required: false, message: '起始站必须输入', trigger: 'blur'}],
  1003 + 'awbinfo.eairportid': [{required: true, message: '目的站必须输入', trigger: 'blur'}],
  1004 + 'awbinfo.by1': [{required: true, message: '第一承运人必须输入', trigger: 'blur'}],
  1005 + 'awbinfo.dest1': [{required: true, message: '第一到达站人必须输入', trigger: 'blur'}],
  1006 + 'awbinfo.pcs': [{required: true, message: '总件数必须输入且为数字', trigger: 'blur'}],
  1007 + 'awbinfo.weight': [{required: true, message: '总重量必须输入且为数字', trigger: 'blur'}],
  1008 + 'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'blur'}],
  1009 + 'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'blur'}],
  1010 + 'awbinfo.shpraddress': [{required: true, message: '发货地址不能为空', trigger: 'blur'}],
  1011 + 'awbinfo.shprcountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
  1012 + 'awbinfo.cnsnname': [{required: true, message: '收货人不能为空', trigger: 'blur'}],
  1013 + 'awbinfo.cnsntel': [{required: true, message: '收货电话不能为空', trigger: 'blur'}],
  1014 + 'awbinfo.cnsnaddress': [{required: true, message: '收获地址不能为空', trigger: 'blur'}],
  1015 + 'awbinfo.cnscountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
  1016 + 'awbinfo.paymodel':[{required: true, message: '付费方式必须选择', trigger: 'change'}],
  1017 + 'awbinfo.awbtype':[{required: true, message: '海关状态必须选择', trigger: 'change'}],
  1018 + customcode:[{required: true, message: '海关关区必须选择', trigger: 'change'}],
  1019 + goodsname:[{required: true, message: '货物描述必须填写', trigger: 'blur'}]
  1020 + },
  1021 + labelPosition: 'left',
  1022 + splitcodes: [{value:'T',label:'否'},{value:'P',label:'是'}],
  1023 + shprcountyrs:[],
  1024 + cnscountyrs:[],
  1025 + countryCode:'',
  1026 + msg:'',
  1027 + code:'',
  1028 + centerDialogVisible:false,
  1029 + FenStatus:'',
  1030 + sumNmmsCount:0,
  1031 + sumNmmsPrice:0,
  1032 + sumNmmsWeight:0,
  1033 + dialogFormVisible: false,
  1034 + formLabelWidth: '100px',
  1035 + Udform:{
  1036 + operreason:'',
  1037 + operperson:'',
  1038 + opertel:'',
  1039 + flightdate:'',
  1040 + flightno:'',
  1041 + carrier:'',
  1042 + awbano:'',
  1043 + awbhno:'',
  1044 + bustype:'',
  1045 + busdate:'',
  1046 + busweight:'',
  1047 + buspiece:'',
  1048 + opertype:'',
  1049 + cusrestext:''
  1050 + },
  1051 + udrules:{
  1052 + operreason: [{required: true, message: '请输入操作原因', trigger: 'blur'}],
  1053 + operperson: [{required: true, message: '请输入操作人', trigger: 'blur'}],
  1054 + opertel: [{required: true, message: '请输入操作人联系电话', trigger: 'blur'}],
  1055 + },
  1056 + udStatus:'',
  1057 + loading:false,
  1058 + temprows:{},
  1059 + dialogTableVisible:false,
  1060 + gridData:[],
  1061 + tableloading:false,
  1062 + htmlTitle:'',
  1063 + batich:true,
  1064 + batichboolean:false,
  1065 + uuids:[],
  1066 + }
  1067 + },
  1068 + methods: {
  1069 + toggleRowExpansion() {
  1070 + this.isExpansion = !this.isExpansion;
  1071 + this.toggleRowExpansionAll(this.tableData, this.isExpansion);
  1072 + },
  1073 + toggleRowExpansionAll(data, isExpansion) {
  1074 + data.forEach((item) => {
  1075 + this.$refs.dataTreeList.toggleRowExpansion(item, isExpansion);
  1076 + if (item.children !== undefined && item.children !== null) {
  1077 + this.toggleRowExpansionAll(item.children, isExpansion);
  1078 + }
  1079 + });
  1080 + },
  1081 + //导出PDF,EXCEL文件
  1082 + handleCommand(command) {
  1083 + if(command=='EXCEL'){
  1084 + this.$message('正在为您下载' + command+'文件');
  1085 + this.downLoad();
  1086 + }else{
  1087 + this.htmlTitle=this.defaultQuery.flightno+this.defaultQuery.flightdate;
  1088 + htmlToPdf.downloadPDF(document.querySelector('#pdfDom'), this.htmlTitle)
  1089 + this.$message('正在为您下载' + command+'文件');
  1090 + //this.getPdf();
  1091 + }
  1092 + },
  1093 + downLoad(){
  1094 + var wb = XLSX.utils.table_to_book(document.querySelector(".table"));
  1095 + var wbout = XLSX.write(wb, {
  1096 + bookType: "xlsx",
  1097 + bookSST: true,
  1098 + type: "array"
  1099 + });
  1100 + try {
  1101 + FileSaver.saveAs(
  1102 + new Blob([wbout], { type: "application/octet-stream" }),
  1103 + this.defaultQuery.flightno+this.defaultQuery.flightdate+ ".xlsx" // name+'.xlsx'表示导出的excel表格名字
  1104 + );
  1105 + } catch (e) {
  1106 + if (typeof console !== "undefined") console.log(e, wbout);
  1107 + }
  1108 + return wbout;
  1109 + },
  1110 + //回执收发明细
  1111 + handleDetail(index,row){
  1112 + if(row.flightno.length>4){
  1113 + row.flightno=row.flightno.substring(2);
  1114 + }
  1115 + let params={awbano:row.awba,awbhno:row.awbh,carrier:row.carrier,flightno:row.flightno,flightdate:row.flightdate,bustype:'MT1201'}
  1116 + selectResponseList(params).then(res=>{
  1117 + this.dialogTableVisible=true;
  1118 + let response=res.data.data;
  1119 + this.gridData=response;
  1120 + console.log(response)
  1121 + });
  1122 + },
  1123 + //更改状态
  1124 + UpdateStatus(column,row){
  1125 + this.$confirm("是否发送更改状态", "确认消息", {
  1126 + distinguishCancelAndClose: true,
  1127 + confirmButtonText: '确认更改',
  1128 + cancelButtonText: '取消更改'
  1129 + }).then(() => {
  1130 + row.status = '22';
  1131 + }).catch(action => {
  1132 + this.$message({
  1133 + type: 'info',
  1134 + message: action === 'cancel'
  1135 + ? '取消状态更改'
  1136 + : '状态更改取消'
  1137 + })
  1138 + })
  1139 + },
  1140 + //状态识别
  1141 + formatStatus: function(row,column){
  1142 + return row.status=='01'?'接受申报':row.status=='02'?'待人工审核':row.status=='03'?'退单'
  1143 + :row.status=='11'?'放行':row.status=='12'?'拒装':row.status=='13'?'禁卸'
  1144 + :row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
  1145 + :row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
  1146 + },
  1147 + //发送舱单报按钮,删除,修改判定事件
  1148 + btSendStatusFormater:(status) => {
  1149 + if(status=='23' || status=='24'||status=='25'){
  1150 + return true;
  1151 + }else if(status=='22' ) {
  1152 + return false;
  1153 + }
  1154 + },
  1155 + btEditStatusFormater:(status) => {
  1156 + if(status=='23' || status=='24'||status=='25'){
  1157 + return true;
  1158 + }else if(status=='22' ) {
  1159 + return false;
  1160 + }
  1161 + },
  1162 + btDeleStatusFormater:(status) => {
  1163 + if(status=='23' || status=='24'||status=='25'){
  1164 + return true;
  1165 + }else if(status=='22' ) {
  1166 + return false;
  1167 + }
  1168 + },
  1169 + /*多选框功能批量选择*/
  1170 + handleSelectionChange(val) {
  1171 + this.multipleSelection = val;
  1172 + if(this.multipleSelection!=null && this.multipleSelection!=""){
  1173 + this.batich=false;
  1174 + }else{
  1175 + this.batich=true;
  1176 + }
  1177 +
  1178 + },
  1179 + //批量删除
  1180 + batchdel(){
  1181 + let ids=[];
  1182 + this.multipleSelection.forEach(function (item) {
  1183 + ids.push(item.uuid);
  1184 + })
  1185 + this.uuids=ids;
  1186 + this.udStatus='delete';
  1187 + this.dialogFormVisible=true;
  1188 + this.batichboolean=true;
  1189 + },
  1190 + //批量申请
  1191 + batchaplly(){
  1192 + let ids=[];
  1193 + this.multipleSelection.forEach(function (item) {
  1194 + ids.push(item.uuid);
  1195 + })
  1196 + sendBatchApllyMt1201(ids).then(res=>{
  1197 + let response=res.data;
  1198 + this.code=response.code;
  1199 + if(this.code=='200'){
  1200 + this.centerDialogVisible=true;
  1201 + this.msg=response.msg;
  1202 + }else{
  1203 + this.centerDialogVisible=true;
  1204 + this.msg=response.msg;
  1205 + }
  1206 + });
  1207 + },
  1208 + /*编辑主单信息*/
  1209 + handleEdit(index, row){
  1210 + this.outerVisible = true;
  1211 + this.dialogStatus='update';
  1212 + this.FenStatus='ediAwbh';
  1213 + this.ruleForm=row;
  1214 + this.ruleForm.originstation=this.defaultQuery.originstation+"-"+this.defaultQuery.destinationstation;
  1215 + this.ruleForm.flightno=this.defaultQuery.flightno;
  1216 + this.FenQuery.awba=row.awba;
  1217 + this.FenQuery.flightno= row.flightno;
  1218 + this.FenQuery.flightdate=row.flightdate
  1219 + this.FenQuery.originstation=this.defaultQuery.originstation;
  1220 + this.FenQuery.destinationstation=row.destinationstation;
  1221 + this.getFenList(this.FenQuery);
  1222 + // this.$nextTick(function () {
  1223 + // this.$refs.formName.resetFields();
  1224 + // });
  1225 + },
  1226 + /*编辑分单信息*/
  1227 + handleFen(index,row){
  1228 + this.outerVisible = true;
  1229 + this.dialogStatus='update';
  1230 + this.FenStatus='addAwbh';
  1231 + this.ruleForm=row;
  1232 + this.ruleForm.flightno=row.carrier+row.flightno;
  1233 + this.ruleForm.originstation=row.originstation+"-"+row.destinationstation;
  1234 + },
  1235 + //发送舱单报
  1236 + handleSend(index,row){
  1237 + if(row.flightno.length>4){
  1238 + row.flightno=row.flightno.substring(2)
  1239 + }else{
  1240 + row.flightno=row.flightno;
  1241 + }
  1242 + const map = {'mt1201':row,'username':loginedUserInfo().username}
  1243 + sendCreateMt1201(map).then(res=>{
  1244 + let response=res.data;
  1245 + //console.log(res);
  1246 + this.code=response.code;
  1247 + if(this.code=='200'){
  1248 + row.status='23'
  1249 + row.customText='舱单报发送成功';
  1250 + this.outerVisible = false;
  1251 + this.centerDialogVisible=true;
  1252 + this.msg=response.msg;
  1253 + }else{
  1254 + this.outerVisible = false;
  1255 + this.centerDialogVisible=true;
  1256 + this.msg=response.msg;
  1257 + }
  1258 + });
  1259 + },
  1260 + //发送舱单删除报
  1261 + handleDelete(index,row){
  1262 + this.udStatus='delete';
  1263 + this.dialogFormVisible=true;
  1264 + this.Udform.awbano=row.awba;
  1265 + this.Udform.awbhno=row.awbh;
  1266 + this.Udform.carrier=row.carrier;
  1267 + this.Udform.flightno=row.flightno.substring(2);
  1268 + this.Udform.flightdate=row.flightdate;
  1269 + this.Udform.bustype='MT1201';
  1270 + this.Udform.busdate=Date.parse(new Date());
  1271 + this.Udform.busweight=row.weight;
  1272 + this.Udform.buspiece=row.piece;
  1273 + this.Udform.opertype='发送舱单删除报';
  1274 + if(row.flightno.length>4){
  1275 + row.flightno=row.flightno.substring(2);
  1276 + }
  1277 + this.temprows= row;
  1278 + this.batichboolean=false;
  1279 + },
  1280 + //提交发送舱单删除报表单
  1281 + deleteUdForm(formName){
  1282 + this.$refs[formName].validate((valid) => {
  1283 + if (valid) {
  1284 + if(this.batichboolean){
  1285 + let arr={ids:this.uuids,reason:this.Udform.operreason,contactName:loginedUserInfo().username,contactTel:this.Udform.opertel,content:''}
  1286 + sendBatchDelMt1201(arr).then(res=>{
  1287 + let response=res.data;
  1288 + this.code=response.code;
  1289 + if(this.code=='200'){
  1290 + this.centerDialogVisible=true;
  1291 + this.msg=response.msg;
  1292 + }else{
  1293 + this.centerDialogVisible=true;
  1294 + this.msg=response.msg;
  1295 + }
  1296 + });
  1297 + }else{
  1298 + const map = {'flightNo':this.temprows.flightno,
  1299 + 'flightDate':this.temprows.flightdate,
  1300 + 'awba':this.temprows.awba,
  1301 + 'content':'',
  1302 + 'customCode':this.temprows.customcode,
  1303 + 'awbh':this.temprows.awbh,
  1304 + 'reason' :this.Udform.operreason,
  1305 + 'contactName':this.Udform.operperson,
  1306 + 'contactTel':this.Udform.opertel,
  1307 + 'carrier':this.Udform.carrier,
  1308 + 'username':loginedUserInfo().username}
  1309 + sendRemoveMt1201(map).then(res=>{
  1310 + let response=res.data;
  1311 + //console.log(res);
  1312 + this.code=response.code;
  1313 + if(this.code=='200'){
  1314 + this.temprows.status='24';
  1315 + this.temprows.customText='舱单删除报发送成功';
  1316 + this.dialogFormVisible=false;
  1317 + this.outerVisible = false;
  1318 + this.centerDialogVisible=true;
  1319 + this.msg=response.msg;
  1320 + }else{
  1321 + this.dialogFormVisible=false;
  1322 + this.outerVisible = false;
  1323 + this.centerDialogVisible=true;
  1324 + this.msg=response.msg;
  1325 + }
  1326 + });
  1327 + }
  1328 + } else {
  1329 + console.log('error submit!!');
  1330 + return false;
  1331 + }
  1332 + });
  1333 +
  1334 + },
  1335 + /*发送舱单修改报*/
  1336 + handleUpdate(index,row){
  1337 + this.udStatus='update';
  1338 + this.dialogFormVisible=true;
  1339 + this.Udform.awbano=row.awba;
  1340 + this.Udform.awbhno=row.awbh;
  1341 + this.Udform.carrier=row.carrier;
  1342 + this.Udform.flightno=row.flightno.substring(2);
  1343 + this.Udform.flightdate=row.flightdate;
  1344 + this.Udform.bustype='MT1201';
  1345 + this.Udform.busdate=Date.parse(new Date());
  1346 + this.Udform.busweight=row.weight;
  1347 + this.Udform.buspiece=row.piece;
  1348 + this.Udform.opertype='发送舱单修改报';
  1349 + if(row.flightno.length>4){
  1350 + row.flightno=row.flightno.substring(2);
  1351 + }else{
  1352 + row.flightno=row.flightno;
  1353 + }
  1354 + this.temprows=row;
  1355 + },
  1356 + //提交发送舱单修改报表单
  1357 + updateUdForm(formName){
  1358 + this.$refs[formName].validate((valid) => {
  1359 + if (valid) {
  1360 + const map = {'mt1201':this.temprows,
  1361 + 'reason' :this.Udform.operreason,
  1362 + 'contactName':this.Udform.operperson,
  1363 + 'contactTel':this.Udform.opertel,
  1364 + 'username':loginedUserInfo().username}
  1365 + sendEditeMt1201(map).then(res=>{
  1366 + let response=res.data;
  1367 + //console.log(res);
  1368 + this.code=response.code;
  1369 + if(this.code=='200'){
  1370 + this.temprows.status='25'
  1371 + this.temprows.customText='舱单修改报发送成功';
  1372 + this.dialogFormVisible=false;
  1373 + this.outerVisible = false;
  1374 + this.centerDialogVisible=true;
  1375 + this.msg=response.msg;
  1376 + }else{
  1377 + this.dialogFormVisible=false;
  1378 + this.outerVisible = false;
  1379 + this.centerDialogVisible=true;
  1380 + this.msg=response.msg;
  1381 + }
  1382 + });
  1383 + } else {
  1384 + console.log('error submit!!');
  1385 + return false;
  1386 + }
  1387 + });
  1388 +
  1389 + },
  1390 + /*编辑分单列表信息*/
  1391 + handleClick(row) {
  1392 + this.outerVisible = true;
  1393 + this.dialogStatus='update';
  1394 + this.FenStatus='addAwbh';
  1395 + this.ruleForm=row;
  1396 + this.ruleForm.flightno=row.carrier+row.flightno;
  1397 + this.ruleForm.originstation=row.originstation+"-"+row.destinationstation;
  1398 + },
  1399 + /*获取默认值*/
  1400 + getDefaultData(){
  1401 + if(
  1402 + jsutil.checkNull(this.$route.query)
  1403 + && jsutil.checkNull(this.$route.query.flightno)
  1404 + && jsutil.checkNull(this.$route.query.flightdate)
  1405 + && jsutil.checkNull(this.$route.query.originstation)
  1406 + && jsutil.checkNull(this.$route.query.destinationstation)
  1407 + ) {
  1408 + this.defaultQuery.flightno =this.$route.query.flightno;
  1409 + this.defaultQuery.flightdate = this.$route.query.flightdate;
  1410 + this.defaultQuery.originstation = this.$route.query.originstation;
  1411 + this.defaultQuery.destinationstation = this.$route.query.destinationstation;
  1412 + this.defaultQuery.awba = this.$route.query.awba;
  1413 + this.getList();
  1414 + }else {
  1415 + this.$router.push({
  1416 + path:'/enters'
  1417 + })
  1418 + }
  1419 +
  1420 + },
  1421 + /*获取默认数据列表*/
  1422 + getList(){
  1423 + let _this = this;
  1424 + this.tableloading=true;
  1425 + getMt1201List(this.defaultQuery).then(res =>{
  1426 + this.sumNmmsCount=0;
  1427 + this.sumNmmsPrice=0;
  1428 + this.sumNmmsWeight=0;
  1429 + let response=res.data.data;
  1430 + this.tableData=response;
  1431 + this.tableloading=false;
  1432 + response.forEach((item,i) => {
  1433 + if(item.awba!=null&&item.awbh=="");
  1434 + this.sumNmmsCount=Number(this.sumNmmsCount)+1;
  1435 + this.sumNmmsPrice=Number(this.sumNmmsPrice)+Number(item.piece);
  1436 + this.sumNmmsWeight=Number(Number(this.sumNmmsWeight)+Number(item.weight)).toFixed(2);
  1437 + })
  1438 + }).catch(error => {
  1439 + _this.tableloading=false;
  1440 + _this.$message({
  1441 + // 饿了么的消息弹窗组件
  1442 + message: error,
  1443 + type: "error"
  1444 + });
  1445 + });
  1446 + },
  1447 + /*获取国家代码*/
  1448 + remoteMethod:function(query){
  1449 + this.shprcountyrs=[];
  1450 + this.cnscountyrs=[];
  1451 + let params={countryCode:query};
  1452 + this.loading = true;
  1453 + getCountryCode(params).then(res =>{
  1454 + if (res !== '') {
  1455 + setTimeout(() => {
  1456 + this.loading = false;
  1457 + this.shprcountyrs=res.data.data;
  1458 + this.cnscountyrs=res.data.data;
  1459 + }, 200);
  1460 + } else {
  1461 + this.shprcountyrs = [];
  1462 + this.cnscountyrs=[];
  1463 + }
  1464 +
  1465 + });
  1466 + },
  1467 + //获取关区代码
  1468 + remoteMethod2:function(query){
  1469 + this.customcodes=[];
  1470 + let params={customcode:query};
  1471 + this.loading = true;
  1472 + selectCustomcode(params).then(res =>{
  1473 + if (res !== '') {
  1474 + setTimeout(() => {
  1475 + this.loading = false;
  1476 + this.customcodes=res.data.data;
  1477 + }, 200);
  1478 + } else {
  1479 + this.customcodes = [];
  1480 + }
  1481 +
  1482 + });
  1483 + },
  1484 + //新增原始舱单按钮
  1485 + addOrig(){
  1486 + this.dialogStatus="create";
  1487 + this.outerVisible = true;
  1488 + this.FenStatus='ediAwbh';
  1489 + this.ruleForm.flightno=this.$route.query.flightno;
  1490 + this.ruleForm.flightdate=this.$route.query.flightdate;
  1491 + this.ruleForm.originstation=this.$route.query.originstation+"-"+this.$route.query.destinationstation;
  1492 + },
  1493 + //新增原始分单
  1494 + addFen(formName){
  1495 + this.dialogStatus="create";
  1496 + this.outerVisible = true;
  1497 + this.FenStatus='addAwbh';
  1498 + },
  1499 + //新增原始舱单数据
  1500 + createData:function(formName){
  1501 + let _this = this;
  1502 + this.$refs[formName].validate((valid) => {
  1503 + if (valid) {
  1504 + _this.ruleForm.userinfo = {
  1505 + username: ''
  1506 + }
  1507 + _this.ruleForm.userinfo.username=loginedUserInfo().username;
  1508 + _this.ruleForm.status='22';
  1509 + addMt1201(_this.ruleForm).then(res=>{
  1510 + let response=res.data;
  1511 + _this.code=response.code;
  1512 + if(_this.code=='200'){
  1513 + _this.outerVisible = false;
  1514 + _this.$refs[formName].resetFields();
  1515 + _this.centerDialogVisible=true;
  1516 + _this.msg=response.msg;
  1517 + _this.getList();
  1518 + }else{
  1519 + _this.outerVisible = false;
  1520 + _this.centerDialogVisible=true;
  1521 + _this.$refs[formName].resetFields();
  1522 + _this.msg=response.msg;
  1523 + }
  1524 + });
  1525 + } else {
  1526 + console.log('error submit!!');
  1527 + return false;
  1528 + }
  1529 + });
  1530 +
  1531 + },
  1532 + //修改原始舱单数据
  1533 + updateData: function(formName){
  1534 + let _this = this;
  1535 + this.$refs[formName].validate((valid) => {
  1536 + if (valid) {
  1537 + _this.ruleForm.userinfo = {
  1538 + username: ''
  1539 + }
  1540 + _this.ruleForm.userinfo.username=loginedUserInfo().username;
  1541 + ediMt1201(_this.ruleForm).then(res=>{
  1542 + let response=res.data;
  1543 + //console.log(res);
  1544 + _this.code=response.code;
  1545 + if(_this.code=='200'){
  1546 + _this.outerVisible = false;
  1547 + _this.centerDialogVisible=true;
  1548 + _this.msg=response.msg;
  1549 + _this.getList();
  1550 + }else{
  1551 + _this.outerVisible = false;
  1552 + _this.centerDialogVisible=true;
  1553 + _this.msg=response.msg;
  1554 + }
  1555 + });
  1556 + } else {
  1557 + console.log('error submit!!');
  1558 + return false;
  1559 + }
  1560 + });
  1561 + },
  1562 + //获取分单列表
  1563 + getFenList(data){
  1564 + getFenList(data).then(res =>{
  1565 + //console.log(res);
  1566 + let response=res.data.data;
  1567 + this.tableData2=response;
  1568 + });
  1569 + },
  1570 + //分拨申请
  1571 + Importallocation(index,row){
  1572 + this.$router.push({name:'进港分拨',params:{carrier:row.carrier,flightno:row.flightno,awba:row.awba,flightdate:row.flightdate,
  1573 + turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode}});
  1574 +
  1575 + },
  1576 + //分拨运抵
  1577 + Allocatearrive(index,row){
  1578 + this.$router.push({name:'分拨运抵',params:{carrier:row.carrier,flightno:row.flightno,awba:row.awba,flightdate:row.flightdate,
  1579 + turnpiece:row.awbinfo.pcs,turnweight:row.awbinfo.weight,customcode:row.customcode,goodsname:row.goodsname}});
  1580 + },
  1581 +
  1582 + //返回上一层
  1583 + back(){
  1584 + this.$router.go(-1);
  1585 + },
  1586 +
  1587 + },
  1588 + computed:{
  1589 + ...mapGetters(['getUserInfoStore','getUserMenuStore']) // 动态计算属性,相当于this.$store.getters.resturantName
  1590 + },
  1591 + /*渲染方法*/
  1592 + activated(){
  1593 + this.getDefaultData();
  1594 + this.isExpansion=true;
  1595 + }
  1596 + }
  1597 +</script>
  1 +<template>
  2 + <el-container>
  3 + <el-main style="background-color: white">
  4 + <!--航班信息部分-->
  5 + <el-row class="row-bg">
  6 + <el-col :span="24"><div class="grid-content content">航班信息</div></el-col>
  7 + <el-col :span="24">
  8 + <div class="grid-content co">
  9 + <el-col :span="1"><div class="grid-content"></div></el-col>
  10 + <el-col :span="20">
  11 + <div class="grid-content">
  12 + <span>航班号:{{defaultQuery.flightno}}</span>
  13 + <span>航班日期:{{defaultQuery.flightdate}}</span>
  14 + <span>航段:{{defaultQuery.originstation}}-{{defaultQuery.destinationstation}}</span>
  15 + </div>
  16 + </el-col>
  17 + </div>
  18 + </el-col>
  19 + <el-col :span="24"><div class="grid-content content">进港理货查询</div></el-col>
  20 + <el-col :span="24">
  21 + <div class="grid-content co" >
  22 + <el-col :span="1"><div class="grid-content"></div></el-col>
  23 + <el-col :span="22">
  24 + <div class="grid-content">
  25 + <el-col :span="9">
  26 + <div class="grid-content">
  27 + <el-input v-model="defaultQuery.awba" placeholder="请输入主单号" style="width: 250px">
  28 + <template slot="prepend">主单号</template>
  29 + </el-input>
  30 + </div>
  31 + </el-col>
  32 + <el-col :span="2"><div class="grid-content"><el-button type="primary" v-on:click="getMt5201List" size="mini">查询</el-button></div></el-col>
  33 + </div>
  34 + </el-col>
  35 + </div>
  36 + </el-col>
  37 + <el-col :span="24"><div class="grid-content content" style="margin-top: 6px">进港理货单明细</div></el-col>
  38 + </el-row>
  39 + <!--进港理货列表-->
  40 + <el-row>
  41 + <el-col :span="24">
  42 + <template>
  43 + <el-table
  44 + ref="multipleTable"
  45 + :data="tableData"
  46 + tooltip-effect="dark"
  47 + v-loading="tableLoading"
  48 + style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
  49 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
  50 + @selection-change="handleSelectionChange"
  51 + row-key="uuid"
  52 + border
  53 + default-expand-all
  54 + :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
  55 + <el-table-column
  56 + type="selection"
  57 + width="50">
  58 + </el-table-column>
  59 + <el-table-column
  60 + label="运单号"
  61 + width="185"
  62 + show-overflow-tooltip>
  63 + <template slot-scope="scope">
  64 + <span v-if="scope.row.awbh==''||scope.row.awbh==null">
  65 + {{scope.row.awba}}
  66 + </span>
  67 + <span v-else>
  68 + {{scope.row.awbh}}
  69 + </span>
  70 + </template>
  71 + </el-table-column>
  72 + <el-table-column
  73 + prop="totalpiece"
  74 + label="舱单件数"
  75 + width="80"
  76 + show-overflow-tooltip>
  77 + </el-table-column>
  78 + <el-table-column
  79 + prop="totalweight"
  80 + label="舱单重量"
  81 + width="80"
  82 + show-overflow-tooltip>
  83 + </el-table-column>
  84 + <el-table-column
  85 + prop="piece"
  86 + label="理货件数"
  87 + width="80"
  88 + show-overflow-tooltip>
  89 + </el-table-column>
  90 + <el-table-column
  91 + prop="weight"
  92 + label="理货重量"
  93 + width="80"
  94 + show-overflow-tooltip>
  95 + </el-table-column>
  96 + <el-table-column
  97 + prop="starttime"
  98 + label="卸货时间"
  99 + type="date"
  100 + width="160">
  101 + </el-table-column>
  102 + <el-table-column
  103 + prop="status"
  104 + label="状态"
  105 + width="100" :formatter="formatStatus">
  106 + </el-table-column>
  107 + <el-table-column
  108 + label="回执内容"
  109 + width="250">
  110 + <template slot-scope="scope">
  111 + <span v-if="scope.row.ext5 && scope.row.ext5.indexOf('异常') != -1" style="color: #F56C6C">
  112 + {{scope.row.ext5}}
  113 + </span>
  114 + <span v-else-if="scope.row.ext5 && scope.row.ext5.indexOf('不通过') != -1" style="color: #F56C6C">
  115 + {{scope.row.ext5}}
  116 + </span>
  117 + <span v-else-if="scope.row.ext5 && scope.row.ext5.indexOf('不接受') != -1" style="color: #F56C6C">
  118 + {{scope.row.ext5}}
  119 + </span>
  120 + <span v-else-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
  121 + {{scope.row.ext5}}
  122 + </span>
  123 + <span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
  124 + {{scope.row.ext5}}
  125 + </span>
  126 + <span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #F56C6C">
  127 + {{scope.row.ext5}}
  128 + </span>
  129 + <span v-else style="color: #909399;">
  130 + {{scope.row.ext5}}
  131 + </span>
  132 + </template>
  133 + </el-table-column>
  134 + <el-table-column
  135 + prop="operation"
  136 + label="操作"
  137 + width="285"
  138 + show-overflow-tooltip>
  139 + <template slot-scope="scope">
  140 + <el-row type="flex" justify="space-between">
  141 + <el-button
  142 + size="mini"
  143 + type="info"
  144 + @click="handleDetail(scope.$index, scope.row)">收发明细</el-button>
  145 + <el-button
  146 + v-if="scope.row.awbh==''||scope.row.awbh==null"
  147 + size="mini"
  148 + type="success"
  149 + @click="handleMain(scope.$index, scope.row)">编辑主单</el-button>
  150 + <el-button
  151 + v-else
  152 + size="mini"
  153 + type="success"
  154 + @click="handleFen(scope.$index, scope.row)">编辑分单
  155 + </el-button>
  156 + </el-row>
  157 + <el-row type="flex" justify="space-between">
  158 + <el-button
  159 + size="mini"
  160 + type="primary"
  161 + :disabled="btSendStatusFormater(scope.row.status)"
  162 + @click="handleCreate(scope.$index, scope.row)">发理货报</el-button>
  163 + <el-button
  164 + size="mini"
  165 + type="danger"
  166 + :disabled="btDeleStatusFormater(scope.row.status)"
  167 + @click="handleDelete(scope.$index, scope.row)">发删除报</el-button>
  168 + <el-button
  169 + size="mini"
  170 + type="warning"
  171 + @click="UpdateStatus(scope.$index, scope.row)">更改状态
  172 + </el-button>
  173 + </el-row>
  174 + </template>
  175 + </el-table-column>
  176 + </el-table>
  177 + </template>
  178 + </el-col>
  179 + </el-row>
  180 + <!--编辑主单-->
  181 + <el-dialog :title="'进港理货信息'+textMap[dialogStatus]" :visible.sync="outerVisible" width="90%">
  182 + <el-form :model="ruleForm" :rules="rules" ref="ruleForm" :label-position="labelPosition"
  183 + label-width="78px" size="mini">
  184 + <!--航班信息部分-->
  185 + <el-row class="flightInfo">
  186 + <el-col :span="24">
  187 + <div class="grid-content content" style="margin-bottom: 10px;">航班信息</div>
  188 + </el-col>
  189 + <el-row class="flightInfo">
  190 + <el-col :span="6">
  191 + <el-form-item label="" prop="awba">
  192 + <div v-if="dialogStatus === 'update'">
  193 + <el-input disabled="" v-model="ruleForm.awba" style="width: 200px">
  194 + <template slot="prepend">运单号</template>
  195 + </el-input>
  196 + </div>
  197 + <div v-else>
  198 + <el-input v-model="ruleForm.awba" style="width: 200px">
  199 + <template slot="prepend">运单号</template>
  200 + </el-input>
  201 + </div>
  202 + </el-form-item>
  203 + </el-col>
  204 + <el-col :span="4" style="margin-right: -15px">
  205 + <div v-if="FenStatus === 'addAwbh'">
  206 + <el-form-item label="" prop="awbh">
  207 + <el-input v-model="ruleForm.awbh" style="width: 200px">
  208 + <template slot="prepend">分单号</template>
  209 + </el-input>
  210 + </el-form-item>
  211 + </div>
  212 + <div v-else>
  213 + <el-form-item style="display: none" label="" prop="awbh">
  214 + <el-input v-model="ruleForm.awbh" style="width: 200px">
  215 + <template slot="prepend">分单号</template>
  216 + </el-input>
  217 + </el-form-item>
  218 + </div>
  219 + </el-col>
  220 + <el-col :span="6">
  221 + <el-form-item label="" prop="flightno">
  222 + <el-input disabled="" v-model="ruleForm.flightno" style="width: 200px">
  223 + <template slot="prepend">航班号</template>
  224 + </el-input>
  225 + </el-form-item>
  226 + </el-col>
  227 + <el-col :span="9">
  228 + <el-form-item label="" required prop="flightdate">
  229 + <div class="ip">
  230 + 航班日期 </div>
  231 + <el-date-picker disabled="" type="date" placeholder="选择日期" :clearable="false"
  232 + v-model="ruleForm.flightdate"
  233 + style="width: 120px;"></el-date-picker>
  234 + </el-form-item>
  235 + </el-col>
  236 + </el-row>
  237 + <el-row class="flightInfo">
  238 + <el-col :span="6">
  239 + <el-form-item label="" prop="originstation">
  240 + <el-input style="width: 200px" disabled="" v-model="ruleForm.originstation" onkeyup="this.value=this.value.toUpperCase()">
  241 + <template slot="prepend">起始站</template>
  242 + </el-input>
  243 + </el-form-item>
  244 + </el-col>
  245 + <el-col :span="7">
  246 + <el-form-item label="" prop="destinationstation">
  247 + <el-input style="width: 200px" disabled="" v-model="ruleForm.destinationstation" onkeyup="this.value=this.value.toUpperCase()">
  248 + <template slot="prepend">目的站</template>
  249 + </el-input>
  250 + </el-form-item>
  251 + </el-col>
  252 + <el-col :span="2">
  253 + <el-button size="mini" type="primary" @click="dialogStatus==='create'?createData('ruleForm'):updateData('ruleForm')" style="float: right">保存</el-button>
  254 + </el-col>
  255 + </el-row>
  256 + </el-row>
  257 + <!--货物信息部分-->
  258 + <el-row class="flightInfo">
  259 + <el-col :span="24">
  260 + <div class="grid-content content">货物信息</div>
  261 + </el-col>
  262 + </el-row>
  263 + <el-row style="margin-bottom: 0px;">
  264 + <el-row class="product">
  265 + <el-col :span="6">
  266 + <el-form-item label="" prop="pcs">
  267 + <el-input type="number" v-model="ruleForm.pcs" style="width: 200px">
  268 + <template slot="prepend">舱单件数</template>
  269 + </el-input>
  270 + </el-form-item>
  271 + </el-col>
  272 + <el-col :span="6">
  273 + <el-form-item label="" prop="wei">
  274 + <el-input type="number" v-model="ruleForm.wei" style="width: 200px">
  275 + <template slot="prepend">舱单重量</template>
  276 + </el-input>
  277 + </el-form-item>
  278 + </el-col>
  279 + <el-col :span="6">
  280 + <el-form-item label="" prop="piece">
  281 + <el-input type="number" v-model="ruleForm.piece" style="width: 200px">
  282 + <template slot="prepend">理货件数</template>
  283 + </el-input>
  284 + </el-form-item>
  285 + </el-col>
  286 + <el-col :span="6">
  287 + <el-form-item label="" prop="weight">
  288 + <el-input type="number" v-model="ruleForm.weight" style="width: 200px">
  289 + <template slot="prepend">理货重量</template>
  290 + </el-input>
  291 + </el-form-item>
  292 + </el-col>
  293 + </el-row>
  294 + </el-row>
  295 + <el-row class="flightInfo">
  296 + <el-col :span="7">
  297 + <el-form-item label="" prop="customcode">
  298 + <div class="ip">
  299 + 海关关区
  300 + </div>
  301 + <el-select v-model="ruleForm.customcode"
  302 + filterable
  303 + allow-create
  304 + default-first-option
  305 + remote
  306 + :remote-method="remoteMethod2"
  307 + :loading="loading" placeholder="请选择" style="width: 115px">
  308 + <el-option
  309 + v-for="item in customcodes"
  310 + :key="item.customcode"
  311 + :label="item.customcode"
  312 + :value="item.customcode">
  313 + <span style="float: left">{{ item.customcode }}</span>
  314 + <span style="float: right; color: #8492a6; font-size: 13px">{{ item.customname }}</span>
  315 + </el-option>
  316 + </el-select>
  317 + </el-form-item>
  318 + </el-col>
  319 + <el-col :span="12" style="margin-left: -45px">
  320 + <el-form-item label="" required>
  321 + <el-form-item prop="starttime">
  322 + <div class="ip">
  323 + 卸货时间
  324 + </div>
  325 + <el-date-picker type="datetime" placeholder="选择日期" :clearable="false" value-format="yyyy-MM-dd HH:mm:ss"
  326 + v-model="ruleForm.starttime"
  327 + style="width: 200px;"></el-date-picker>
  328 + </el-form-item>
  329 + </el-form-item>
  330 + </el-col>
  331 + </el-row>
  332 + <!--分单信息部分-->
  333 + <el-row class="flightInfo">
  334 + <el-col :span="24">
  335 + <div class="grid-content content" v-if="dialogStatus === 'update'">
  336 + <span>分单信息</span>
  337 + <el-button type="primary" v-on:click="addFen('ruleForm')" size="mini">新增分单</el-button>
  338 + </div>
  339 + <div class="grid-content content" v-else>
  340 + <span>分单信息</span>
  341 + <el-button type="primary" disabled="" @click="innerVisible = true" size="mini">新增分单</el-button>
  342 + </div>
  343 + </el-col>
  344 + </el-row>
  345 + <!--分单列表-->
  346 + <el-row>
  347 + <el-col :span="24">
  348 + <template>
  349 + <el-table
  350 + :data="tableData2"
  351 + style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
  352 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small">
  353 + <el-table-column
  354 + prop="awbh"
  355 + label="分单号"
  356 + width="250">
  357 + </el-table-column>
  358 + <el-table-column
  359 + prop="piece"
  360 + label="舱单件数"
  361 + width="200">
  362 + </el-table-column>
  363 + <el-table-column
  364 + prop="weight"
  365 + label="舱单重量"
  366 + width="200">
  367 + </el-table-column>
  368 + <el-table-column
  369 + prop="goodsname"
  370 + label="卸货时间"
  371 + width="250">
  372 + </el-table-column>
  373 + <el-table-column
  374 + fixed="right"
  375 + label="操作"
  376 + width="230">
  377 + <template slot-scope="scope">
  378 + <el-button @click="handleClick(scope.row)" type="text" size="small">编辑
  379 + </el-button>
  380 + <el-button @click="handleClick(scope.row)" type="text" size="small">删除
  381 + </el-button>
  382 + </template>
  383 + </el-table-column>
  384 + </el-table>
  385 + </template>
  386 + </el-col>
  387 + </el-row>
  388 + </el-form>
  389 + </el-dialog>
  390 + <!--底部按钮及理货信息-->
  391 + <el-row style="margin-top: 20px">
  392 + <el-col :span="2.5"><div class="grid-content"><el-button type="primary" v-on:click="addTally" size="mini">新增进港理货</el-button></div></el-col>
  393 + <el-col :span="2.5"><div class="grid-content"><el-button type="primary" size="mini" :disabled="batich" @click="batchdel()">批量发送删除报</el-button></div></el-col>
  394 + <el-col :span="2.5"><div class="grid-content"><el-button type="primary" size="mini" :disabled="batich" @click="batchaplly()">批量申请</el-button></div></el-col>
  395 + <el-col :span="1.5"><div class="grid-content"><el-button type="primary" @click="back" size="mini">返回</el-button></div></el-col>
  396 + <el-col :span="2.5"><div class="grid-content"><span>主单数:{{sumNmmsCount}}</span></div></el-col>
  397 + <el-col :span="3.5"><div class="grid-content"><span>理货总件数:{{sumNmmsPrice}}</span></div></el-col>
  398 + <el-col :span="7.5"><div class="grid-content"><span>理货总重量:{{sumNmmsWeight}}</span></div></el-col>
  399 + </el-row>
  400 + <!--对话提示框-->
  401 + <el-row>
  402 + <el-dialog
  403 + title="系统提示"
  404 + :visible.sync="centerDialogVisible"
  405 + width="30%"
  406 + center>
  407 + <span>{{msg}}</span>
  408 + <span slot="footer" class="dialog-footer">
  409 + <el-button @click="centerDialogVisible = false">取 消</el-button>
  410 + <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
  411 + </span>
  412 + </el-dialog>
  413 + </el-row>
  414 + <!--发送删除报修改报提示框-->
  415 + <el-row>
  416 + <el-dialog :title="'提交'+Reason[udStatus]+'信息'" :visible.sync="dialogFormVisible">
  417 + <el-form :model="Udform" :rules="udrules" ref="Udform" class="demo-ruleForm">
  418 + <!-- <el-form-item label="操作原因" prop="operreason">-->
  419 + <!-- <el-input type="textarea" v-model="Udform.operreason"></el-input>-->
  420 + <!-- </el-form-item>-->
  421 + <!-- <el-form-item label="操作人" prop="operperson">-->
  422 + <!-- <el-input v-model="Udform.operperson"></el-input>-->
  423 + <!-- </el-form-item>-->
  424 + <!-- <el-form-item label="联系电话" prop="opertel">-->
  425 + <!-- <el-input v-model="Udform.opertel"></el-input>-->
  426 + <!-- </el-form-item>-->
  427 + <el-row style="margin: 10px auto">
  428 + <el-col :span="22">
  429 + <el-form-item label="" prop="operreason">
  430 + <div class="ip">
  431 + 操作原因
  432 + </div>
  433 + <el-input autosize type="textarea" v-model="Udform.operreason" style="width: 80%">
  434 + </el-input>
  435 + </el-form-item>
  436 + </el-col>
  437 + </el-row>
  438 + <el-row>
  439 + <el-col :span="11" style="margin-right: 10px">
  440 + <el-form-item label="" prop="operperson">
  441 + <el-input v-model="Udform.operperson" style="width: 200px">
  442 + <template slot="prepend">操作人</template>
  443 + </el-input>
  444 + </el-form-item>
  445 + </el-col>
  446 + <el-col :span="10">
  447 + <el-form-item label="" prop="opertel">
  448 + <el-input v-model="Udform.opertel" style="width: 250px">
  449 + <template slot="prepend">联系电话</template>
  450 + </el-input>
  451 + </el-form-item>
  452 + </el-col>
  453 + </el-row>
  454 + </el-form>
  455 + <div slot="footer" class="dialog-footer" style="margin-top: 30px" align="center">
  456 + <el-button @click="dialogFormVisible = false">取 消</el-button>
  457 + <el-button type="primary" @click="deleteUdForm('Udform')">确 定</el-button>
  458 + </div>
  459 + </el-dialog>
  460 + </el-row>
  461 + <!--明细列表弹出框-->
  462 + <el-row>
  463 + <el-dialog title="回执明细列表" :visible.sync="dialogTableVisible" width="70%">
  464 + <el-table :data="gridData" style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
  465 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small">
  466 + <el-table-column property="busdate" label="时间" width="160"></el-table-column>
  467 + <el-table-column property="username" label="操作人" width="130"></el-table-column>
  468 + <el-table-column property="buspiece" label="发送件数" width="100"></el-table-column>
  469 + <el-table-column property="busweight" label="发送重量" width="100"></el-table-column>
  470 + <el-table-column property="cusrestext" label="回执内容"></el-table-column>
  471 + </el-table>
  472 + </el-dialog>
  473 + </el-row>
  474 + </el-main>
  475 + </el-container>
  476 +</template>
  477 +<style scoped>
  478 + .ip{
  479 + max-width: 100px;
  480 + margin-right: -4px;
  481 + display: inline-block;
  482 + background-color: #6F8294;
  483 + color: #ffffff;
  484 + border: 1px solid #DCDFE6;
  485 + vertical-align: middle;
  486 + padding: 0 18px;
  487 + white-space: nowrap;
  488 + border-top-right-radius: 0px;
  489 + border-top-left-radius: 4px;
  490 + border-bottom-left-radius: 4px;
  491 + border-bottom-right-radius: 0px;
  492 + font-size: 10px;
  493 + }
  494 + .grid-content{height: 36px;line-height: 36px;margin-right: 5px;}
  495 + .content{border-left: 4px #409EFF solid;padding-left: 10px;background-color: #f9fafc;margin-bottom: 2px}
  496 + .row-bg,.co{background-color: white;}
  497 + span{font-weight: bold;margin-right: 35px;}
  498 + .el-table td,.el-table th{text-align: center}
  499 + .flightInfo {
  500 + margin-bottom: 0px
  501 + }
  502 + .el-form-item {
  503 + margin-bottom: 2px;
  504 + }
  505 +
  506 + .flightInfo {
  507 + margin-bottom: 3px
  508 + }
  509 +
  510 + .el-dialog__body {
  511 + padding: 10px 20px;
  512 + }
  513 +
  514 + .el-col {
  515 + margin-right: 0px
  516 + }
  517 +
  518 + .product {
  519 + margin-bottom: 5px;
  520 + }
  521 +
  522 + .pub {
  523 + margin-right: 10px;
  524 + }
  525 +</style>
  526 +
  527 +<script>
  528 + import{addResponse,selectResponseList} from "../../api/InResponse";
  529 + import { getMt5201List,addMt5201,ediMt5201,delMt5201,sendCreateMt520x,sendRemoveMt520x,selectCustomcode,sendbatchRemoveMt5201,sendbatchCreateMt5201} from '../../api/mt5201'
  530 + import loginUserInfo from '@/api/base'
  531 + import {sendBatchApllyMt1201, sendBatchDelMt1201} from "../../api/mt1201";
  532 + import {mapActions, mapGetters} from 'vuex'
  533 + import {loginedUserInfo} from "../../api/user";
  534 + export default {
  535 + name:'Tallymsters',
  536 + data() {
  537 + return {
  538 + defaultQuery:{
  539 + flightno:undefined,
  540 + flightdate:undefined,
  541 + originstation:undefined,
  542 + destinationstation:undefined,
  543 + awba:undefined,
  544 + },
  545 + LoginUserInfo: loginUserInfo,
  546 + tableData: [],
  547 + tableData2: [],
  548 + multipleSelection: [],
  549 + outerVisible: false,
  550 + dialogStatus:'',
  551 + labelPosition: 'left',
  552 + textMap:{
  553 + update: '编辑',
  554 + create: '添加'
  555 + },
  556 + customcodes:[],
  557 + ruleForm:{
  558 + awba:undefined,
  559 + awbh:undefined,
  560 + carrier:undefined,
  561 + flightno:undefined,
  562 + flightdate:undefined,
  563 + originstation:undefined,
  564 + destinationstation:undefined,
  565 + piece:undefined,
  566 + weight:undefined,
  567 + starttime:undefined,
  568 + endtime:undefined,
  569 + customcode:undefined,
  570 + goodsname:undefined,
  571 + actime:undefined,
  572 + rcfdep:"MT5201",
  573 + status:'22',
  574 + isdelete:undefined,
  575 + pcs:undefined,
  576 + wei:undefined,
  577 + ext5:undefined,
  578 + userinfo: {
  579 + username: loginedUserInfo().username
  580 + },
  581 + },
  582 + FenStatus:'',
  583 + rules: {
  584 + awba: [{required: true, message: '请输入运单号', trigger: 'blur'}],
  585 + flightno: [{required: true, message: '航班号必须输入', trigger: 'blur'}],
  586 + flightdate: [{required: true, message: '航班日期必须选择', trigger: 'blur'}],
  587 + originstation: [{required: true, message: '航段必须输入', trigger: 'blur'}],
  588 + piece: [{required: true, message: '舱单件数必须输入且为数字', trigger: 'blur'}],
  589 + weight: [{required: true, message: '舱单重量必须输入且为数字', trigger: 'blur'}],
  590 + customcode:[{required: true, message: '海关关区必须选择', trigger: 'change'}],
  591 + goodsname:[{required: true, message: '货物描述必须填写', trigger: 'blur'}],
  592 + starttime: [{required: true, message: '卸货时间必须选择', trigger: 'blur'}]
  593 + },
  594 + centerDialogVisible:false,
  595 + msg:'',
  596 + sumNmmsCount:0,
  597 + sumNmmsPrice:0,
  598 + sumNmmsWeight:0,
  599 + Udform:{
  600 + operreason:'',
  601 + operperson:'',
  602 + opertel:'',
  603 + flightdate:'',
  604 + flightno:'',
  605 + carrier:'',
  606 + awbano:'',
  607 + awbhno:'',
  608 + bustype:'',
  609 + busdate:'',
  610 + busweight:'',
  611 + buspiece:'',
  612 + opertype:'',
  613 + },
  614 + udrules:{
  615 + operreason: [{required: true, message: '请输入操作原因', trigger: 'blur'}],
  616 + operperson: [{required: true, message: '请输入操作人', trigger: 'blur'}],
  617 + opertel: [{required: true, message: '请输入操作人联系电话', trigger: 'blur'}],
  618 + },
  619 + Reason:{
  620 + update: '修改',
  621 + delete: '删除'
  622 + },
  623 + udStatus:'',
  624 + dialogFormVisible: false,
  625 + rows:{},
  626 + loading:false,
  627 + dialogTableVisible:false,
  628 + gridData:[],
  629 + tableLoading:false,
  630 + batich:true,
  631 + batichboolean:false,
  632 + uuids:[],
  633 + }
  634 + },
  635 + methods: {
  636 + //更改状态
  637 + UpdateStatus(column,row){
  638 + this.$confirm("是否发送更改状态", "确认消息", {
  639 + distinguishCancelAndClose: true,
  640 + confirmButtonText: '确认更改',
  641 + cancelButtonText: '取消更改'
  642 + }).then(() => {
  643 + row.status = '22';
  644 + }).catch(action => {
  645 + this.$message({
  646 + type: 'info',
  647 + message: action === 'cancel'
  648 + ? '取消状态更改'
  649 + : '状态更改取消'
  650 + })
  651 + })
  652 + },
  653 + //发送舱单报按钮判定事件
  654 + btSendStatusFormater:(status) => {
  655 + if(status=='23' || status=='24'||status=='25'){
  656 + return true;
  657 + }else if(status=='22' ) {
  658 + return false;
  659 + }
  660 + },
  661 + btDeleStatusFormater:(status) => {
  662 + if(status=='23' || status=='24'||status=='25'){
  663 + return true;
  664 + }else if(status=='22' ) {
  665 + return false;
  666 + }
  667 + },
  668 + //回执收发明细
  669 + handleDetail(index,row){
  670 + if(row.flightno.length>4){
  671 + row.flightno=row.flightno.substring(2);
  672 + }
  673 + let params={awbano:row.awba,awbhno:row.awbh,carrier:row.carrier,flightno:row.flightno,flightdate:row.flightdate,bustype:'MT5201'}
  674 + selectResponseList(params).then(res=>{
  675 + this.dialogTableVisible=true;
  676 + let response=res.data.data;
  677 + this.gridData=response;
  678 + });
  679 + },
  680 + //状态适配
  681 + formatStatus:function (row,column) {
  682 + return row.status=='01'?'接受申报':row.status=='02'?'待人工审核':row.status=='03'?'退单'
  683 + :row.status=='11'?'放行':row.status=='12'?'拒装':row.status=='13'?'禁卸'
  684 + :row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
  685 + :row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
  686 + },
  687 + //获取关区代码
  688 + remoteMethod2:function(query){
  689 + this.customcodes=[];
  690 + let params={customcode:query};
  691 + this.loading = true;
  692 + selectCustomcode(params).then(res =>{
  693 + if (res !== '') {
  694 + setTimeout(() => {
  695 + this.loading = false;
  696 + this.customcodes=res.data.data;
  697 + }, 200);
  698 + } else {
  699 + this.customcodes = [];
  700 + }
  701 +
  702 + });
  703 + },
  704 + //发送理货报
  705 + handleCreate(index,row){
  706 + if(row.flightno.length>4){
  707 + row.flightno=row.flightno.substring(2)
  708 + }else{
  709 + row.flightno=row.flightno;
  710 + }
  711 + if(row.awbh==null){
  712 + row.awbh="";
  713 + }
  714 + const map = {'mt520x':row,'username':loginedUserInfo().username}
  715 + sendCreateMt520x(map).then(res=>{
  716 + let response=res.data;
  717 + //console.log(res);
  718 + this.code=response.code;
  719 + if(this.code=='200'){
  720 + row.status='23'
  721 + row.ext5='理货报发送成功';
  722 + this.outerVisible = false;
  723 + this.centerDialogVisible=true;
  724 + this.msg=response.msg;
  725 + }else{
  726 + this.outerVisible = false;
  727 + this.centerDialogVisible=true;
  728 + this.msg=response.msg;
  729 + }
  730 + });
  731 + },
  732 + //发送理货删除报
  733 + handleDelete(index,row){
  734 + this.dialogFormVisible=true;
  735 + this.udStatus='delete';
  736 + this.Udform.awbano=row.awba;
  737 + this.Udform.awbhno=row.awbh;
  738 + this.Udform.carrier=row.carrier;
  739 + this.Udform.flightno=row.flightno.substring(2);
  740 + this.Udform.flightdate=row.flightdate;
  741 + this.Udform.bustype='MT5201';
  742 + this.Udform.busdate=Date.parse(new Date());
  743 + this.Udform.busweight=row.weight;
  744 + this.Udform.buspiece=row.piece;
  745 + this.Udform.opertype='发送理货删除报';
  746 + if(row.flightno.length>4){
  747 + row.flightno=row.flightno.substring(2);
  748 + }
  749 + if(row.awbh==null){
  750 + row.awbh="";
  751 + }
  752 + this.rows=row;
  753 + this.batichboolean=false;
  754 + },
  755 + //发送理化删除报提交表单
  756 + deleteUdForm(formName){
  757 + this.$refs[formName].validate((valid) => {
  758 + if (valid) {
  759 + if(this.batichboolean){
  760 + let arr={ids:this.uuids,reason:this.Udform.operreason,contactName:loginedUserInfo().username,contactTel:this.Udform.opertel,content:''}
  761 + sendbatchRemoveMt5201(arr).then(res=>{
  762 + let response=res.data;
  763 + this.code=response.code;
  764 + if(this.code=='200'){
  765 + this.centerDialogVisible=true;
  766 + this.msg=response.msg;
  767 + }else{
  768 + this.centerDialogVisible=true;
  769 + this.msg=response.msg;
  770 + }
  771 + });
  772 + }else{
  773 + const map = {'flightNo':this.rows.flightno,
  774 + 'flightDate':this.rows.flightdate,
  775 + 'awba':this.rows.awba,
  776 + 'content':'',
  777 + 'customCode':this.rows.customcode,
  778 + 'awbh':this.rows.awbh,
  779 + 'reason' :this.Udform.operreason,
  780 + 'contactName':this.Udform.operperson,
  781 + 'contactTel':this.Udform.opertel,
  782 + 'rcfdep':this.rows.rcfdep,
  783 + 'carrier':this.rows.carrier,
  784 + 'username':loginedUserInfo().username}
  785 + sendRemoveMt520x(map).then(res=>{
  786 + let response=res.data;
  787 + //console.log(res);
  788 + this.code=response.code;
  789 + if(this.code=='200'){
  790 + this.rows.status='24';
  791 + this.rows.ext5='理货删除报发送成功';
  792 + this.dialogFormVisible=false;
  793 + this.outerVisible = false;
  794 + this.centerDialogVisible=true;
  795 + this.msg=response.msg;
  796 + }else{
  797 + this.dialogFormVisible=false;
  798 + this.outerVisible = false;
  799 + this.centerDialogVisible=true;
  800 + this.msg=response.msg;
  801 + }
  802 + });
  803 + }
  804 +
  805 + } else {
  806 + console.log('error submit!!');
  807 + return false;
  808 + }
  809 + });
  810 +
  811 + },
  812 + //批量选中事件
  813 + handleSelectionChange(val) {
  814 + this.multipleSelection = val;
  815 + if(this.multipleSelection!=null && this.multipleSelection!=""){
  816 + this.batich=false;
  817 + }else{
  818 + this.batich=true;
  819 + }
  820 + },
  821 + //批量申请
  822 + batchaplly(){
  823 + let ids=[];
  824 + this.multipleSelection.forEach(function (item) {
  825 + ids.push(item.uuid);
  826 + })
  827 + sendbatchCreateMt5201(ids).then(res=>{
  828 + let response=res.data;
  829 + this.code=response.code;
  830 + if(this.code=='200'){
  831 + this.centerDialogVisible=true;
  832 + this.msg=response.msg;
  833 + }else{
  834 + this.centerDialogVisible=true;
  835 + this.msg=response.msg;
  836 + }
  837 + });
  838 + },
  839 + //批量删除
  840 + batchdel(){
  841 + let ids=[];
  842 + this.multipleSelection.forEach(function (item) {
  843 + ids.push(item.uuid);
  844 + })
  845 + this.uuids=ids;
  846 + this.udStatus='delete';
  847 + this.dialogFormVisible=true;
  848 + this.batichboolean=true;
  849 + },
  850 + //编辑主单
  851 + handleMain(index,row){
  852 + this.outerVisible = true;
  853 + this.dialogStatus='update';
  854 + this.FenStatus='ediAwbh';
  855 + this.ruleForm=row;
  856 + this.ruleForm.flightno=row.carrier+row.flightno;
  857 + },
  858 + //编辑分单
  859 + handleFen(index,row){
  860 + this.outerVisible = true;
  861 + this.dialogStatus='update';
  862 + this.FenStatus='addAwbh';
  863 + this.ruleForm=row;
  864 + this.ruleForm.flightno=row.carrier+row.flightno;
  865 + },
  866 + //新增分单
  867 + addFen(formName){
  868 + this.dialogStatus="create";
  869 + this.outerVisible = true;
  870 + this.FenStatus='addAwbh';
  871 + },
  872 + //获取默认值
  873 + getDefaultData(){
  874 + this.defaultQuery.flightno = JSON.parse(this.$route.query.flightno);
  875 + this.defaultQuery.flightdate = JSON.parse(this.$route.query.flightdate);
  876 + this.defaultQuery.originstation = JSON.parse(this.$route.query.originstation);
  877 + this.defaultQuery.destinationstation = JSON.parse(this.$route.query.destinationstation);
  878 + this.defaultQuery.awba=JSON.parse(this.$route.query.awba);
  879 + },
  880 + //获取进港理货列表
  881 + getMt5201List(){
  882 + this.tableLoading=true;
  883 + getMt5201List(this.defaultQuery).then(res =>{
  884 + this.sumNmmsCount=0;
  885 + this.sumNmmsPrice=0;
  886 + this.sumNmmsWeight=0;
  887 + let response=res.data.data;
  888 + this.tableData=response;
  889 + this.tableLoading=false;
  890 + response.forEach((item,i) => {
  891 + if(item.awba!=null&&item.awbh=="");
  892 + this.sumNmmsCount=Number(this.sumNmmsCount)+1;
  893 + this.sumNmmsPrice=Number(this.sumNmmsPrice)+Number(item.piece);
  894 + this.sumNmmsWeight=Number(this.sumNmmsWeight)+Number(item.weight);
  895 + })
  896 + });
  897 + },
  898 + //新增理货按钮事件
  899 + addTally(){
  900 + this.outerVisible = true;
  901 + this.dialogStatus="create";
  902 + this.FenStatus='ediAwbh';
  903 + this.ruleForm.flightno=JSON.parse(this.$route.query.flightno);
  904 + this.ruleForm.flightdate=JSON.parse(this.$route.query.flightdate);
  905 + this.ruleForm.originstation=JSON.parse(this.$route.query.originstation);
  906 + this.ruleForm.destinationstation=JSON.parse(this.$route.query.destinationstation);
  907 + },
  908 + //新增原始舱单数据
  909 + createData:function(formName){
  910 + let _this = this;
  911 + this.$refs[formName].validate((valid) => {
  912 + if (valid) {
  913 + _this.ruleForm.userinfo = {
  914 + username: ''
  915 + }
  916 + _this.ruleForm.userinfo.username=loginedUserInfo().username;
  917 + _this.ruleForm.status='22';
  918 + //this.ruleForm.endtime=this.ruleForm.starttime.add(Calendar.MINUTE, 15);
  919 + addMt5201(_this.ruleForm).then(res=>{
  920 + let response=res.data;
  921 + _this.code=response.code;
  922 + if(_this.code=='200'){
  923 + _this.outerVisible = false;
  924 + _this.$refs[formName].resetFields();
  925 + _this.centerDialogVisible=true;
  926 + _this.msg=response.msg;
  927 + _this.getMt5201List();
  928 + }else{
  929 + _this.outerVisible = false;
  930 + _this.centerDialogVisible=true;
  931 + _this.$refs[formName].resetFields();
  932 + _this.msg=response.msg;
  933 + }
  934 + });
  935 + } else {
  936 + console.log('error submit!!');
  937 + return false;
  938 + }
  939 + });
  940 + },
  941 + //修改进港理货数据
  942 + updateData:function(formName){
  943 + let _this = this;
  944 + this.$refs[formName].validate((valid) => {
  945 + if (valid) {
  946 + _this.ruleForm.userinfo = {
  947 + username: ''
  948 + }
  949 + _this.ruleForm.userinfo.username=loginedUserInfo().username;
  950 + ediMt5201(_this.ruleForm).then(res=>{
  951 + let response=res.data;
  952 + _this.code=response.code;
  953 + if(_this.code=='200'){
  954 + _this.outerVisible = false;
  955 + _this.centerDialogVisible=true;
  956 + _this.msg=response.msg;
  957 + _this.getMt5201List();
  958 + }else{
  959 + _this.outerVisible = false;
  960 + _this.centerDialogVisible=true;
  961 + _this.msg=response.msg;
  962 + }
  963 + });
  964 + } else {
  965 + console.log('error submit!!');
  966 + return false;
  967 + }
  968 + });
  969 + },
  970 + back(){
  971 + this.$router.go(-1);//返回上一层
  972 + },
  973 + },
  974 + computed:{
  975 + ...mapGetters(['getUserInfoStore','getUserMenuStore']) // 动态计算属性,相当于this.$store.getters.resturantName
  976 + },
  977 + //渲染方法
  978 + activated(){
  979 + this.getDefaultData();
  980 + this.getMt5201List();
  981 + }
  982 + }
  983 +</script>
  984 +
  1 +<template>
  2 + <el-container>
  3 + <el-main>
  4 + <el-row class="row-bg">
  5 + <el-col :span="24">
  6 + <div class="grid-content content">单号查询</div>
  7 + </el-col>
  8 + </el-row>
  9 + <!-- 搜索区域-->
  10 + <el-row>
  11 + <el-form :label-position="labelPosition" :model="form" ref="queryFlight"
  12 + label-width="130px" class="demo-ruleForm">
  13 + <el-col :span="5" >
  14 + <el-form-item label="" prop="awba" label-width="70px">
  15 + <el-input v-model="form.awba" style="width:250px">
  16 + <template slot="prepend">主单号</template>
  17 + </el-input>
  18 + </el-form-item>
  19 + </el-col>
  20 + <el-col :span="8" >
  21 + <el-form-item label="" prop="status" label-width="70px">
  22 + <!-- <el-input v-model="form.status" style="width:250px">-->
  23 + <!-- <template slot="prepend">运单状态</template>-->
  24 + <!-- </el-input>-->
  25 + <div style="display: inline-block;background-color: #6F8294;color: white;
  26 + border-top-left-radius: 4px;margin-right: -4px;padding-right: 14px;font-size: 12px;
  27 + border-bottom-left-radius:4px;padding-left: 14px">运单状态</div>
  28 + <el-select v-model="form.status" style="width:200px">
  29 + <el-option label="正常" value="30"></el-option>
  30 + <el-option label="未理货" value="31"></el-option>
  31 + <el-option label="无原始" value="33"></el-option>
  32 + </el-select>
  33 + </el-form-item>
  34 + </el-col>
  35 + <el-col :span="5" >
  36 + <el-button type="primary" @click="getList()">查询</el-button>
  37 + </el-col>
  38 + </el-form>
  39 + </el-row>
  40 + <!-- 表单区域-->
  41 + <el-row>
  42 + <el-table
  43 + :data="tableData"
  44 + border default-expand-all
  45 + height="500" tooltip-effect="dark"
  46 + v-loading="tableloading"
  47 + style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
  48 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small">
  49 + <el-table-column
  50 + label="主单号"
  51 + prop="awba"
  52 + width="180">
  53 + <template slot-scope="scope">
  54 + <span v-if="scope.row.stocktypeid=='AWBA'">
  55 + {{scope.row.stockpre}}-{{scope.row.stockno}}
  56 + </span>
  57 + <span v-else>
  58 + {{scope.row.stockpre}}
  59 + </span>
  60 + </template>
  61 + </el-table-column>
  62 + <el-table-column
  63 + label="分单号"
  64 + width="150">
  65 + <template slot-scope="scope">
  66 + <span v-if="scope.row.stocktypeid=='AWBA'">
  67 + </span>
  68 + <span v-else>
  69 + {{scope.row.stockno}}
  70 + </span>
  71 + </template>
  72 + </el-table-column>
  73 + <el-table-column
  74 + label="件数"
  75 + prop="pcs"
  76 + width="120">
  77 + </el-table-column>
  78 + <el-table-column
  79 + label="重量"
  80 + prop="weight"
  81 + width="120">
  82 + </el-table-column>
  83 + <el-table-column
  84 + label="起始站"
  85 + prop="sairportid"
  86 + width="120">
  87 + </el-table-column>
  88 + <el-table-column
  89 + label="目的站"
  90 + prop="eairportid"
  91 + width="120">
  92 + </el-table-column>
  93 + <el-table-column
  94 + label="货物描述"
  95 + prop="goodsname">
  96 + </el-table-column>
  97 + <el-table-column
  98 + fixed="right"
  99 + prop=""
  100 + label="报文操作"
  101 + width="120">
  102 + <template slot-scope="scope">
  103 + <el-button
  104 + size="mini"
  105 + type="success"
  106 + @click="trnList(scope.$index,scope.row)">查看</el-button>
  107 + </template>
  108 + </el-table-column>
  109 + </el-table>
  110 + </el-row>
  111 + <!--分页模块-->
  112 + <el-row style="float: right;margin-top: 20px">
  113 + <div class="block">
  114 + <el-pagination
  115 + @size-change="handleSizeChange"
  116 + @current-change="handleCurrentChange"
  117 + :current-page="pageNum"
  118 + :page-sizes="[10, 20, 30, 40]"
  119 + :page-size="pageSize"
  120 + layout="total, sizes, prev, pager, next, jumper"
  121 + :total="total">
  122 + </el-pagination>
  123 + </div>
  124 + </el-row>
  125 + <el-dialog title="运单明细" :visible.sync="dialogFormVisible" width="65%">
  126 + <el-form :model="ruleForm" :rules="rules" ref="ruleForm" :label-position="labelPosition" size="mini">
  127 + <el-row class="flightInfo">
  128 + <el-col :span="24">
  129 + <el-divider content-position="left">运单信息</el-divider>
  130 + </el-col>
  131 + </el-row>
  132 + <el-row class="flightInfo">
  133 + <el-col :span="6">
  134 + <el-form-item prop="stockpre">
  135 + <el-input readonly v-model="ruleForm.stockpre" style="width: 200px">
  136 + <template slot="prepend">主单号&emsp;</template>
  137 + </el-input>
  138 + </el-form-item>
  139 + </el-col>
  140 + <el-col :span="6">
  141 + <el-form-item prop="stockno">
  142 + <el-input readonly v-model="ruleForm.stockno" style="width: 200px">
  143 + <template slot="prepend">分单号&emsp;</template>
  144 + </el-input>
  145 + </el-form-item>
  146 + </el-col>
  147 + <el-col :span="6">
  148 + <el-form-item prop="pcs">
  149 + <el-input readonly v-model="ruleForm.pcs" style="width: 200px">
  150 + <template slot="prepend">件&emsp;&emsp;数</template>
  151 + </el-input>
  152 + </el-form-item>
  153 + </el-col>
  154 + <el-col :span="6">
  155 + <el-form-item prop="weight">
  156 + <el-input readonly v-model="ruleForm.weight" style="width: 200px">
  157 + <template slot="prepend">重&emsp;&emsp;量</template>
  158 + </el-input>
  159 + </el-form-item>
  160 + </el-col>
  161 + </el-row>
  162 + <el-row class="flightInfo">
  163 + <el-col :span="6">
  164 + <el-form-item prop="sairportid">
  165 + <el-input readonly v-model="ruleForm.sairportid" style="width: 200px">
  166 + <template slot="prepend">起始站&emsp;</template>
  167 + </el-input>
  168 + </el-form-item>
  169 + </el-col>
  170 + <el-col :span="6">
  171 + <el-form-item prop="eairportid">
  172 + <el-input readonly v-model="ruleForm.eairportid" style="width: 200px">
  173 + <template slot="prepend">目的站&emsp;</template>
  174 + </el-input>
  175 + </el-form-item>
  176 + </el-col>
  177 + <el-col :span="6">
  178 + <el-form-item prop="goodsname">
  179 + <el-input readonly v-model="ruleForm.goodsname" style="width: 200px">
  180 + <template slot="prepend">货物描述</template>
  181 + </el-input>
  182 + </el-form-item>
  183 + </el-col>
  184 + </el-row>
  185 + <!--发货人信息部分-->
  186 + <el-row class="flightInfo">
  187 + <el-col :span="24">
  188 + <el-divider content-position="left">发货人信息</el-divider>
  189 + </el-col>
  190 + </el-row>
  191 + <el-row style="margin-bottom: 0px;">
  192 + <el-col :span="6">
  193 + <el-form-item label="" prop="shprname">
  194 + <el-input readonly v-model="ruleForm.shprname" style="width: 200px">
  195 + <template slot="prepend">发货人称</template>
  196 + </el-input>
  197 + </el-form-item>
  198 + </el-col>
  199 +
  200 + <el-col :span="6">
  201 + <el-form-item label="" prop="shpraddress">
  202 + <el-input readonly v-model="ruleForm.shpraddress" style="width: 200px">
  203 + <template slot="prepend">地&emsp;&emsp;址</template>
  204 + </el-input>
  205 + </el-form-item>
  206 + </el-col>
  207 + <el-col :span="6">
  208 + <el-form-item label="" prop="shprtel">
  209 + <el-input readonly v-model="ruleForm.shprtel" style="width: 200px">
  210 + <template slot="prepend">电&emsp;&emsp;话</template>
  211 + </el-input>
  212 + </el-form-item>
  213 + </el-col>
  214 + <el-col :span="6">
  215 + <el-form-item label="" prop="shprcountyr">
  216 + <el-input readonly v-model="ruleForm.shprcountyr" style="width: 200px">
  217 + <template slot="prepend">国家代码</template>
  218 + </el-input>
  219 + </el-form-item>
  220 + </el-col>
  221 + </el-row>
  222 + <!--收货人信息部分-->
  223 + <el-row class="flightInfo">
  224 + <el-col :span="24">
  225 + <el-divider content-position="left">收货人信息</el-divider>
  226 + </el-col>
  227 + </el-row>
  228 + <el-row style="margin-bottom: 30px">
  229 + <el-col :span="6">
  230 + <el-form-item label="" prop="cnsnname">
  231 + <el-input readonly v-model="ruleForm.cnsnname" style="width: 200px">
  232 + <template slot="prepend">收货人称</template>
  233 + </el-input>
  234 + </el-form-item>
  235 + </el-col>
  236 + <el-col :span="6">
  237 + <el-form-item label="" prop="cnsnaddress">
  238 + <el-input readonly v-model="ruleForm.cnsnaddress" style="width: 200px">
  239 + <template slot="prepend">地&emsp;&emsp;址</template>
  240 + </el-input>
  241 + </el-form-item>
  242 + </el-col>
  243 + <el-col :span="6">
  244 + <el-form-item label="" prop="cnsntel">
  245 + <el-input readonly v-model="ruleForm.cnsntel" style="width: 200px">
  246 + <template slot="prepend">电&emsp;&emsp;话</template>
  247 + </el-input>
  248 + </el-form-item>
  249 + </el-col>
  250 + <el-col :span="6">
  251 + <el-form-item label="" prop="cnscountyr">
  252 + <el-input readonly v-model="ruleForm.cnscountyr" style="width: 200px">
  253 + <template slot="prepend">国家代码</template>
  254 + </el-input>
  255 + </el-form-item>
  256 + </el-col>
  257 + </el-row>
  258 + </el-form>
  259 + </el-dialog>
  260 +
  261 + </el-main>
  262 + </el-container>
  263 +</template>
  264 +
  265 +<script>
  266 + import { selectAwbList } from '../../api/wayDeclaration'
  267 +
  268 + export default {
  269 + name: "WaybillQuerys",
  270 + data(){
  271 + return{
  272 + form:{
  273 + awba:'',
  274 + status:''
  275 + },
  276 + pageNum:1,
  277 + pageSize:100,
  278 + total:0,
  279 + ruleForm:{
  280 + stockpre:'',
  281 + stockno:'',
  282 + pcs:'',
  283 + weight:'',
  284 + sairportid:'',
  285 + eairportid:'',
  286 + goodsname:'',
  287 + shprname:'',
  288 + shprtel:'',
  289 + shprcountyr:'',
  290 + shpraddress:'',
  291 + cnsnname:'',
  292 + cnsnaddress:'',
  293 + cnsntel:'',
  294 + cnscountyr:'',
  295 + },
  296 + rules:{
  297 +
  298 + },
  299 + dialogFormVisible:false,
  300 + tableData:[],
  301 + labelPosition:'left',
  302 + // pageNum: 1,
  303 + // pageSize:10,
  304 + // total:0,
  305 + tableloading:false,
  306 +
  307 + }
  308 + },
  309 + methods:{
  310 + /*分页方法*/
  311 + handleSizeChange(val) {
  312 + this.pageSize=val;
  313 + this.getList();
  314 + },
  315 + handleCurrentChange(val) {
  316 + this.currentPage=val;
  317 + this.getList();
  318 + },
  319 + // 获取消息标签列表
  320 + getList() {
  321 + const _this = this
  322 + this.tableloading = true;
  323 + selectAwbList(this.form).then((response) => {
  324 + console.log(response);
  325 + const res = response.data
  326 + if (res.code != '200') {
  327 + return _this.$message.error('获取消息收发记录,失败!')
  328 + }
  329 + // 获取列表数据
  330 + _this.tableData = res.data.list;
  331 + // 获取列表的总记录数
  332 + // _this.total = res.total
  333 + this.tableloading = false;
  334 + _this.$message.success('获取消息收发记录,成功!')
  335 + }).catch(error => {
  336 + // 关闭加载
  337 + _this.$message.error(error.toString())
  338 + this.tableloading = false;
  339 +
  340 + })
  341 + },
  342 + /*编辑主单信息*/
  343 + trnList(index, row){
  344 + this.dialogFormVisible = true;
  345 + this.ruleForm=row;
  346 + if(row.stocktypeid=="AWBA"){
  347 + this.ruleForm.stockpre=row.stockpre+"-"+row.stockno;
  348 + this.ruleForm.stockno="";
  349 + }
  350 + },
  351 + }
  352 + }
  353 +</script>
  354 +
  355 +<style scoped>
  356 + .grid-content {
  357 + height: 36px;
  358 + line-height: 36px;
  359 + }
  360 + .el-dialog__body{text-align: center}
  361 + .content {
  362 + border-left: 4px #409EFF solid;
  363 + padding-left: 10px;
  364 + background-color: #f9fafc;
  365 + margin-bottom: 2px
  366 + }
  367 +
  368 + .row-bg{
  369 + background-color: white;
  370 + }
  371 +</style>
  1 +<template>
  2 + <el-container>
  3 + <el-main>
  4 + <el-row class="row-bg">
  5 + <el-col :span="24"><div class="grid-content content co">进港运单申报</div></el-col>
  6 + </el-row>
  7 + <!--查询条件-->
  8 + <el-row style="display: block;background-color: white">
  9 + <el-row>
  10 + <el-col :span="6">
  11 + <el-input placeholder="" v-model="defaultQuery.awba" style="width: 90%" clearable>
  12 + <template slot="prepend">主单号</template>
  13 + </el-input>
  14 + </el-col>
  15 + <el-col :span="6">
  16 + <el-input placeholder="" v-model="vcarrier" style="width: 90%" clearable>
  17 + <template slot="prepend">承运人</template>
  18 + </el-input>
  19 + </el-col>
  20 + <el-col :span="6">
  21 + <el-input placeholder="" v-model="defaultQuery.flightno" style="width: 90%" clearable>
  22 + <template slot="prepend">航班号</template>
  23 + </el-input>
  24 + </el-col>
  25 + <el-col :span="6">
  26 + <div class="ip">
  27 + 航班日期
  28 + </div>
  29 + <el-date-picker
  30 + v-model="defaultQuery.flightdate"
  31 + type="date"
  32 + value-format="yyyy-MM-dd" style="width: 140px"
  33 + placeholder="航班日期">
  34 + </el-date-picker>
  35 + </el-col>
  36 + </el-row>
  37 + <el-row >
  38 + <el-col :span="6">
  39 + <div class="ip">
  40 + 业务状态
  41 + </div>
  42 + <el-select v-model="defaultQuery.status" placeholder="选择状态" style="width: 125px">
  43 + <el-option
  44 + v-for="item in options"
  45 + :key="item.value"
  46 + :label="item.label"
  47 + :value="item.value">
  48 + </el-option>
  49 + </el-select>
  50 + </el-col>
  51 + <el-col :span="6">
  52 + <div class="ip">
  53 + 报文类型
  54 + </div>
  55 + <el-select v-model="defaultQuery.messageType" placeholder="报文类型" style="width: 125px">
  56 + <el-option
  57 + v-for="item in options2"
  58 + :key="item.value"
  59 + :label="item.label"
  60 + :value="item.value">
  61 + </el-option>
  62 + </el-select>
  63 + </el-col>
  64 + <el-col :span="6">
  65 + <el-col :span="8" style="margin-right: 0px">
  66 + <el-button type="primary" v-on:click="QueryData" icon="el-icon-search">查&nbsp;询</el-button>
  67 + </el-col>
  68 + <!--<el-col :span="16" style="margin-right: 0px">
  69 + <el-button type="primary">批量修改状态</el-button>
  70 + </el-col>-->
  71 + </el-col>
  72 + </el-row>
  73 +
  74 + </el-row>
  75 + <!--查询结果样式-->
  76 + <el-row style="font-size: xx-small">
  77 + <el-col :span="1" class="mark"><div class="grid-content bg" style="color: red"><span>注:</span></div></el-col>
  78 + <el-col :span="3" class="mark"><div class="grid-content bg mainse" style="border-radius: 5px;margin-right: 5px;background-color: rgba(99,205,218,0.4)" ><span>主单原始舱单</span></div></el-col>
  79 + <el-col :span="3" class="mark"><div class="grid-content bg fense" style="border-radius: 5px;margin-right: 5px;background-color: rgba(119,139,235,0.3)"><span>分单原始舱单</span></div></el-col>
  80 + <el-col :span="3" class="mark"><div class="grid-content bg tallse" style="border-radius: 5px;margin-right: 5px;background-color: rgba(243,166,131,0.4)"><span>主单理货报告</span></div></el-col>
  81 + <el-col :span="3" class="mark"><div class="grid-content bg tallfense" style="border-radius: 5px;margin-right: 5px;background-color: rgba(247,215,148,0.4)"><span>分单理货报告</span></div></el-col>
  82 + </el-row>
  83 + <!--查询列表-->
  84 + <el-row>
  85 + <el-col :span="24">
  86 + <template>
  87 + <el-table
  88 + v-loading="tableloading"
  89 + ref="multipleTable"
  90 + :data="tableData"
  91 + tooltip-effect="dark"
  92 + style="border-radius: 10px 10px 0px 0px;line-height: 25px;min-height: 500px"
  93 + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
  94 + :default-sort = "{prop: 'date', order: 'descending'}"
  95 + @selection-change="handleSelectionChange">
  96 + <el-table-column
  97 + type="selection"
  98 + width="45">
  99 + </el-table-column>
  100 + <el-table-column
  101 + fixed="left"
  102 + label="操作"
  103 + width="75">
  104 + <template slot-scope="scope">
  105 + <el-button
  106 + v-if="scope.row.stype=='MT1201'"
  107 + @click="handleClick(scope.row)" type="text" size="small">原始舱单</el-button>
  108 + <el-button
  109 + v-else
  110 + @click="handleTally(scope.row)" type="text" size="small">进港理货</el-button>
  111 + </template>
  112 + </el-table-column>
  113 + <el-table-column
  114 + label="航班号"
  115 + width="75">
  116 + <template slot-scope="scope">
  117 + <span>{{scope.row.carrier}}{{scope.row.flightno}}</span>
  118 + </template>
  119 + </el-table-column>
  120 + <el-table-column
  121 + prop="flightdate"
  122 + label="航班日期"
  123 + width="95">
  124 + </el-table-column>
  125 + <el-table-column
  126 + label="航段"
  127 + width="90">
  128 + <template slot-scope="scope">
  129 + <span>{{scope.row.originstation}}-{{scope.row.destinationstation}}</span>
  130 + </template>
  131 + </el-table-column>
  132 + <el-table-column
  133 + label="主单号"
  134 + width="115"
  135 + >
  136 + <template slot-scope="scope">
  137 + <span v-if="scope.row.stype=='MT1201'&&scope.row.awbh==''" style="background-color:rgba(99,205,218,0.4);width: 100%;height:100%;display:block;color: black">
  138 + {{scope.row.awba}}
  139 + </span>
  140 + <span v-else-if="scope.row.stype=='MT1201'&&scope.row.awbh!=''" style="background-color:rgba(119,139,235,0.3);width: 100%;height:100%;display:block;color: black">
  141 + {{scope.row.awba}}
  142 + </span>
  143 + <span v-else-if="scope.row.stype=='MT5201'&&scope.row.awbh==''" style="background-color:rgba(243,166,131,0.4);width: 100%;height:100%;display:block;color: black">
  144 + {{scope.row.awba}}
  145 + </span>
  146 + <span v-else-if="scope.row.stype=='MT5201'&&scope.row.awbh!=''" style="background-color:rgba(247,215,148,0.4);width: 100%;height:100%;display:block;color: black">
  147 + {{scope.row.awba}}
  148 + </span>
  149 + </template>
  150 + </el-table-column>
  151 + <el-table-column
  152 + prop="awbh"
  153 + label="分单号"
  154 + width="130">
  155 + </el-table-column>
  156 + <el-table-column
  157 + prop="piece"
  158 + label="件数"
  159 + width="60">
  160 + </el-table-column>
  161 + <el-table-column
  162 + prop="weight"
  163 + label="重量"
  164 + width="70">
  165 + </el-table-column>
  166 + <el-table-column
  167 + prop="customcode"
  168 + label="关区号"
  169 + width="65">
  170 + </el-table-column>
  171 + <el-table-column
  172 + prop="actime"
  173 + label="时间"
  174 + width="155">
  175 + <template slot-scope="scope">{{timestampToTime(scope.row.actime)}}</template>
  176 + </el-table-column>
  177 + <el-table-column
  178 + prop="status"
  179 + label="状态"
  180 + width="90" :formatter="formatStatus">
  181 + </el-table-column>
  182 + <el-table-column
  183 + label="回执内容"
  184 + width="250">
  185 + <template slot-scope="scope">
  186 + <span v-if="scope.row.ext5 && scope.row.ext5.indexOf('异常') != -1" style="color: #F56C6C">
  187 + {{scope.row.ext5}}
  188 + </span>
  189 + <span v-else-if="scope.row.ext5 && scope.row.ext5.indexOf('不通过') != -1" style="color: #F56C6C">
  190 + {{scope.row.ext5}}
  191 + </span>
  192 + <span v-else-if="scope.row.ext5 && scope.row.ext5.indexOf('不接受') != -1" style="color: #F56C6C">
  193 + {{scope.row.ext5}}
  194 + </span>
  195 + <span v-else-if="scope.row.status=='01' || scope.row.status=='11'" style="color: #67C23A">
  196 + {{scope.row.ext5}}
  197 + </span>
  198 + <span v-else-if="scope.row.status=='02' || scope.row.status=='03'" style="color: #E6A23C">
  199 + {{scope.row.ext5}}
  200 + </span>
  201 + <span v-else-if="scope.row.status=='12' || scope.row.status=='13'" style="color: #f56c6c">
  202 + {{scope.row.ext5}}
  203 + </span>
  204 + <span v-else style="color: #909399;">
  205 + {{scope.row.ext5}}
  206 + </span>
  207 + </template>
  208 + </el-table-column>
  209 + <!-- || scope.row.ext5.indexOf('不通过') != -1 || scope.row.ext5.indexOf('不接受') != -1-->
  210 + </el-table>
  211 + </template>
  212 + </el-col>
  213 + </el-row>
  214 + <!--分页部分-->
  215 + <el-row>
  216 + <el-col>
  217 + <div class="block">
  218 + <el-pagination
  219 + @size-change="handleSizeChange"
  220 + @current-change="handleCurrentChange"
  221 + :current-page="currentPage"
  222 + :page-sizes="[20, 50, 100, 200]"
  223 + :page-size="pageSize"
  224 + layout="total, sizes, prev, pager, next, jumper"
  225 + :total="total">
  226 + </el-pagination>
  227 + </div>
  228 + </el-col>
  229 + </el-row>
  230 + </el-main>
  231 + </el-container>
  232 +</template>
  233 +
  234 +<style scoped>
  235 + .ip{
  236 + max-width: 100px;
  237 + margin-right: -5px;
  238 + display: inline-block;
  239 + background-color: #6F8294;
  240 + color: #ffffff;
  241 + border: 1px solid #DCDFE6;
  242 + vertical-align: middle;
  243 + padding: 5px 18px;
  244 + white-space: nowrap;
  245 + border-top-right-radius: 0px;
  246 + border-top-left-radius: 4px;
  247 + border-bottom-left-radius: 4px;
  248 + border-bottom-right-radius: 0px;
  249 + font-size: 10px;
  250 + }
  251 + .co{height: 36px;line-height: 36px;}
  252 + .co{border-left: 4px #409EFF solid;padding-left: 10px;background-color: #f9fafc;margin-bottom: 2px}
  253 + .row-bg{background-color: white;padding:0px;}
  254 + .el-row{margin-bottom: 10px;}
  255 + .sel{display: inline;}
  256 + .mark{height:24px;}
  257 + .bg{height:24px;text-align: center;line-height:24px;min-height: 24px}
  258 + .mainse{background: #67C23A}
  259 + .fense{background-color: #409eff}
  260 + .tallse{background-color: #FF8C00}
  261 + .tallfense{background-color: #e6a23c}
  262 + .cell{background: #5BB75B}
  263 + .cell2{background-color: #12B399}
  264 + .el-input-group{
  265 + display: table;
  266 + }
  267 +</style>
  268 +<script>
  269 + import { QueryData } from '../../api/wayDeclaration'
  270 + import {mapActions, mapGetters} from 'vuex'
  271 + import {loginedUserInfo} from "../../api/user";
  272 + import jsutil from "@/common/js/util";
  273 + export default {
  274 + name:'Waybills',
  275 + data() {
  276 + return {
  277 + defaultQuery:{
  278 + awba:'',
  279 + carrier:'',
  280 + flightno:'',
  281 + flightdate:'',
  282 + status:'',
  283 + messageType:'',
  284 + departmentid:''
  285 + },
  286 + options: [
  287 + {
  288 + value: '',
  289 + label: '业务状态'
  290 + }, {
  291 + value: '22',
  292 + label: '未发送'
  293 + }, {
  294 + value: '23',
  295 + label: '已发舱单报'
  296 + }, {
  297 + value: '03',
  298 + label: '舱单报退单'
  299 + }],
  300 + options2: [
  301 + {
  302 + value: '',
  303 + label: '业务类型'
  304 + }, {
  305 + value: 'MT1201',
  306 + label: '原始舱单'
  307 + }, {
  308 + value: 'MT5201',
  309 + label: '进港理货'
  310 + }],
  311 + tableData: [],
  312 + multipleSelection: [],
  313 + currentPage:1,
  314 + pageSize:20,
  315 + total:0,
  316 + tableloading:false
  317 + }
  318 + },
  319 + methods:{
  320 + handleSelectionChange(val) {
  321 + this.multipleSelection = val;
  322 + },
  323 + handleSizeChange(val) {
  324 + this.pageSize=val;
  325 + this.QueryData();
  326 + },
  327 + handleCurrentChange(val) {
  328 + this.currentPage=val;
  329 + this.QueryData();
  330 + },
  331 + //状态适配
  332 + formatStatus:function (row,column) {
  333 + return row.status=='01'?'接受申报':row.status=='02'?'待人工审核':row.status=='03'?'退单'
  334 + :row.status=='11'?'放行':row.status=='12'?'拒装':row.status=='13'?'禁卸'
  335 + :row.status=='21'?'可自动发送':row.status=='22'?'未发送':row.status=='23'?'已发送新增报'
  336 + :row.status=='24'?'已发送删除报':row.status=='25'?'已发送修改报':'';
  337 + },
  338 + //条件查询方法
  339 + QueryData(){
  340 + if(jsutil.checkNull(this.defaultQuery.awba)||jsutil.checkNull(this.defaultQuery.flightdate)){
  341 + let params={
  342 + currentPage:this.currentPage,
  343 + pageSize:this.pageSize,
  344 + awba:this.defaultQuery.awba,
  345 + carrier:this.defaultQuery.carrier,
  346 + flightno:this.defaultQuery.flightno,
  347 + flightdate:this.defaultQuery.flightdate,
  348 + status:this.defaultQuery.status,
  349 + messageType:this.defaultQuery.messageType,
  350 + departmentid:loginedUserInfo().companyInfo.departmentid
  351 + };
  352 + this.tableloading=true;
  353 + QueryData(params).then(res =>{
  354 + let response=res.data.data;
  355 + this.tableData=response.list;
  356 + this.total=response.total;
  357 + this.tableloading = false;
  358 + }).catch(err => {
  359 + this.tableloading = false;
  360 + });
  361 + }
  362 + else {
  363 + this.$confirm('主单号和航班日期至少选填一项!', '提示', {
  364 + confirmButtonText: '确定',
  365 + cancelButtonText: '取消',
  366 + type: 'warning'
  367 + })
  368 + }
  369 + },
  370 + //点击进入原始页面
  371 + handleClick(row){
  372 + this.$router.push({path:'/origmaster',
  373 + query:{
  374 + flightno:row.carrier+row.flightno,
  375 + destinationstation:row.destinationstation,
  376 + awba:row.awba,
  377 + flightdate:row.flightdate,
  378 + originstation:row.originstation
  379 + }
  380 + });
  381 + },
  382 + //点击进入理货页面
  383 + handleTally(row){
  384 + this.$router.push({path:'/tallymaster',query:{flightno:JSON.stringify(row.carrier+row.flightno),destinationstation:JSON.stringify(row.destinationstation),awba:JSON.stringify(row.awba),flightdate:JSON.stringify(row.flightdate),originstation:JSON.stringify(row.originstation)}});
  385 + },
  386 + //table显示时间转换
  387 + timestampToTime(timestamp) {
  388 + var date = new Date(timestamp);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
  389 + var Y = date.getFullYear() + '-';
  390 + var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
  391 + var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate()) + ' ';
  392 + var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours()) + ':';
  393 + var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes()) + ':';
  394 + var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
  395 + return Y+M+D+h+m+s;
  396 + },
  397 + },
  398 + computed:{
  399 + vcarrier:{
  400 + get:function () {
  401 + return this.defaultQuery.carrier;
  402 + },
  403 + set:function (val) {
  404 + this.defaultQuery.carrier=val.toUpperCase();
  405 + }
  406 + },
  407 + ...mapGetters(['getUserInfoStore','getUserMenuStore']) // 动态计算属性,相当于this.$store.getters.resturantName
  408 + },
  409 +
  410 + }
  411 +</script>