作者 zhangFan

新增和修改页面

... ... @@ -85,7 +85,7 @@
},
"adler-32": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/adler-32/-/adler-32-1.2.0.tgz",
"resolved": "https://registry.npm.taobao.org/adler-32/download/adler-32-1.2.0.tgz",
"integrity": "sha1-aj5r8KY5ALoVZSgIyxXGgT0aXyU=",
"requires": {
"exit-on-epipe": "~1.0.1",
... ... @@ -613,8 +613,8 @@
},
"async-validator": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-1.8.5.tgz",
"integrity": "sha512-tXBM+1m056MAX0E8TL2iCjg8WvSyXu0Zc8LNtYqrVeyoL3+esHRZ4SieE9fKQyyU09uONjnMEjrNBMqT0mbvmA==",
"resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz",
"integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
"requires": {
"babel-runtime": "6.x"
}
... ... @@ -896,8 +896,8 @@
},
"babel-helper-vue-jsx-merge-props": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha512-gsLiKK7Qrb7zYJNgiXKpXblxbV5ffSwR0f5whkPAaBAR4fhi6bwRZxX9wBlIc5M/v8CCkXUbXZL4N/nSE97cqg=="
"resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
"integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY="
},
"babel-helpers": {
"version": "6.24.1",
... ... @@ -2325,7 +2325,7 @@
},
"codepage": {
"version": "1.14.0",
"resolved": "https://registry.npmjs.org/codepage/-/codepage-1.14.0.tgz",
"resolved": "https://registry.npm.taobao.org/codepage/download/codepage-1.14.0.tgz",
"integrity": "sha1-jL4lSBMjVZ19MHVxsP/5HnodL5k=",
"requires": {
"commander": "~2.14.1",
... ... @@ -2961,8 +2961,8 @@
},
"deepmerge": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-1.5.2.tgz",
"integrity": "sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ=="
"resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz?cache=0&sync_timestamp=1570547201087&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeepmerge%2Fdownload%2Fdeepmerge-1.5.2.tgz",
"integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
},
"define-property": {
"version": "2.0.2",
... ... @@ -3227,13 +3227,15 @@
"dev": true
},
"element-ui": {
"version": "1.4.13",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-1.4.13.tgz",
"integrity": "sha512-EGdw/qC2RUmCDzAy3X06LL+jDWmrMezMndviE5CnUDi2XcZz/uZUVVj6bJ6piY+Flw7HNO+Ed81LXrdZ2v+nXA==",
"version": "2.12.0",
"resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.12.0.tgz",
"integrity": "sha1-qJO8Ea5Pfbt+nVQWBvI+ZD8THuQ=",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
"deepmerge": "^1.2.0",
"normalize-wheel": "^1.0.1",
"resize-observer-polyfill": "^1.5.0",
"throttle-debounce": "^1.0.1"
}
},
... ... @@ -6294,6 +6296,11 @@
"sort-keys": "^1.0.0"
}
},
"normalize-wheel": {
"version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
},
"npm": {
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/npm/-/npm-6.10.3.tgz",
... ... @@ -10525,7 +10532,7 @@
},
"raw-loader": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz",
"resolved": "https://registry.npm.taobao.org/raw-loader/download/raw-loader-0.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fraw-loader%2Fdownload%2Fraw-loader-0.5.1.tgz",
"integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao="
},
"read-pkg": {
... ... @@ -11118,6 +11125,11 @@
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
"dev": true
},
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresize-observer-polyfill%2Fdownload%2Fresize-observer-polyfill-1.5.1.tgz",
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
},
"resolve": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.12.0.tgz",
... ... @@ -12034,8 +12046,8 @@
},
"throttle-debounce": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz",
"integrity": "sha512-XH8UiPCQcWNuk2LYePibW/4qL97+ZQ1AN3FNXwZRBNPPowo/NRU5fAlDCSNBJIYCKbioZfuYtMhG4quqoJhVzg=="
"resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz",
"integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
},
"through": {
"version": "2.3.8",
... ...
... ... @@ -12,7 +12,7 @@
"dependencies": {
"axios": "^0.19.0",
"echarts": "^3.3.2",
"element-ui": "^1.2.8",
"element-ui": "^2.12.0",
"eslint": "^5.14.1",
"file-saver": "^2.0.2",
"font-awesome": "^4.7.0",
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/country'
export const getCountry = params => { return http.get(`${baseUrl}/getCountryCode`, params); };
export const getByCountryCodeForName = params => { return http.post(`${baseUrl}/getByCountryCodeForName`,params)};
export const getByCountryCode = params => { return http.post(`${baseUrl}/getByCountryCode`,params)};
... ...
... ... @@ -23,6 +23,16 @@ export default {
}
});
},
getUrlEnclode(url, params) {
return axios({
method: 'GET',
url: url,
data: qs.stringify(params),
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
}
});
},
put(url, params){
return axios({
method: 'PUT',
... ...
import http from './http.js'
let baseUrl = 'nmms-server/nmms/mt1201'
export const getMt1201ListForParam = params => { return http.get(`${baseUrl}/getMt1201ListForParam`, params); };
export const deleteByIsDelete = params => { return http.del(`${baseUrl}/deleteByIsDelete`,params)};
export const updateStatus = params => { return http.put(`${baseUrl}/updateStatus`, { params: params }); };
export const updateMT1201 = params => { return http.put(`${baseUrl}/updateMT1201`,params)};
export const addMt1201 = params => { return http.post(`${baseUrl}/addMt1201`,params)};
... ...
<template>
<el-table :data="formatData" :row-style="showRow" v-bind="$attrs">
<el-table-column type="selection" width="50" align="center"></el-table-column>
<el-table-column v-if="columns.length===0" width="40" align="center">
<el-table-column v-if="columns.length===0" width="55" align="center">
<template slot-scope="scope">
<span v-for="space in scope.row._level" :key="space" class="ms-tree-space"/>
<span v-if="iconShow(0,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)">
... ...
... ... @@ -2,7 +2,7 @@ import babelpolyfill from 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-default/index.css'
import 'element-ui/lib/theme-chalk/index.css'
//import './assets/theme/theme-green/index.css'
import VueRouter from 'vue-router'
import store from './vuex/store'
... ...
... ... @@ -8,7 +8,7 @@ const type = [{
value: 'CN',
label: 'PASSPORT'
}, {
value: 'CN',
value: 'US',
label: 'OC'
}, {
value: 'CN',
... ...
<script src="../../api/log_api.js"></script>
<template>
<div class="app-container">
<div class="filter-container">
<el-input v-model="listQuery.awba" style="width: 200px;" class="filter-item" placeholder="运单号"/>
<el-input v-model="listQuery.flightno" style="width: 200px;" class="filter-item" placeholder="航班号"/>
<el-date-picker v-model="listQuery.flightdate" type="datetime" placeholder="航班日期"
class="filter-item"></el-date-picker>
<el-select v-model="listQuery.customcode" class="filter-item" placeholder="请选择关区代码">
<el-option v-for="item in manifestCustoms" :key="item" :label="item" :value="item"></el-option>
</el-select>
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="handleFilter">{{
$t('table.search') }}
</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-edit"
@click="handleCreate">{{ $t('table.add') }}
</el-button>
<el-button class="filter-item" style="margin-left: 10px;" type="primary" icon="el-icon-message"
@click="handleCreate">批量发送
</el-button>
</div>
<tree-table :data="orgData" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe
style="font-size: 13px" border @selection-change="handleSelectionChange">
<el-table-column prop="waybillNo" label="主单号" width="130px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awba }}</span>
</template>
</el-table-column>
<el-table-column label="分单号" width="120px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.awbh }}</span>
</template>
</el-table-column>
<el-table-column label="航班号" width="90px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carrier +scope.row.flightno }}</span>
</template>
</el-table-column>
<el-table-column label="航班日期" width="120px" align="center" sortable>
<template slot-scope="scope">
<span>{{ scope.row.flightdate }}</span>
</template>
</el-table-column>
<el-table-column label="起始站" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.originstation }}</span>
</template>
</el-table-column>
<el-table-column label="目的站" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.destinationstation }}</span>
</template>
</el-table-column>
<el-table-column label="件数" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.piece }}</span>
</template>
</el-table-column>
<el-table-column label="重量" width="70px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.weight }}</span>
</template>
</el-table-column>
<!--<el-table-column :label="$t('table.status')" width="90px" sortable>-->
<!--<template slot-scope="scope">-->
<!--<el-tag :type="scope.row.status | statusFilter">{{ scope.row.status }}</el-tag>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="回执内容" width="300px" align="center">
<template slot-scope="scope">
<span>{{ scope.row.customText }}</span>
<!--<div>-->
<!--<el-progress :percentage="scope.row.customComplate" :status="scope.row.status | statusFilter"/>-->
<!--</div>-->
</template>
</el-table-column>
<el-table-column :label="$t('table.actions')" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="handleUpdate(scope.row)">快速编辑</el-button>
<el-button v-if="scope.row.status!='41301'" size="mini" type="success"
@click="handleModifyStatus(scope.row,'41301')">{{ $t('table.publish') }}
</el-button>
<el-button v-if="scope.row.status!='10002'" size="mini"
@click="handleModifyStatus(scope.row,'10002')">客服反馈
</el-button>
<el-button v-if="scope.row.status=='10002'" size="mini" type="danger"
@click="handleModifyStatus(scope.row,'deleted')">{{ $t('table.delete') }}
</el-button>
<el-switch
v-model="scope.row.resend"
@change="handleSwitch(scope.row)"
active-color="#13ce66"
inactive-color="#ff4949"
:key="scope.row.id"
active-text="可发"
inactive-text="禁发">
</el-switch>
</template>
</el-table-column>
</tree-table>
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit"
@pagination="getList"/>
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible">
<el-form ref="formData" :inline="true" :rules="rules" :model="temp" label-width="110px"
style="font-size: 13px" class="el-dialog-div">
<div class="tags">
<el-tag type="info" effect="plain">
航班信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<el-form-item label="航班号" prop="flightno">
<div v-if="dialogStatus === 'update'">
<el-input disabled="" v-model="temp.carrier + temp.flightno"/>
</div>
<div v-else>
<el-input v-model="flightno"/>
</div>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="航班日期" prop="flightdate">
<div v-if="dialogStatus === 'update'">
<el-date-picker disabled="" :picker-options="pickerOptions"
v-model="temp.flightdate" align="right"
type="date" placeholder="请输入航班日期" style="width: 87%"/>
</div>
<div v-else>
<el-date-picker :picker-options="pickerOptions" v-model="temp.flightdate"
align="right"
type="date" placeholder="请输入航班日期" style="width: 87%"/>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<div v-if="dialogStatus === 'update'">
<el-form-item label="起始站" prop="originstation">
<el-input disabled="" v-model="originstation"/>
</el-form-item>
</div>
<div v-else>
<el-form-item label="起始站" prop="originstation">
<el-input v-model="originstation"/>
</el-form-item>
</div>
</el-col>
<el-col :span="10">
<el-form-item label="目的站" prop="destinationstation">
<div v-if="dialogStatus === 'update'">
<el-input disabled="" v-model="destinationstation"/>
</div>
<div v-else prop="destinationstation">
<el-input v-model="destinationstation"/>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="是否分批" prop="splitcode">
<el-select v-model="temp.splitcode" class="filter-item" placeholder="请选择是否分批"
style="width: 93%">
<el-option v-for="item in splitcodes" :key="item" :label="item"
:value="item"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</div>
<div class="tags">
<el-tag type="info" effect="plain">
航程信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<el-form-item label="起始航站" prop="awbinfo.sairportid">
<el-input v-model="sairportid"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="目的地" prop="awbinfo.eairportid">
<el-input v-model="eairportid"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="承运人1" prop="awbinfo.by1">
<el-input v-model="by1"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="到达航站1" prop="awbinfo.dest1">
<el-input v-model="dest1"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="承运人2">
<el-input v-model="by2"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="到达航站2">
<el-input v-model="dest2"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="承运人3">
<el-input v-model="by3"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="到达航站3">
<el-input v-model="dest3"/>
</el-form-item>
</el-col>
</el-row>
</div>
<div class="tags">
<el-tag type="info" effect="plain">
运单信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<div v-if="dialogStatus === 'update'">
<el-form-item label="主单号">
<el-input disabled="" v-model="temp.awba"/>
</el-form-item>
</div>
<div v-else>
<el-form-item label="主单号" prop="awba">
<el-input v-model="temp.awba"/>
</el-form-item>
</div>
</el-col>
<el-col :span="10">
<el-form-item label="分单号" >
<div v-if="dialogStatus === 'update' ">
<el-input disabled v-model="awbh"/>
</div>
<div v-else>
<el-input v-model="awbh"/>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="舱单件数" prop="piece">
<el-input v-model.number="temp.piece"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="舱单重量" prop="weight">
<el-input v-model.number="temp.weight"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="关区代码" prop="customcode">
<el-select v-model="temp.customcode" class="filter-item" placeholder="请选择关区代码"
style="width: 93%">
<el-option v-for="item in manifestCustoms" :key="item" :label="item"
:value="item"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="海关状态" prop="goodsType">
<el-select v-model="temp.goodsType" class="filter-item" placeholder="请录入货物类型"
style="width: 93%">
<el-option v-for="item in customTypes" :key="item" :label="item" :value="item"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="付费方式" prop="awbinfo.collected">
<el-select v-model="temp.awbinfo.collected" class="filter-item" placeholder="付费方式"
style="width: 93%">
<el-option
v-for="item in payTypes"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="特货代码">
<el-input v-model="specopeid"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="货物描述" prop="goodsname">
<el-input v-model="goodsname"/>
</el-form-item>
</el-col>
</el-row>
</div>
<div class="tags">
<el-tag type="info" effect="plain">
发货人信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<el-form-item label="发货人名称" prop="awbinfo.shprname">
<el-input v-model="shprname"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="地址" prop="awbinfo.shpraddress">
<el-input v-model="shpraddress"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="电话" prop="awbinfo.shprtel">
<el-input v-model="temp.awbinfo.shprtel"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="传真">
<el-input v-model="temp.awbinfo.shprmobiletype"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="国家代码" prop="awbinfo.shprcountyr">
<el-select
:remote-method="remoteMethod"
:loading="loading"
v-model="shprcountyr"
filterable
remote
placeholder="请选择" style="width: 93%;">
<el-option
v-for="item in countryOption"
:key="item.value"
:label="item.label"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="14">
<el-col :span="16">
<el-form-item label="企业代码类型" prop="awbinfo.shpcomidpre">
<el-select
v-model="shpcomidpre"
filterable
placeholder="请选择企业代码类型">
<el-option
v-for="item in shpCompnyTypeOption"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item prop="awbinfo.shpcomidpno">
<el-input v-model="shpcomidpno" placeholder="企业代码"/>
</el-form-item>
</el-col>
</el-col>
</el-row>
</div>
<div class="tags">
<el-tag type="info" effect="plain">
收货人信息
</el-tag>
</div>
<div class="row-bg">
<el-row>
<el-col :span="10">
<el-form-item label="收货人名称" prop="awbinfo.cnsnname">
<el-input v-model="cnsnname"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="地址" prop="awbinfo.cnsnaddress">
<el-input v-model="cnsnaddress"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="电话" prop="awbinfo.cnsntel">
<el-input v-model="temp.awbinfo.cnsntel"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="传真">
<el-input v-model="temp.awbinfo.cnsrmobiletype"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="国家代码" prop="awbinfo.cnscountyr">
<el-select
:remote-method="remoteMethod"
:loading="loading"
v-model="cnscountyr"
filterable
remote
placeholder="请选择" style="width: 93%;">
<el-option
v-for="item in countryOption"
:key="item.value"
:label="item.label"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.value }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="14">
<el-col :span="16">
<el-form-item label="企业代码类型" prop="awbinfo.csgcustomerid">
<el-select
v-model="cnscomidpre"
filterable
placeholder="请选择企业代码类型">
<el-option
v-for="item in shpCompnyTypeOption"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item prop="awbinfo.cnscomidno">
<el-input v-model="cnscomidno" placeholder="企业代码"/>
</el-form-item>
</el-col>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="具体收货人名称" prop="awbinfo.cnsrctcname">
<el-input v-model="cnsrctcname"/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="具体收货人电话" prop="awbinfo.cnsrctctel">
<el-input v-model="temp.awbinfo.cnsrctctel"/>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">{{ $t('table.cancel') }}</el-button>
<el-button type="primary" @click="dialogStatus==='create'?createData():updateData()">{{
$t('table.confirm') }}
</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import treeTable from '@/components/TreeTable'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves' // Waves directive
import country from '@/utils/country.js'
import dangerGoods from '@/utils/dangerGoods.js'
import goodsPackage from '@/utils/goodsPackage.js'
import {getCountry, getByCountryCode, getByCountryCodeForName} from "@/api/country";
import {addMt1201, updateMT1201, updateStatus, deleteByIsDelete, getMt1201ListForParam} from '@/api/orgManifest'
import {Message} from "element-ui";
treeTable.expandAll = {
type: Boolean,
default: false
}
export default {
name: 'OrgManifest',
components: {treeTable, Pagination},
directives: {waves},
filters: {
statusFilter(status) {
const statusMap = {
10003: '',
41301: 'success',
10002: 'info',
10000: 'danger',
45103: 'warning',
wrong: 'exception'
}
return statusMap[status]
},
typeFilter(type) {
return calendarTypeKeyValue[type]
}
},
data() {
return {
func: treeToArray,
expandAll: true,
total: 0,
loading: false,
listLoading: true,
downloadLoading: false,
multipleSelection: [],
dialogFormVisible: false,
dialogStatus: '',
country: country,
countryOption: [],
shpCompnyTypeOption: [],
dangerGoods: dangerGoods,
goodsPackage: goodsPackage,
textMap: {
update: '编辑',
create: '添加'
},
listQuery: {
pageSize: 1,
limitSize: 20,
awba: undefined,
flightno: undefined,
flightdate: undefined,
customcode: undefined
},
temp: {
awba: undefined,
awbh: undefined,
customcode: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
splitcode: undefined,
uldType: undefined,
uldNo: undefined,
status: undefined,
awbinfo: {
specopeid: undefined,
shprname: undefined,
shprmobiletype: undefined,
shprtel: undefined,
shpraddress: undefined,
shprcountyr: undefined,
shpcomidpre:undefined,
shpcomidpno: undefined,
cnsnname: undefined,
cnsrmobiletype: undefined,
cnsntel: undefined,
cnsnaddress: undefined,
cnscountyr: undefined,
cnscomidpre: undefined,
cnscomidno: undefined,
cnsrctcname: undefined,
cnsrctctel: undefined,
cargonm: undefined,
sairportid: undefined,
dest1city: undefined,
by1: undefined,
dest1: undefined,
by2: undefined,
dest2: undefined,
by3: undefined,
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '0'
}
},
manifestCustoms: ['4604', '4620', '4613'],
customTypes: ['普通货物', '国际转运货物', '国内转关', '空箱', '快件'],
payTypes: [{label: '预付', value: '0'}, {label: '到付', value: '1'}],
splitcodes: ['是', '否'],
orgData: [],
countryList: [],
countryResultList: [],
shpCompnyList: [],
pickerOptions: {
shortcuts: [
{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date())
}
},
{
text: '昨天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '明天',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() + 3600 * 1000 * 24)
picker.$emit('pick', date)
}
},
{
text: '一周前',
onClick(picker) {
const date = new Date()
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
picker.$emit('pick', date)
}
}
]
},
args: [null, null, 'timeLine'],
selectCountry: {
countryNameCn: undefined,
countryCode: undefined
},
rules: {
weight: [{type: 'number', required: true, message: '重量必须为数字', trigger: 'change'}],
piece: [{type: 'number', required: true, message: '件数必须为数字', trigger: 'change'}],
destinationstation: [{required: true, message: '运单目的地必须输入', trigger: 'change'}],
originstation: [{required: true, message: '运单起始站必须数据', trigger: 'change'}],
flightdate: [{required: true, message: '航班日期必须输入', trigger: 'change'}],
flightno: [{required: true, message: '航班号必须输入', trigger: 'change'}],
customcode: [{required: true, message: '关区代码必须选择', trigger: 'change'}],
awba: [{required: true, message: '运单号必须输入', trigger: 'change'}],
'awbinfo.collected': [{required: true, message: '付款方式必选', trigger: 'change'}],
goodsname: [{required: true, message: '货物描述不能为空', trigger: 'change'}],
'awbinfo.sairportid': [{required: true, message: '起始航站不能为空', trigger: 'change'}],
'awbinfo.by1': [{required: true, message: '承运人不能为空', trigger: 'change'}],
'awbinfo.dest1': [{required: true, message: '到达航站不能为空', trigger: 'change'}],
'awbinfo.shprname': [{required: true, message: '发货人不能为空', trigger: 'change'}],
'awbinfo.shprtel': [{required: true, message: '发货电话不能为空', trigger: 'change'}],
'awbinfo.shpraddress': [{required: true, message: '发货地址不能为空', trigger: 'change'}],
'awbinfo.shprcountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
'awbinfo.shpcomidpre': [{required: true, message: '企业代码类型不能为空', trigger: 'change'}],
'awbinfo.shpcomidpno': [{required: true, message: '企业代码不能为空', trigger: 'change'}],
'awbinfo.cnsnname': [{required: true, message: '收货人不能为空', trigger: 'change'}],
'awbinfo.cnsntel': [{required: true, message: '收货电话不能为空', trigger: 'change'}],
'awbinfo.cnsnaddress': [{required: true, message: '收获地址不能为空', trigger: 'change'}],
'awbinfo.cnscountyr': [{required: true, message: '国家代码不能为空', trigger: 'change'}],
'awbinfo.cnscomidpre': [{required: true, message: '企业代码类型不能为空', trigger: 'change'}],
'awbinfo.cnscomidno': [{required: true, message: '企业代码不能为空', trigger: 'change'}],
}
}
},
created() {
this.getList()
this.getCountryList()
},
mounted() {
// 延迟加载,否则会出错
setTimeout(() => {
this.countryResultList = this.countryList.map(item => {
return {value: item.countryCode, label: item.countryNameCn}
})
}, 1000)
},
computed:{
awbh: {
get: function (){
return this.temp.awbh
},
set: function (val){
this.temp.awbh = val.toUpperCase()
}
},
flightno: {
get: function (){
return this.temp.flightno
},
set: function (val){
this.temp.flightno = val.toUpperCase()
}
},
originstation: {
get: function (){
return this.temp.originstation
},
set: function (val){
this.temp.originstation = val.toUpperCase()
}
},
destinationstation: {
get: function (){
return this.temp.destinationstation
},
set: function (val){
this.temp.destinationstation = val.toUpperCase()
}
},
goodsname: {
get: function (){
return this.temp.goodsname
},
set: function (val){
this.temp.goodsname = val.toUpperCase()
}
},
specopeid: {
get: function (){
return this.temp.awbinfo.specopeid
},
set: function (val){
this.temp.awbinfo.specopeid = val.toUpperCase()
}
},
shprname: {
get: function (){
return this.temp.awbinfo.shprname
},
set: function (val){
this.temp.awbinfo.shprname = val.toUpperCase()
}
},
shpraddress: {
get: function (){
return this.temp.awbinfo.shpraddress
},
set: function (val){
this.temp.awbinfo.shpraddress = val.toUpperCase()
}
},
shprcountyr: {
get: function (){
return this.temp.awbinfo.shprcountyr
},
set: function (val){
this.temp.awbinfo.shprcountyr = val.toUpperCase()
}
},
shpcomidpre: {
get: function (){
return this.temp.awbinfo.shpcomidpre
},
set: function (val){
this.temp.awbinfo.shpcomidpre = val.toUpperCase()
}
},
shpcomidpno: {
get: function (){
return this.temp.awbinfo.shpcomidpno
},
set: function (val){
this.temp.awbinfo.shpcomidpno = val.toUpperCase()
}
},
cnsnname: {
get: function (){
return this.temp.awbinfo.cnsnname
},
set: function (val){
this.temp.awbinfo.cnsnname = val.toUpperCase()
}
},
cnsnaddress: {
get: function (){
return this.temp.awbinfo.cnsnaddress
},
set: function (val){
this.temp.awbinfo.cnsnaddress = val.toUpperCase()
}
},
cnscountyr: {
get: function (){
return this.temp.awbinfo.cnscountyr
},
set: function (val){
this.temp.awbinfo.cnscountyr = val.toUpperCase()
}
},
cnscomidno: {
get: function (){
return this.temp.awbinfo.cnscomidno
},
set: function (val){
this.temp.awbinfo.cnscomidno = val.toUpperCase()
}
},
cnsrctcname: {
get: function (){
return this.temp.awbinfo.cnsrctcname
},
set: function (val){
this.temp.awbinfo.cnsrctcname = val.toUpperCase()
}
},
sairportid: {
get: function (){
return this.temp.awbinfo.sairportid
},
set: function (val){
this.temp.awbinfo.sairportid = val.toUpperCase()
}
},
by1: {
get: function (){
return this.temp.awbinfo.by1
},
set: function (val){
this.temp.awbinfo.by1 = val.toUpperCase()
}
},
dest1: {
get: function (){
return this.temp.awbinfo.dest1
},
set: function (val){
this.temp.awbinfo.dest1 = val.toUpperCase()
}
},
by2: {
get: function (){
return this.temp.awbinfo.by2
},
set: function (val){
this.temp.awbinfo.by2= val.toUpperCase()
}
},
dest2: {
get: function (){
return this.temp.awbinfo.dest2
},
set: function (val){
this.temp.awbinfo.dest2= val.toUpperCase()
}
},
by3: {
get: function (){
return this.temp.awbinfo.by3
},
set: function (val){
this.temp.awbinfo.by3= val.toUpperCase()
}
},
dest3: {
get: function (){
return this.temp.awbinfo.dest3
},
set: function (val){
this.temp.awbinfo.dest3= val.toUpperCase()
}
},
eairportid: {
get: function (){
return this.temp.awbinfo.eairportid
},
set: function (val){
this.temp.awbinfo.eairportid= val.toUpperCase()
}
},
cnscomidpre: {
get: function (){
return this.temp.awbinfo.cnscomidpre
},
set: function (val){
this.temp.awbinfo.cnscomidpre= val.toUpperCase()
}
}
},
watch: {
'temp.awbinfo.cnscountyr': function (newValue, oldValue) {
if (newValue != null && newValue!='') {
this.selectCountry.countryCode = newValue
getByCountryCode(this.selectCountry).then(res => {
this.temp.awbinfo.cnscomidno = res.data.dataList[0].enterpriseCode
})
}
},
'temp.awbinfo.shprcountyr': function (newValue, oldValue) {
if (newValue != null && newValue!='') {
this.selectCountry.countryCode = newValue
getByCountryCode(this.selectCountry).then(res => {
this.temp.awbinfo.shpcomidpno = res.data.dataList[0].enterpriseCode
})
}
}
},
methods: {
getList() {
getMt1201ListForParam(this.listQuery).then(res => {
this.total = res.data.count
this.orgData = res.data.dataList
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
},
getCountryList() {
getCountry().then(res => {
this.countryList = res.data.dataList
})
},
message(row) {
this.$message.info(row.event)
},
sortChange(data) {
const {prop, order} = data
if (prop === 'id') {
this.sortByID(order)
}
},
sortByID(order) {
if (order === 'ascending') {
this.listQuery.sort = '+id'
} else {
this.listQuery.sort = '-id'
}
this.handleFilter()
},
handleDownload() {
},
handleFilter() {
this.getList()
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.dialogStatus = 'update'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.formData.clearValidate()
})
},
handleModifyStatus(row, status) {
this.$message({
message: '操作成功',
type: 'success'
})
row.status = status
},
handleSelectionChange(val) {
this.multipleSelection = val
},
resetTemp() {
this.temp = {
awba: undefined,
awbh: undefined,
customcode: undefined,
customcode: undefined,
carrier: undefined,
flightno: undefined,
flightdate: undefined,
originstation: undefined,
destinationstation: undefined,
piece: undefined,
weight: undefined,
goodsname: undefined,
splitcode: undefined,
awbinfo: {
specopeid: undefined,
shprname: undefined,
shprmobiletype: undefined,
shprtel: undefined,
shpraddress: undefined,
shprcountyr: undefined,
shpcomidpre:undefined,
shpcomidpno: undefined,
cnsnname: undefined,
cnsrmobiletype: undefined,
cnsntel: undefined,
cnsnaddress: undefined,
cnscountyr: undefined,
cnscomidpre: undefined,
cnscomidno: undefined,
cnsrctcname: undefined,
cnsrctctel: undefined,
cargonm: undefined,
sairportid: undefined,
dest1city: undefined,
by1: undefined,
dest1: undefined,
by2: undefined,
dest2: undefined,
by3: undefined,
dest3: undefined,
eairportid: undefined,
csgcustomerid: undefined,
collected: '0'
}
}
},
handleCreate() {
this.resetTemp()
this.dialogStatus = 'create'
this.dialogFormVisible = true
this.$nextTick(() => {
this.$refs.formData.clearValidate()
})
},
remoteMethod(query) {
if (query !== '') {
this.loading = true
setTimeout(() => {
this.loading = false
this.countryOption = this.countryResultList.filter(item => {
return item.value.toUpperCase()
.indexOf(query.toUpperCase()) > -1
})
}, 200)
if (query.length > 1) {
this.selectCountry.countryNameCn = query
getByCountryCodeForName(this.selectCountry).then(res => {
this.shpCompnyList = res.data.dataList
this.shpCompnyTypeOption = this.shpCompnyList.map(item => {
return {value: item.enterpriseCode, label: item.enterpriseCode}
})
})
}
} else {
this.countryOption = []
}
},
handleSwitch(row) {
console.log(row)
},
createData() {
this.$refs.formData.validate(valid =>{
if(valid){
addMt1201(this.temp).then(res => {
if(res.data.count>0){
this.dialogFormVisible = false
this.getList()
Message.success(res.data.respMessage)
}else {
Message.success("数据异常清稍后重试")
}
})
}
})
},
updateData() {
console.log(this.temp)
this.$refs.formData.validate(valid => {
if (valid) {
updateMT1201(this.temp).then(res => {
Message.success(res.data.respMessage)
})
}
})
}
}
}
</script>
<style scoped>
.bg-purple {
background: #d3dce6;
}
.el-row {
margin-bottom: 0px;
}
.el-dialog .el-dialog--samll {
width: 60%;
}
.row-bg {
padding: 10px 0;
background-color: #f9fafc;
}
.el-progress.is-warning .el-progress-bar__inner {
background-color: #E6A23C
}
.remark textarea {
width: 575px;
}
.el-dialog-div {
height: 60vh;
overflow: auto;
}
.tags {
margin-top: 10px;
margin-bottom: 10px;
}
</style>
... ...