|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<div class="filter-container">
|
|
|
<el-input v-model="listQuery.title" style="width: 200px;" class="filter-item" placeholder="运单号"/>
|
|
|
<el-input v-model="listQuery.title" style="width: 200px;" class="filter-item" placeholder="航班号"/>
|
|
|
<el-input v-model="listQuery.title" style="width: 200px;" class="filter-item" placeholder="航班日期"/>
|
|
|
<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 v-waves :loading="downloadLoading" class="filter-item" type="primary" icon="el-icon-download" @click="handleDownload">{{ $t('table.export') }}</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="data" :eval-func="func" :eval-args="args" :expand-all="expandAll" stripe="true" style="font-size: 13px" border @selection-change="handleSelectionChange">
|
|
|
<el-table-column prop="waybillNo" label="主单号" width="110px" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.waybillNo }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="分单号" width="120px" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.houseWaybillNo }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="航班号" width="90px" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.flight }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="航班日期" width="100px" align="center" sortable>
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.flightDate | parseTime('{y}-{m}-{d}') }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="起始站" width="60px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.oriStation }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="目的站" width="60px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.desStation }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="预配件数" width="80px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.maniPiece }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="预配重量" width="80px" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.maniWeight }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column :label="$t('table.status')" class-name="status-col" width="90" 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="230px" 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" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button>
|
|
|
<el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }}</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="small" @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="resend"
|
|
|
active-color="#13ce66"
|
|
|
inactive-color="#ff4949" />
|
|
|
</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" fullscreen="true">
|
|
|
<el-form ref="" :inline="true" :label-position="left" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px">
|
|
|
<div>
|
|
|
<el-tag type="info" effect="plain">
|
|
|
航班信息
|
|
|
</el-tag>
|
|
|
</div>
|
|
|
<el-row type="flex" class="row-bg bg-purple">
|
|
|
<el-col :span="24">
|
|
|
<div class="grid-content">
|
|
|
<el-form-item label="航班号" prop="flight">
|
|
|
<el-input v-model="temp.flight"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="航班日期" prop="flightDate">
|
|
|
<el-date-picker :picker-options="pickerOptions" v-model="temp.flightDate" align="right" type="date" placeholder="请输入航班日期" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div>
|
|
|
<el-tag type="info" effect="plain">
|
|
|
运单信息
|
|
|
</el-tag>
|
|
|
</div>
|
|
|
<el-form-item label="主单号" prop="waybillNo">
|
|
|
<el-input v-model="temp.waybillNo"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="分单号" prop="houseWaybillNo">
|
|
|
<el-input v-model="temp.houseWaybillNo"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="关区代码" prop="custom">
|
|
|
<el-select v-model="temp.custom" class="filter-item" placeholder="请选择关区代码">
|
|
|
<el-option v-for="item in manifestCustoms" :key="item" :label="item" :value="item"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="起始站" prop="oriStation">
|
|
|
<el-input v-model="temp.oriStation"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="目的站" prop="desStation">
|
|
|
<el-input v-model="temp.desStation"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="预配件数" prop="maniPiece">
|
|
|
<el-input v-model.number="temp.maniPiece"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="预配重量" prop="maniWeight">
|
|
|
<el-input v-model.number="temp.maniWeight"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="付费方式" prop="payMode">
|
|
|
<el-select v-model="temp.payMode" class="filter-item" placeholder="付费方式">
|
|
|
<el-option v-for="item in manifestCustoms" :key="item" :label="item" :value="item"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="海关状态" prop="goodsType">
|
|
|
<el-select v-model="temp.goodsType" class="filter-item" placeholder="请录入货物类型">
|
|
|
<el-option v-for="item in manifestCustoms" :key="item" :label="item" :value="item"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<div>
|
|
|
<el-tag type="info" effect="plain">
|
|
|
发货人信息
|
|
|
</el-tag>
|
|
|
</div>
|
|
|
<el-row type="flex" class="row-bg bg-purple">
|
|
|
<el-col :span="24">
|
|
|
<div class="grid-content">
|
|
|
<el-form-item label="公司" prop="shpCompany">
|
|
|
<el-input v-model="temp.shpCompany"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="地址" prop="shpAddress">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="城市" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="邮编" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="电话" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="传真" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-form-item label="国家" prop="shpCountry">
|
|
|
<el-select
|
|
|
:remote-method="remoteMethod"
|
|
|
:loading="loading"
|
|
|
v-model="temp.country"
|
|
|
filterable
|
|
|
remote
|
|
|
placeholder="请选择" >
|
|
|
<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-form-item label="企业代码类型" prop="shpCompnyType">
|
|
|
<el-select
|
|
|
v-model="temp.shpCompnyType"
|
|
|
filterable
|
|
|
placeholder="请选择企业代码类型" >
|
|
|
<el-option
|
|
|
v-for="item in shpCompnyTypeOption"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress" placeholder="企业代码"/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div>
|
|
|
<el-tag type="info" effect="plain">
|
|
|
收货人信息
|
|
|
</el-tag>
|
|
|
</div>
|
|
|
<el-row type="flex" class="row-bg bg-purple">
|
|
|
<el-col :span="24">
|
|
|
<div class="grid-content">
|
|
|
<el-form-item label="公司" prop="shpCompany">
|
|
|
<el-input v-model="temp.shpCompany"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="地址" prop="shpAddress">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="城市" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="邮编" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="电话" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="传真" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress"/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-form-item label="国家" prop="shpCountry">
|
|
|
<el-select
|
|
|
:remote-method="remoteMethod"
|
|
|
:loading="loading"
|
|
|
v-model="temp.country"
|
|
|
filterable
|
|
|
remote
|
|
|
placeholder="请选择" >
|
|
|
<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-form-item label="企业代码类型" prop="shpCompnyType">
|
|
|
<el-select
|
|
|
v-model="temp.shpCompnyType"
|
|
|
filterable
|
|
|
placeholder="请选择企业代码类型" >
|
|
|
<el-option
|
|
|
v-for="item in shpCompnyTypeOption"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress" placeholder="企业代码"/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div>
|
|
|
<el-tag type="info" effect="plain">
|
|
|
危险品信息
|
|
|
</el-tag>
|
|
|
</div>
|
|
|
<el-row type="flex" class="row-bg bg-purple">
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="危险品信息" prop="shpCompnyType">
|
|
|
<el-select
|
|
|
v-model="temp.dangerGoods"
|
|
|
placeholder="请选择危险品类型" >
|
|
|
<el-option
|
|
|
v-for="item in dangerGoods"
|
|
|
: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-form-item label="危险品类别" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress" placeholder="危险品类别"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div>
|
|
|
<el-tag type="info" effect="plain">
|
|
|
交运信息
|
|
|
</el-tag>
|
|
|
</div>
|
|
|
<el-row type="flex" class="row-bg bg-purple">
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="包装" prop="shpCompnyType">
|
|
|
<el-select
|
|
|
v-model="temp.goodsPackage"
|
|
|
placeholder="请选择包装类型" >
|
|
|
<el-option
|
|
|
v-for="item in goodsPackage"
|
|
|
:key="item.value"
|
|
|
:label="item.label"
|
|
|
:value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="尺寸" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress" placeholder="请输入尺寸"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="计费重量" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress" placeholder="请输入计费重量"/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="体积" prop="shpCity">
|
|
|
<el-input v-model="temp.shpAddress" placeholder="请输入体积"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row type="flex" class="row-bg bg-purple">
|
|
|
<el-col :span="24">
|
|
|
<div class="remark">
|
|
|
<el-form-item label="备注" prop="shpCity" inline-message="false">
|
|
|
<el-input
|
|
|
v-model="temp.shpAddress"
|
|
|
type="textarea"
|
|
|
placeholder="其他需要备注的信息"
|
|
|
maxlength="30"
|
|
|
show-word-limit
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</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>
|
|
|
/**
|
|
|
Auth: Lei.j1ang
|
|
|
Created: 2018/1/19-14:54
|
|
|
*/
|
|
|
|
|
|
import treeTable from '@/components/TreeTable'
|
|
|
import treeToArray from './customEval'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import waves from '@/directive/waves' // Waves directive
|
|
|
import country from '@/utils/country.js'
|
|
|
import companyType from '@/utils/companyType.js'
|
|
|
import dangerGoods from '@/utils/dangerGoods.js'
|
|
|
import goodsPackage from '@/utils/goodsPackage.js'
|
|
|
|
|
|
const calendarTypeOptions = [
|
|
|
{ key: 'CN', display_name: 'China' },
|
|
|
{ key: 'US', display_name: 'USA' },
|
|
|
{ key: 'JP', display_name: 'Japan' },
|
|
|
{ key: 'EU', display_name: 'Eurozone' }
|
|
|
]
|
|
|
|
|
|
// arr to obj ,such as { CN : "China", US : "USA" }
|
|
|
const calendarTypeKeyValue = calendarTypeOptions.reduce((acc, cur) => {
|
|
|
acc[cur.key] = cur.display_name
|
|
|
return acc
|
|
|
}, {})
|
|
|
|
|
|
treeTable.expandAll = {
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
}
|
|
|
|
|
|
export default {
|
|
|
name: 'CustomTreeTableDemo',
|
|
|
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: 1,
|
|
|
resend: true,
|
|
|
listLoading: true,
|
|
|
multipleSelection: [],
|
|
|
dialogFormVisible: false,
|
|
|
dialogStatus: '',
|
|
|
country: country,
|
|
|
countryOption: [],
|
|
|
shpCompnyTypeOption: [],
|
|
|
dangerGoods: dangerGoods,
|
|
|
goodsPackage: goodsPackage,
|
|
|
textMap: {
|
|
|
update: '编辑',
|
|
|
create: '添加'
|
|
|
},
|
|
|
listQuery: {
|
|
|
page: 1,
|
|
|
limit: 20,
|
|
|
waybillNo: '',
|
|
|
flight: '',
|
|
|
flightDate: '',
|
|
|
custom: ''
|
|
|
},
|
|
|
temp: {
|
|
|
id: undefined,
|
|
|
waybillNo: '',
|
|
|
houseWaybillNo: '',
|
|
|
custom: '4604',
|
|
|
flight: '',
|
|
|
flightDate: '',
|
|
|
oriStation: 'CGO',
|
|
|
desStation: '',
|
|
|
maniPiece: undefined,
|
|
|
maniWeight: undefined
|
|
|
},
|
|
|
manifestCustoms: ['4604', '4620', '4613'],
|
|
|
data: [
|
|
|
{
|
|
|
id: 0,
|
|
|
waybillNo: '580-20728399',
|
|
|
houseWaybillNo: '',
|
|
|
custom: '4604',
|
|
|
flight: 'CV9733',
|
|
|
flightDate: '2019-06-21',
|
|
|
oriStation: 'LUX',
|
|
|
desStation: 'CGO',
|
|
|
maniPiece: 50,
|
|
|
maniWeight: 21321,
|
|
|
status: '41301',
|
|
|
customText: ' 预配舱单主要数据传输成功。',
|
|
|
customComplate: 25
|
|
|
},
|
|
|
{
|
|
|
id: 1,
|
|
|
waybillNo: '580-20728396',
|
|
|
houseWaybillNo: '',
|
|
|
custom: '4604',
|
|
|
flight: 'CV9731',
|
|
|
flightDate: '2019-06-21',
|
|
|
oriStation: 'LUX',
|
|
|
desStation: 'CGO',
|
|
|
maniPiece: 50,
|
|
|
maniWeight: 21321,
|
|
|
status: 'wrong',
|
|
|
customText: ' 预配回执异常 ',
|
|
|
customComplate: 25,
|
|
|
children: [
|
|
|
{
|
|
|
id: 2,
|
|
|
waybillNo: '580-20728396',
|
|
|
houseWaybillNo: 'ADDSS21231',
|
|
|
custom: '4604',
|
|
|
flight: 'CV9731',
|
|
|
flightDate: '2019-06-21',
|
|
|
oriStation: 'LUX',
|
|
|
desStation: 'CGO',
|
|
|
maniPiece: 50,
|
|
|
maniWeight: 21321,
|
|
|
status: '10002',
|
|
|
customText: ' 已暂存',
|
|
|
customComplate: 0
|
|
|
},
|
|
|
{
|
|
|
id: 3,
|
|
|
waybillNo: '580-20728396',
|
|
|
houseWaybillNo: 'SDE3411',
|
|
|
custom: '4604',
|
|
|
flight: 'CV9731',
|
|
|
flightDate: '2019-06-21',
|
|
|
oriStation: 'LUX',
|
|
|
desStation: 'CGO',
|
|
|
maniPiece: 50,
|
|
|
maniWeight: 21321,
|
|
|
status: '45103',
|
|
|
customText: ' 45103 该提(运)单的运抵报告重复申报,海关审核不通过。 关区代码:4604。',
|
|
|
customComplate: 100
|
|
|
},
|
|
|
{
|
|
|
id: 4,
|
|
|
waybillNo: '580-20728396',
|
|
|
houseWaybillNo: 'SDE3411',
|
|
|
custom: '4604',
|
|
|
flight: 'CV9731',
|
|
|
flightDate: '2019-06-21',
|
|
|
oriStation: 'LUX',
|
|
|
desStation: 'CGO',
|
|
|
maniPiece: 50,
|
|
|
maniWeight: 21321,
|
|
|
status: '10000',
|
|
|
customText: ' 已删除 ',
|
|
|
customComplate: 50
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
id: 4,
|
|
|
waybillNo: '580-20728391',
|
|
|
houseWaybillNo: '',
|
|
|
custom: '4604',
|
|
|
flight: 'KA740',
|
|
|
flightDate: '2019-06-29',
|
|
|
oriStation: 'LUX',
|
|
|
desStation: 'CGO',
|
|
|
maniPiece: 50,
|
|
|
maniWeight: 21321,
|
|
|
status: '10003',
|
|
|
customText: ' 已发送预配舱单 '
|
|
|
}
|
|
|
],
|
|
|
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'],
|
|
|
rules: {
|
|
|
maniWeight: [{ type: 'number', required: true, message: '重量必须为数字', trigger: 'blur' }],
|
|
|
maniPiece: [{ type: 'number', required: true, message: '件数必须为数字', trigger: 'blur' }],
|
|
|
desStation: [{ required: true, message: '运单目的地必须输入', trigger: 'blur' }],
|
|
|
oriStation: [{ required: true, message: '运单起始站必须数据', trigger: 'change' }],
|
|
|
flightDate: [{ type: 'date', required: true, message: '航班日期必须输入', trigger: 'change' }],
|
|
|
flight: [{ required: true, message: '航班号必须输入', trigger: 'blur' }],
|
|
|
custom: [{ required: true, message: '关区代码必须选择', trigger: 'change' }],
|
|
|
waybillNo: [{ required: true, message: '运单号必须输入', trigger: 'blur' }]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
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()
|
|
|
},
|
|
|
handleUpdate(row) {
|
|
|
this.temp = Object.assign({}, row) // copy obj
|
|
|
this.temp.timestamp = new Date(this.temp.timestamp)
|
|
|
this.dialogStatus = 'update'
|
|
|
this.dialogFormVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs[''].clearValidate()
|
|
|
})
|
|
|
},
|
|
|
handleModifyStatus(row, status) {
|
|
|
this.$message({
|
|
|
message: '操作成功',
|
|
|
type: 'success'
|
|
|
})
|
|
|
row.status = status
|
|
|
},
|
|
|
getList() {
|
|
|
|
|
|
},
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val
|
|
|
},
|
|
|
resetTemp() {
|
|
|
this.temp = {
|
|
|
id: undefined,
|
|
|
waybillNo: '',
|
|
|
houseWaybillNo: '',
|
|
|
custom: '4604',
|
|
|
flight: '',
|
|
|
flightDate: '',
|
|
|
oriStation: 'CGO',
|
|
|
desStation: '',
|
|
|
maniPiece: undefined,
|
|
|
maniWeight: undefined
|
|
|
}
|
|
|
},
|
|
|
handleCreate() {
|
|
|
this.resetTemp()
|
|
|
this.dialogStatus = 'create'
|
|
|
this.dialogFormVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs[''].clearValidate()
|
|
|
})
|
|
|
},
|
|
|
remoteMethod(query) {
|
|
|
if (query !== '') {
|
|
|
this.loading = true
|
|
|
setTimeout(() => {
|
|
|
this.loading = false
|
|
|
this.countryOption = this.country.filter(item => {
|
|
|
return item.value.toUpperCase()
|
|
|
.indexOf(query.toUpperCase()) > -1
|
|
|
})
|
|
|
this.shpCompnyTypeOption = companyType.filter(item => {
|
|
|
return item.value.toUpperCase()
|
|
|
.indexOf(query.toUpperCase()) > -1
|
|
|
})
|
|
|
}, 200)
|
|
|
} else {
|
|
|
this.countryOption = []
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style>
|
|
|
.el-row {
|
|
|
margin-bottom: 20px;
|
|
|
&:last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
}
|
|
|
.el-col {
|
|
|
border-radius: 4px;
|
|
|
}
|
|
|
.bg-purple-dark {
|
|
|
background: #99a9bf;
|
|
|
}
|
|
|
.bg-purple {
|
|
|
background: #d3dce6;
|
|
|
}
|
|
|
.bg-purple-light {
|
|
|
background: #e5e9f2;
|
|
|
}
|
|
|
.grid-content {
|
|
|
border-radius: 4px;
|
|
|
min-height: 36px;
|
|
|
}
|
|
|
.row-bg {
|
|
|
padding: 10px 0;
|
|
|
background-color: #f9fafc;
|
|
|
}
|
|
|
.el-progress.is-warning .el-progress-bar__inner{
|
|
|
background-color:#E6A23C
|
|
|
}
|
|
|
.remark textarea{
|
|
|
width: 600px;
|
|
|
}
|
|
|
</style>
|
|
|
|
...
|
...
|
|