Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
jinhui.wang
2022-02-14 16:27:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9d2f21a8c4bcf69735328eb5d839c82afc9e351e
9d2f21a8
1 parent
1cb3f4f7
version:0.5.6,bug修复,手动配舱排序增加,查询条件增加,配舱高地价限制增加
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
923 additions
and
692 deletions
src/api/findAllFltData.js
src/assets/languages/dictLabels.js
src/components/Table/index.vue
src/router/index.js
src/settings.js
src/views/allocationConfig/cargoAllocation/index.vue
src/views/allocationConfig/cargoAllocation/info.vue
src/views/allocationConfig/flightAllocConfig/info.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/api/findAllFltData.js
View file @
9d2f21a
...
...
@@ -45,3 +45,11 @@ export function findFltCommonConf(data) {
})
}
export
function
updateStatusBatch
(
data
){
return
request
({
url
:
'/FlightPreserveController/updateStatusBatch'
,
method
:
'post'
,
data
:
data
})
}
...
...
src/assets/languages/dictLabels.js
View file @
9d2f21a
let
ductLabels
=
{
"cargoRulesStatus"
:{
"1"
:
"
自
动"
,
"2"
:
"
手
动"
"1"
:
"
手
动"
,
"2"
:
"
自
动"
}
}
...
...
src/components/Table/index.vue
View file @
9d2f21a
...
...
@@ -30,8 +30,8 @@
:fixed="item.fixed"
:show-overflow-tooltip="showOverflowTooltip"
:sortable="item.sorTable"
header-align="center"
:formatter="formatter"
header-align="center"
:slotHeader="slotHeader"
:key="index"
>
...
...
@@ -188,7 +188,6 @@ export default {
this.newHeader = this.headerData;
},
mounted() {
},
methods: {
nextClick() {
...
...
@@ -218,7 +217,11 @@ export default {
this.selectTable.push(this.data[i]);
}
} else if (selection.includes(this.data[row.index])) {
for (i = this.start + 1; i <= end; i++) {
if(!selection.includes(this.data[this.start])){
this.$refs.tables.toggleRowSelection(this.data[this.start], true);
this.selectTable.push(this.data[this.start]);
}
for (i = this.start+1; i <= this.start+sum; i++) {
this.$refs.tables.toggleRowSelection(this.data[i], true);
this.selectTable.push(this.data[i]);
}
...
...
@@ -254,7 +257,9 @@ export default {
this.selectTable = []
this.$refs.tables.clearSelection()
},
// itemChange(val) {},
itemChange(val) {
console.log(val)
},
// checkChange(val) {
// console.log(val);
// },
...
...
src/router/index.js
View file @
9d2f21a
...
...
@@ -38,11 +38,11 @@ export const constantRoutes = [
}
]
},
{
path
:
'/login'
,
component
:
(
resolve
)
=>
require
([
'@/views/login'
],
resolve
),
hidden
:
true
},
//
{
//
path: '/login',
//
component: (resolve) => require(['@/views/login'], resolve),
//
hidden: true
//
},
{
path
:
'/404'
,
component
:
(
resolve
)
=>
require
([
'@/views/error/404'
],
resolve
),
...
...
@@ -66,20 +66,20 @@ export const constantRoutes = [
}
]
},
{
path
:
'/user'
,
component
:
Layout
,
hidden
:
true
,
redirect
:
'noredirect'
,
children
:
[
{
path
:
'profile'
,
component
:
(
resolve
)
=>
require
([
'@/views/systemConfig/userConfig/profile/index'
],
resolve
),
name
:
'Profile'
,
meta
:
{
title
:
'个人中心'
,
icon
:
'user'
}
}
]
},
//
{
//
path: '/user',
//
component: Layout,
//
hidden: true,
//
redirect: 'noredirect',
//
children: [
//
{
//
path: 'profile',
//
component: (resolve) => require(['@/views/systemConfig/userConfig/profile/index'], resolve),
//
name: 'Profile',
//
meta: { title: '个人中心', icon: 'user' }
//
}
//
]
//
},
{
path
:
'/'
,
component
:
Layout
,
...
...
src/settings.js
View file @
9d2f21a
...
...
@@ -42,5 +42,5 @@ module.exports = {
/**
* 版本号
*/
version
:
'version:0.5.
5.3
'
version
:
'version:0.5.
6
'
}
...
...
src/views/allocationConfig/cargoAllocation/index.vue
View file @
9d2f21a
<template>
<div class="cargoAllocation">
<el-form ref="form" v-model="formData" class="form-header" label-position="right" label-width="auto" size="small">
<el-form
ref="form"
v-model="formData"
v-show="formShow"
class="form-header"
label-position="right"
label-width="auto"
size="small"
>
<el-row type="flex" style="flexWrap: wrap !important">
<el-col :span="6">
<el-form-item label="ACCS原航班日期">
...
...
@@ -17,34 +25,25 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="
申报类别
">
<el-
selec
t
placeholder="不限
"
v-model="formData.typeId
"
<el-form-item label="
ACCS原航班号
">
<el-
inpu
t
v-model="fltNo
"
placeholder="请输入ACCS原航班号
"
class="formItem"
clearable
>
<el-option
v-for="item in selectData.findConditionData.cargoType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
></el-input>
</el-form-item>
</el-col>
<
!-- <
el-col :span="6">
<el-form-item label="
海关回执
状态">
<el-col :span="6">
<el-form-item label="
货物
状态">
<el-select
placeholder="不限"
v-model="formData.
customsReceiptS
tatusId"
v-model="formData.
s
tatusId"
class="formItem"
multiple
clearable
>
<el-option
v-for="item in selectData.findConditionData.cargo
CustomsReturn
Status"
v-for="item in selectData.findConditionData.cargoStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
...
...
@@ -52,17 +51,28 @@
</el-option>
</el-select>
</el-form-item>
</el-col>
-->
</el-col>
<el-col :span="6">
<el-form-item label="货物状态">
<el-form-item label="运单号">
<el-input
class="formItem"
type="textarea"
placeholder="请输入运单号(回车分割)"
v-model="formData.waybillNo"
rows="1"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申报类别">
<el-select
placeholder="不限"
v-model="formData.
status
Id"
v-model="formData.
type
Id"
class="formItem"
clearable
>
<el-option
v-for="item in selectData.findConditionData.cargo
Status
"
v-for="item in selectData.findConditionData.cargo
Type
"
:label="item.chineseName"
:value="item.id"
:key="item.id"
...
...
@@ -72,18 +82,6 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班类型">
<el-select
placeholder="不限"
v-model="formData.kindToAllocFlightId"
class="formItem"
clearable
>
<el-option v-for="item in selectData.fltTypes" :label="item.chineseName" v-model="item.id" :key="item.id"> </el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="服务类型">
<el-select
placeholder="不限"
...
...
@@ -102,27 +100,6 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS原航班号">
<el-input
v-model="fltNo"
placeholder="请输入ACCS原航班号"
class="formItem"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input
class="formItem"
type="textarea"
placeholder="请输入运单号(回车分割)"
v-model="formData.waybillNo"
rows="1"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="URSA">
<el-input
class="formItem"
...
...
@@ -146,19 +123,71 @@
</el-col>
<el-col :span="6">
<el-form-item label="重量区间">
<el-col :span="11"><el-input-number class="formItem" size="mini" v-model="formData.minWeight" :controls="false"></el-input-number></el-col>
<el-col :span="11"
><el-input-number
class="formItem"
size="mini"
v-model="formData.minWeight"
:controls="false"
:min="0"
:precision="2"
></el-input-number
></el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="11"><el-input-number class="formItem" size="mini" v-model="formData.maxWeight" :controls="false"></el-input-number></el-col>
<el-col :span="11"
><el-input-number
class="formItem"
size="mini"
v-model="formData.maxWeight"
:controls="false"
:min="formData.minWeight"
:precision="2"
></el-input-number
></el-col>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="件数区间">
<el-col :span="11"><el-input-number class="formItem" size="mini" v-model="formData.minNumber" :controls="false"></el-input-number></el-col>
<el-form-item label="件数区间">
<el-col :span="11"
><el-input-number
class="formItem"
size="mini"
v-model="formData.minNumber"
:controls="false"
:min="0"
></el-input-number
></el-col>
<el-col class="line" :span="2">-</el-col>
<el-col :span="11"><el-input-number class="formItem" size="mini" v-model="formData.maxNumber" :controls="false"></el-input-number></el-col>
<el-col :span="11"
><el-input-number
class="formItem"
size="mini"
v-model="formData.maxNumber"
:controls="false"
:min="formData.minNumber"
></el-input-number
></el-col>
</el-form-item>
</el-col>
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item label="航班类型">
<el-select
placeholder="不限"
v-model="formData.kindToAllocFlightId"
class="formItem"
clearable
>
<el-option
v-for="item in selectData.fltTypes"
:label="item.chineseName"
v-model="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="6">
<el-form-item label="取件日期">
<el-date-picker
v-model="formData.pickUpDate"
...
...
@@ -169,19 +198,65 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="口岸代码">
<el-input
v-model="portName"
placeholder="请输入口岸代码"
class="formItem"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关回执状态">
<el-select
placeholder="不限"
v-model="formData.customsReceiptStatusId"
class="formItem"
multiple
clearable
>
<el-option
v-for="item in selectData.findConditionData
.cargoCustomsReturnStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="Handling Code">
<el-empty description="暂无数据" v-if="selectData.HandlingCode.length == 0"></el-empty>
<el-empty
description="暂无数据"
v-if="!selectData.HandlingCode || selectData.HandlingCode.length == 0"
></el-empty>
<el-checkbox-group v-model="handingCodes" v-else>
<el-checkbox v-for="item in selectData.HandlingCode" :label="item.chineseName" v-model="item.englishName" :key="item.id"></el-checkbox>
<el-checkbox
v-for="item in selectData.HandlingCode"
:label="item.chineseName"
v-model="item.englishName"
:key="item.id"
></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="Sub Category">
<el-empty description="暂无数据" v-if="selectData.SubCategory.length == 0"></el-empty>
<el-empty
description="暂无数据"
v-if="!selectData.SubCategory || selectData.SubCategory.length == 0"
></el-empty>
<el-checkbox-group v-model="subCategorys" v-else>
<el-checkbox v-for="item in selectData.SubCategory" :label="item.chineseName" v-model="item.englishName" :key="item.id"></el-checkbox>
<el-checkbox
v-for="item in selectData.SubCategory"
:label="item.chineseName"
v-model="item.englishName"
:key="item.id"
></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
...
...
@@ -196,20 +271,24 @@
>查询</el-button
>
<el-button
:type="downLoadingTip.downloading
?'warning':
'primary'"
:type="downLoadingTip.downloading
? 'warning' :
'primary'"
size="mini"
@click="xls
e
(0)"
@click="xls
x
(0)"
:loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0"
>{{downLoadingTip.downloading?downLoadingTip.tip:"导出本页查询结果"}}</el-button
>{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出本页查询结果"
}}</el-button
>
<el-button
:type="downLoadingTip.downloading
?'warning':
'primary'"
:type="downLoadingTip.downloading
? 'warning' :
'primary'"
size="mini"
@click="xls
e
(1)"
@click="xls
x
(1)"
:loading="downLoadingTip.downloading"
:disabled="tableData.length <= 0"
>{{downLoadingTip.downloading?downLoadingTip.tip:"导出全部查询结果"}}</el-button
>{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出全部查询结果"
}}</el-button
>
<el-button
type="primary"
...
...
@@ -233,7 +312,7 @@
:limitSize="size"
:limitStart="formData.limitStart"
:shiftKey="shiftKey"
height="
4
50"
height="
3
50"
@tableSelect="tableSelect"
@tableSelectAll="tableSelectAll"
@currentChange="currentChange"
...
...
@@ -252,7 +331,7 @@ import { findConditionData, findCargoAllocationData } from "@/api/cargoSelect";
import { allDictData } from "@/api/destinationFlight";
import { findFltConditionDataApi } from "@/api/findAllFltData";
import { downLoadXlsx } from "@/utils/zipdownload";
import { upCase } from "@/utils/FedEx"
import { upCase } from "@/utils/FedEx"
;
export default {
components: {
...
...
@@ -261,23 +340,25 @@ export default {
data() {
return {
formData: {
fltDateStart:null,
fltDateEnd:null,
typeId:null,
statusId:null,
kindToAllocFlightId:null,
serviceTypeId:null,
waybillNo:null,
fltNo:null,
ursaList:null,
siteNameList:null,
minWeight:null,
maxWeight:null,
minNumber:null,
maxNumber:null,
pickUpDate:null,
handingCodes:null,
subCategorys:null,
fltDateStart: null,
fltDateEnd: null,
typeId: null,
portName:null,
statusId: null,
kindToAllocFlightId: null,
serviceTypeId: null,
waybillNo: null,
fltNo: null,
ursaList: null,
siteNameList: null,
minWeight: undefined,
maxWeight: undefined,
minNumber: undefined,
maxNumber: undefined,
pickUpDate: null,
handingCodes: null,
subCategorys: null,
customsReceiptStatusId: null,
}, //查询数据
tableHeader: [
{
...
...
@@ -288,7 +369,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:true,
fixed:
true,
},
{
type: "index",
...
...
@@ -298,7 +379,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -306,9 +387,9 @@ export default {
value: "portName",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -316,9 +397,9 @@ export default {
value: "pickUpDate",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -326,9 +407,9 @@ export default {
value: "pickUpScanNo",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -336,9 +417,9 @@ export default {
value: "siteName",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -346,9 +427,9 @@ export default {
value: "waybillNo",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -356,9 +437,9 @@ export default {
value: "totalWaybillNo",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -366,9 +447,9 @@ export default {
value: "serviceTypeName",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -376,9 +457,9 @@ export default {
value: "ursa",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -386,9 +467,9 @@ export default {
value: "typeName",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -396,9 +477,9 @@ export default {
value: "handingCode",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -406,9 +487,9 @@ export default {
value: "subCategory",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -416,9 +497,9 @@ export default {
value: "qty",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -426,9 +507,9 @@ export default {
value: "actualWeight",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -436,9 +517,9 @@ export default {
value: "consigneeCountry",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -448,7 +529,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -456,9 +537,9 @@ export default {
value: "customsReceiptStatusName",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -466,9 +547,9 @@ export default {
value: "preQualificationStatus",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -478,7 +559,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -486,9 +567,9 @@ export default {
value: "statusName",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -496,9 +577,9 @@ export default {
value: "finalFlightNo",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -506,9 +587,9 @@ export default {
value: "finalFlightTime",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -516,9 +597,9 @@ export default {
value: "twoMatchFlightNo",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -526,9 +607,9 @@ export default {
value: "twoMatchFlightTime",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -536,9 +617,9 @@ export default {
value: "preplanFlightNo",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -546,9 +627,9 @@ export default {
value: "preplanFlightTime",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -556,9 +637,9 @@ export default {
value: "fltNoAccs",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -566,9 +647,9 @@ export default {
value: "fltDateAccs",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -576,19 +657,19 @@ export default {
value: "accsFlightRoute",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
name: "是否RDE手工录入",
value: "manualRde",
width: "1
5
0",
width: "1
7
0",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -596,9 +677,9 @@ export default {
value: "cargoRulesStatus",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -608,7 +689,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -618,7 +699,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -628,7 +709,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -638,7 +719,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -646,9 +727,9 @@ export default {
value: "sizeStr",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -658,7 +739,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -668,7 +749,7 @@ export default {
align: "center",
sorTable: false,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -676,9 +757,9 @@ export default {
value: "customsReceiptTime",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -686,9 +767,9 @@ export default {
value: "caPretrialTime",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -696,9 +777,9 @@ export default {
value: "createUserName",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
{
type: "",
...
...
@@ -706,78 +787,87 @@ export default {
value: "createTime",
width: "150",
align: "center",
sorTable:
fals
e,
sorTable:
tru
e,
slot: null,
fixed:false,
fixed:
false,
},
], //表头数据
tableData: [], //表格数据
tableSelection: [], //选中数据
selectData:{
selectData:
{
findConditionData: [],
fltTypes:[],
fltTypes:
[],
HandlingCode: [],
SubCategory: [],
},//查询条件
fltDate:[],
ursaList:
''
,
siteNameList:
''
,
handingCodes:[],
subCategorys:[],
},
//查询条件
fltDate:
[],
ursaList:
""
,
siteNameList:
""
,
handingCodes:
[],
subCategorys:
[],
valueFormat: "yyyy-MM-dd",
totalCount: 0,
page:1,
size:100,
page:
1,
size:
100,
allWeight: 0,
allQty: 0,
dialogVisible: false,
shiftKey: false,
createDate: null,
loading: false,
downLoadingTip:{
tip:"",
formShow:true,
downLoadingTip: {
tip: "",
downloading: false,
},
};
},
created() {
//查询条件
allDictData().then(res=>
{
if(res.code === 200){
this.selectData.SubCategory = res.data.subCategory;
this.selectData.HandlingCode = res.data.handlingCode;
}else
{
this.$message({
message: "查询条件不存在",
type: "warning",
}
);
}
})
new Promise((resolve, reject) =>
{
let obj = {};
findFltConditionDataApi()
.then((res) => {
if (res.code === 200)
{
obj.flightType = res.data.flightType;
} else {
reject(res.msg);
}
}
)
.catch(() => {});
findFltConditionDataApi().then(res=>{
if(res.code === 200)
{
this.selectData.fltTypes = res.data.flightType
}else{
this.$message({
message: "查询条件不存在",
type: "warning",
}
);
}
})
allDictData()
.then((res) =>
{
if (res.code === 200) {
obj.HandlingCode = res.data.handlingCode;
obj.SubCategory = res.data.subCategory;
} else {
reject(res.msg);
}
}
)
.catch(() => {});
findConditionData()
.then((res) => {
if (res.code == 200)
{
this.selectData.findConditionData = res.data;
} else {
this.$message(
{
message: "查询条件不存在",
type: "warning",
});
}
})
findConditionData()
.then((res) =>
{
if (res.code == 200) {
obj.findConditionData = res.data;
} else
{
reject(res.msg);
}
resolve(obj)
}
)
.catch(() => {});
this.select();
}).then(res=>{
this.selectData = res
}).catch((err) => {
this.$message({
message: "查询条件不存在",
type: "warning",
});
});
},
mounted(){
mounted()
{
// this.selectData.HandlingCode.forEach((item,index)=>{
// if(item.id === 108093){
// this.selectData.HandlingCode.unshift(this.HandlingCode.splice(index,1)[0])
...
...
@@ -797,7 +887,7 @@ export default {
methods: {
select() {
this.loading = true;
this.dataInfo()
this.dataInfo()
;
findCargoAllocationData(this.formData)
.then((res) => {
this.loading = false;
...
...
@@ -805,9 +895,9 @@ export default {
this.tableData = res.data.list;
if (res.data.list.length > 0) {
this.totalCount = res.data.total;
this.tableData.forEach((item,
index = 0)=>
{
item.index = index
})
this.tableData.forEach((item,
index = 0) =>
{
item.index = index
;
})
;
} else {
this.$message({
message: "未查询到数据",
...
...
@@ -825,105 +915,115 @@ export default {
this.loading = false;
});
},
cargoTotal(){
cargoTotal()
{
this.allWeight = 0;
this.allQty = 0;
if
(this.tableSelection.length > 0)
{
this.tableSelection.forEach(item=>
{
if
(this.tableSelection.length > 0)
{
this.tableSelection.forEach((item) =>
{
this.allWeight = this.allWeight + item.actualWeight;
this.allQty = this.allQty + item.qty;
})
})
;
this.allWeight = this.allWeight.toFixed();
this.allQty = this.allQty.toFixed();
}
},
dataInfo(){
dataInfo()
{
this.formData.ursaList = null;
this.formData.siteNameList = null;
this.formData.handingCodes = null;
this.formData.subCategorys = null;
if
(this.handingCodes.length > 0 )
{
if
(this.handingCodes.length > 0)
{
this.formData.handingCodes = this.handingCodes;
}
if
(this.subCategorys.length > 0)
{
if
(this.subCategorys.length > 0)
{
this.formData.subCategorys = this.subCategorys;
}
if
(this.formData.minWeight === 0)
{
this.formData.minWeight =
null
;
if
(this.formData.minWeight === 0)
{
this.formData.minWeight =
undefined
;
}
if
(this.formData.maxWeight === 0)
{
this.formData.maxWeight =
null
;
if
(this.formData.maxWeight === 0)
{
this.formData.maxWeight =
undefined
;
}
if
(this.formData.minNumber === 0)
{
this.formData.minNumber =
null
;
if
(this.formData.minNumber === 0)
{
this.formData.minNumber =
undefined
;
}
if
(this.formData.maxNumber === 0)
{
this.formData.maxNumber =
null
;
if
(this.formData.maxNumber === 0)
{
this.formData.maxNumber =
undefined
;
}
if
(this.ursaList && this.ursaList != '')
{
this.formData.ursaList = this.ursaList.split(
';' || '')
if
(this.ursaList && this.ursaList != "")
{
this.formData.ursaList = this.ursaList.split(
";" || "");
}
if
(this.siteNameList && this.siteNameList != '')
{
this.formData.siteNameList = this.siteNameList.split(
';' || '')
if
(this.siteNameList && this.siteNameList != "")
{
this.formData.siteNameList = this.siteNameList.split(
";" || "");
}
if
(this.fltDate && this.fltDate.length > 0)
{
if
(this.fltDate && this.fltDate.length > 0)
{
this.formData.fltDateStart = this.fltDate[0];
this.formData.fltDateEnd = this.fltDate[1];
}
else
{
}
else
{
this.formData.fltDateStart = null;
this.formData.fltDateEnd = null;
}
if (
this.formData.customsReceiptStatusId != null &&
this.formData.customsReceiptStatusId.length < 1
) {
this.formData.customsReceiptStatusId = null;
}
this.formData.page = this.page;
this.formData.size = this.size;
},
xls
e
(val) {
xls
x
(val) {
this.downLoadingTip.downloading = true;
this.dataInfo()
if(val === 0){
this.downLoadingTip.tip = '正在导出本页结果集';
downLoadXlsx('/cargo/allocationExcel',this.formData,'手动配舱表').then(res=>{
this.downLoadingTip.downloading = false;
}).catch(err=>{
this.downLoadingTip.downloading = false;
console.log(err)
})
}else{
this.downLoadingTip.tip = '正在导出全部结果集请耐心等待';
this.dataInfo();
if (val === 0) {
this.downLoadingTip.tip = "正在导出本页结果集";
downLoadXlsx("/cargo/allocationExcel", this.formData, "手动配舱表")
.then((res) => {
this.downLoadingTip.downloading = false;
})
.catch((err) => {
this.downLoadingTip.downloading = false;
console.log(err);
});
} else {
this.downLoadingTip.tip = "正在导出全部结果集请耐心等待";
this.formData.page = null;
this.formData.size = null;
downLoadXlsx('/cargo/allocationExcel',this.formData,'手动配舱表').then(res=>{
this.downLoadingTip.downloading = false;
}).catch(err=>{
this.downLoadingTip.downloading = false;
console.log(err)
})
downLoadXlsx("/cargo/allocationExcel", this.formData, "手动配舱表")
.then((res) => {
this.downLoadingTip.downloading = false;
})
.catch((err) => {
this.downLoadingTip.downloading = false;
console.log(err);
});
}
},
tableSelect(val) {
this.tableSelection = val.selection
this.cargoTotal()
this.tableSelection = val.selection
;
this.cargoTotal()
;
},
tableSelectAll(val){
this.tableSelection = val
this.cargoTotal()
tableSelectAll(val)
{
this.tableSelection = val
;
this.cargoTotal()
;
},
currentChange(val){
currentChange(val)
{
this.formData.limitStart = val.start;
this.page = val.page;
this.select()
this.select()
;
},
addFit() {
let open = true;
this.tableSelection.forEach(
item=>
{
if
(item.statusId != 107966)
{
this.tableSelection.forEach(
(item) =>
{
if
(item.statusId != 107966)
{
open = false;
}
})
if
(open)
{
})
;
if
(open)
{
this.dialogVisible = open;
}
else
{
}
else
{
this.$message({
message: "
此类型货物不可配舱
",
message: "
包含不可手动配舱货物
",
type: "warning",
});
this.tableSelection = [];
...
...
@@ -933,7 +1033,7 @@ export default {
},
dialogBeforeClose(val) {
this.dialogVisible = val.close;
if
(val.reload)
{
if
(val.reload)
{
this.tableSelection = [];
this.$refs.newTables.clearTable();
this.cargoTotal();
...
...
@@ -966,6 +1066,14 @@ export default {
this.siteNameList = upCase(val);
},
},
portName: {
get: function () {
return this.formData.portName;
},
set: function (val) {
this.formData.portName = upCase(val);
},
},
},
};
</script>
...
...
@@ -976,22 +1084,22 @@ export default {
color: #606266;
font-size: 14px;
margin-top: 10px;
margin-left:50px;
margin-left:
50px;
}
.line{
.line
{
text-align: center;
}
.el-empty{
width:30%;
height:37px;
padding:0px;
.el-empty
{
width:
30%;
height:
37px;
padding:
0px;
line-height: 37px;
.el-empty__image{
.el-empty__image
{
width: 0px;
height:0px;
height:
0px;
}
.el-empty__description{
margin-top:0px;
.el-empty__description
{
margin-top:
0px;
}
}
</style>
\ No newline at end of file
...
...
src/views/allocationConfig/cargoAllocation/info.vue
View file @
9d2f21a
...
...
@@ -67,7 +67,7 @@
<script>
import { allocationFlight } from "@/api/cargoSelect";
import { MessageBox } from
'element-ui'
import { MessageBox } from
"element-ui";
export default {
props: {
dialogVisible: {
...
...
@@ -82,10 +82,10 @@ export default {
data() {
return {
formData: {
ids:
[],
ids:
[],
fltNo: undefined,
fltDate:undefined,
overweight:
false
fltDate:
undefined,
overweight:
false,
},
cargoHeader: [
{ name: "口岸代码", value: "portName" },
...
...
@@ -96,101 +96,101 @@ export default {
{ name: "URSA", value: "ursa" },
{ name: "实际重量", value: "actualWeight" },
{ name: "件数", value: "qty" },
{ name: "ACCS原航班号", value: "fltNoAccs" },
{ name: "ACCS原航班日期", value: "fltDateAccs" },
{ name: "品名描述", value: "nameDescription" },
{ name: "是否自动", value: "cargoRulesStatus" },
{ name: "创建人", value: "createUserName" },
{ name: "创建时间", value: "createTime" },
],
fltHeader: [
{ name: "航班日期", value: "fltDate" },
{ name: "航班号", value: "fltNo" },
{ name: "航班路线", value: "route" },
{ name: "航班类型", value: "typeName" },
{ name: "总重量", value: "totalWeight" },
{ name: "额外增重百分比", value: "extraWeightPercent" },
{ name: "已配重量", value: "alloctedWeight" },
{ name: "配舱优先级", value: "priorityRuleName" },
{ name: "是否开启高地价", value: "highLowPriceFlg" },
{ name: "航班起飞时间", value: "takeOffTime" },
{ name: "创建人", value: "createUserName" },
{ name: "创建时间", value: "createTime" },
],
rules:{
fltNo: [{
rules: {
fltNo: [
{
required: true,
message: "航班号不能为空",
trigger: "blur"
}],
fltDate: [{
trigger: "blur",
},
],
fltDate: [
{
required: true,
message: "航班日期不能为空",
trigger: "change"
}],
}
trigger: "change",
},
],
},
};
},
methods: {
cleaerForm(){
this.formData
=
{
ids:
[],
cleaerForm()
{
this.formData
=
{
ids:
[],
fltNo: undefined,
fltDate:undefined,
overweight:
false
}
fltDate:
undefined,
overweight:
false,
}
;
},
//确定配舱
submit() {
let arr = [];
this.tableData.forEach(
item
=> {
arr.push(item.id)
this.tableData.forEach(
(item)
=> {
arr.push(item.id)
;
});
this.formData.ids = arr;
if(this.formData.fltNo && this.formData.fltDate){
allocationFlight(this.formData).then(res=>{//code 200 配舱成功 601 重量已满需要确认 其余code直接输出msg
if(res.code === 200){
if (this.formData.fltNo && this.formData.fltDate) {
allocationFlight(this.formData).then((res) => {
//code 200 配舱成功 601 重量已满需要确认 其余code直接输出msg
if (res.code === 200) {
this.$message({
message: "货物配舱成功",
type: "success",
});
}else if(res.code === 202){
MessageBox.confirm('航班配重已满,是否继续配舱?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}
).then(() => {
this.formData.overweight = true;//确定继续overweight变为true再次请求接口
allocationFlight(this.formData).then(res=>{
if(res.code === 200){
this.$message({
message: "货物配舱成功",
type: "success",
});
}else{
this.$message({
message: res.msg,
type: "warning",
});
}
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
} else if (res.code === 202) {
MessageBox.confirm(res.msg, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.formData.overweight = true; //确定继续overweight变为true再次请求接口
allocationFlight(this.formData).then((res) => {
if (res.code === 200) {
this.$message({
message: "货物配舱成功",
type: "success",
});
} else {
this.$message({
message: res.msg,
type: "warning",
});
}
});
this.cleaerForm();
this.$emit("dialogBeforeClose", { close: false, reload: true });
})
this.cleaerForm()
this.$emit("dialogBeforeClose", {close:false,reload:true});
}).catch(() => {//取消 取消当前配舱
this.$message({
.catch(() => {
//取消 取消当前配舱
this.$message({
message: "配舱已取消",
type: "success",
});
this.cleaerForm()
this.$emit("dialogBeforeClose", {close:false,reload:false});
});
}else{
this.cleaerForm();
this.$emit("dialogBeforeClose", {
close: false,
reload: false,
});
});
} else {
this.$message({
message: res.msg,
type: "warning",
});
}
})
}
else
{
})
;
}
else
{
this.$message({
message: "航班号或航班日期不能为空",
type: "warning",
...
...
@@ -198,8 +198,8 @@ export default {
}
},
dialogBeforeClose() {
this.cleaerForm()
this.$emit("dialogBeforeClose", {
close:false,reload:false
});
this.cleaerForm()
;
this.$emit("dialogBeforeClose", {
close: false, reload: false
});
},
},
computed: {
...
...
src/views/allocationConfig/flightAllocConfig/info.vue
View file @
9d2f21a
...
...
@@ -2,16 +2,31 @@
<div style="margin: 40px" v-loading="loading">
<el-empty description="找不到这条数据!" v-if="isEmpty"></el-empty>
<template v-else>
<el-form ref="form" :model="form" label-width="200px" size="small" :disabled="disable" :rules="rules">
<el-form
ref="form"
:model="form"
label-width="200px"
size="small"
:disabled="disable"
:rules="rules"
>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="航班号" prop="purposeOfFlightNo">
<el-input v-model.trim="form.purposeOfFlightNo" style="width: 60%" :disabled="nameDisabled"></el-input>
<el-input
v-model.trim="form.purposeOfFlightNo"
style="width: 60%"
:disabled="nameDisabled"
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班预审" prop="isNeedRequired">
<el-switch v-model="isNeedRequired" :active-value="1" :inactive-value="0">
<el-switch
v-model="isNeedRequired"
:active-value="1"
:inactive-value="0"
>
</el-switch>
</el-form-item>
</el-col>
...
...
@@ -19,38 +34,76 @@
<el-form-item>
<el-row :gutter="20">
<el-col :span="6">
<el-radio v-model="isLocation" label="1" size="mini">站点包含</el-radio>
<el-radio v-model="isLocation" label="2" size="mini">站点不包含</el-radio>
<el-radio v-model="isLocation" label="1" size="mini"
>站点包含</el-radio
>
<el-radio v-model="isLocation" label="2" size="mini"
>站点不包含</el-radio
>
</el-col>
<el-col :span="6">
<el-alert title="提示:站点之间用回车符分隔" type="warning" show-icon size="mini" :closable="false"
style="height: 30px; width: fit-content">
<el-alert
title="提示:站点之间用回车符分隔"
type="warning"
show-icon
size="mini"
:closable="false"
style="height: 30px; width: fit-content"
>
</el-alert>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="站点包含" v-show="isLocation == 1">
<el-input type="textarea" v-model="form.location" :rows="6" resize="none" style="width: 600px"></el-input>
<el-input
type="textarea"
v-model="form.location"
:rows="6"
resize="none"
style="width: 600px"
></el-input>
</el-form-item>
<el-form-item label="站点不包含" v-show="isLocation == 2">
<el-input type="textarea" v-model="form.notLocation" :rows="6" resize="none" style="width: 600px"></el-input>
<el-input
type="textarea"
v-model="form.notLocation"
:rows="6"
resize="none"
style="width: 600px"
></el-input>
</el-form-item>
<el-form-item>
<el-alert title="提示:URSA之间用分号分隔,例:F2;F3;P_" type="warning" show-icon size="mini" :closable="false"
style="height: 30px; width: fit-content">
<el-alert
title="提示:URSA之间用分号分隔,例:F2;F3;P_"
type="warning"
show-icon
size="mini"
:closable="false"
style="height: 30px; width: fit-content"
>
</el-alert>
</el-form-item>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="URSA包含">
<el-input type="textarea" v-model.trim="form.includeUrsa" :rows="6" resize="none"></el-input>
<el-input
type="textarea"
v-model.trim="form.includeUrsa"
:rows="6"
resize="none"
></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="URSA不包含">
<el-input type="textarea" v-model.trim="form.notIncludeUrsa" :rows="6" resize="none"></el-input>
<el-input
type="textarea"
v-model.trim="form.notIncludeUrsa"
:rows="6"
resize="none"
></el-input>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -58,41 +111,65 @@
<el-form-item label="件数">
<el-col :span="3">
<!-- <el-input v-model="form.minNumOfPieces"></el-input> -->
<el-input-number v-model="
<el-input-number
v-model="
form.minNumOfPieces == 0
? (form.minNumOfPieces = undefined)
: form.minNumOfPieces
" :precision="0" :controls="false" style="width: 100%"></el-input-number>
"
:precision="0"
:controls="false"
style="width: 100%"
:min="1"
></el-input-number>
</el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="3">
<!-- <el-input v-model="form.maxNumOfPieces"></el-input> -->
<el-input-number v-model="
<el-input-number
v-model="
form.maxNumOfPieces == 0
? (form.maxNumOfPieces = undefined)
: form.maxNumOfPieces
" :precision="0" :controls="false" style="width: 100%" :min="form.minNumOfPieces + 1"></el-input-number>
"
:precision="0"
:controls="false"
style="width: 100%"
:min="form.minNumOfPieces"
></el-input-number>
</el-col>
</el-form-item>
<el-form-item label="重量">
<el-col :span="3">
<!-- <el-input v-model="form.minWeight"></el-input> -->
<el-input-number v-model="
<el-input-number
v-model="
form.minWeight == 0
? (form.minWeight = undefined)
: form.minWeight
" :precision="2" :controls="false" style="width: 100%"></el-input-number>
"
:precision="2"
:controls="false"
style="width: 100%"
:min="0.01"
></el-input-number>
</el-col>
<el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
<el-col style="text-align: center" :span="1">-</el-col>
<el-col :span="3">
<!-- <el-input v-model="form.maxWeight"></el-input> -->
<el-input-number v-model="
<el-input-number
v-model="
form.maxWeight == 0
? (form.maxWeight = undefined)
: form.maxWeight
" :precision="2" :controls="false" style="width: 100%" :min="form.minWeight + 0.01"></el-input-number>
"
:precision="2"
:controls="false"
style="width: 100%"
:min="form.minWeight"
></el-input-number>
</el-col>
<el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
</el-form-item>
...
...
@@ -102,7 +179,10 @@
<el-checkbox-group v-model="form.typeOfGoods">
<el-row>
<el-col :span="2" v-for="item in cargoType" :key="item.id">
<el-checkbox :label="item.chineseName" :name="item.chineseName">
<el-checkbox
:label="item.chineseName"
:name="item.chineseName"
>
</el-checkbox>
</el-col>
</el-row>
...
...
@@ -115,7 +195,11 @@
<el-checkbox-group v-model="form.declarationCategory">
<el-row>
<el-col :span="3" v-for="item in cargoStatus" :key="item.id">
<el-checkbox :label="item.chineseName" :name="item.chineseName" disabled></el-checkbox>
<el-checkbox
:label="item.chineseName"
:name="item.chineseName"
disabled
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
...
...
@@ -127,7 +211,10 @@
<el-checkbox-group v-model="form.serviceCode">
<el-row>
<el-col :span="2" v-for="item in serviceCode" :key="item.id">
<el-checkbox :label="item.englishName" :name="item.englishName"></el-checkbox>
<el-checkbox
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
...
...
@@ -139,7 +226,10 @@
<el-checkbox-group v-model="form.handlingCode">
<el-row>
<el-col :span="3" v-for="item in handlingCode" :key="item.id">
<el-checkbox :label="item.englishName" :name="item.englishName"></el-checkbox>
<el-checkbox
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
...
...
@@ -151,332 +241,341 @@
<el-checkbox-group v-model="form.subCategory">
<el-row>
<el-col :span="3" v-for="item in subCategory" :key="item.id">
<el-checkbox :label="item.englishName" :name="item.englishName"></el-checkbox>
<el-checkbox
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
</el-col>
</el-row>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item>
</el-form-item>
<el-form-item> </el-form-item>
</el-form>
<div style="marginLeft:200px">
<el-button type="primary" size="small" v-if="$route.params.handle != 'detail'" @click="submit('form')"
:loading="btnLoading">
<span v-if="$route.params.handle === 'add'">添加</span>
<span v-else>保存</span>
</el-button>
<el-button size="small" @click="close">取消</el-button>
<div style="marginleft: 200px">
<el-button
type="primary"
size="small"
v-if="$route.params.handle != 'detail'"
@click="submit('form')"
:loading="btnLoading"
>
<span v-if="$route.params.handle === 'add'">添加</span>
<span v-else>保存</span>
</el-button>
<el-button size="small" @click="close">取消</el-button>
</div>
</template>
</div>
</template>
<script>
import {
findByFlightId,
updateOrAddFlight,
allDictData,
findDestinationFltRuleByActualFlight,
} from "@/api/destinationFlight";
import {
findByFlightId,
updateOrAddFlight,
allDictData,
findDestinationFltRuleByActualFlight,
} from "@/api/destinationFlight";
export default {
data() {
return {
form: {
typeOfGoods: [],
declarationCategory: [],
serviceCode: [],
subCategory: [],
handlingCode:[],
},
rules: {
purposeOfFlightNo: [{
required: true,
message: "请输入航班号",
trigger: "blur"
}, ],
},
export default {
data() {
return {
form: {
typeOfGoods: [],
declarationCategory: [],
formServiceCode: [],
formHandlingCode:[],
formSubCategory: [],
cargoType: [],
cargoStatus: [],
serviceCode: [],
handlingCode:[],
subCategory: [],
isLocation: "1",
isNeedRequired: 0,
disable: false,
nameDisabled: false,
btnLoading: false,
loading: true,
isEmpty: false,
};
},
methods: {
//排序
sorttodo(arr, englishName){
var index = 1, newArr = [], length = arr.length;
for ( var i=0; i<length; i++){
if ( arr[i].englishName === englishName ){
newArr[0] = arr[i];
}
else{
newArr[index++] = arr[i];
}
}
return newArr;
handlingCode: [],
},
submit(form) {
this.$refs[form].validate((valid) => {
if (!valid) {
return false;
}
});
this.btnLoading = true;
let handle = this.$route.params.handle;
if (handle === "update") {
//修改,获取id
this.form.id = this.$route.params.id;
rules: {
purposeOfFlightNo: [
{
required: true,
message: "请输入航班号",
trigger: "blur",
},
],
},
typeOfGoods: [],
declarationCategory: [],
formServiceCode: [],
formHandlingCode: [],
formSubCategory: [],
cargoType: [],
cargoStatus: [],
serviceCode: [],
handlingCode: [],
subCategory: [],
isLocation: "1",
isNeedRequired: 0,
disable: false,
nameDisabled: false,
btnLoading: false,
loading: true,
isEmpty: false,
};
},
methods: {
//排序
sorttodo(arr, englishName) {
var index = 1,
newArr = [],
length = arr.length;
for (var i = 0; i < length; i++) {
if (arr[i].englishName === englishName) {
newArr[0] = arr[i];
} else {
newArr[index++] = arr[i];
}
}
return newArr;
},
//调用接口
this.typeOfGoods = this.form.typeOfGoods;
this.declarationCategory = this.form.declarationCategory;
this.formServiceCode = this.form.serviceCode;
this.formHandlingCode = this.form.handlingCode;
this.formSubCategory = this.form.subCategory;
this.form.isNeedRequired = this.isNeedRequired;
if (this.isLocation == 1) {
this.form.notLocation = "";
} else {
this.form.location = "";
submit(form) {
this.$refs[form].validate((valid) => {
if (!valid) {
return false;
}
if (
this.form.includeUrsa &&
this.form.includeUrsa.length != 0 &&
this.form.notIncludeUrsa &&
this.form.notIncludeUrsa.length != 0
) {
let include = this.form.includeUrsa.split(";");
let notInclude = this.form.notIncludeUrsa.split(";");
let errorList = [];
notInclude.forEach((element) => {
if (element.indexOf("_") > 0) {
errorList.push(element);
} else {
let flag = 0;
for (let i = 0; i < include.length; i++) {
if (
element == "" ||
(include[i].indexOf("_") > 0 &&
include[i].substring(0, 1) == element.substring(0, 1))
) {
flag = 1;
break;
}
}
if (flag == 0) {
errorList.push(element);
});
this.btnLoading = true;
let handle = this.$route.params.handle;
if (handle === "update") {
//修改,获取id
this.form.id = this.$route.params.id;
}
//调用接口
this.typeOfGoods = this.form.typeOfGoods;
this.declarationCategory = this.form.declarationCategory;
this.formServiceCode = this.form.serviceCode;
this.formHandlingCode = this.form.handlingCode;
this.formSubCategory = this.form.subCategory;
this.form.isNeedRequired = this.isNeedRequired;
if (this.isLocation == 1) {
this.form.notLocation = "";
} else {
this.form.location = "";
}
if (
this.form.includeUrsa &&
this.form.includeUrsa.length != 0 &&
this.form.notIncludeUrsa &&
this.form.notIncludeUrsa.length != 0
) {
let include = this.form.includeUrsa.split(";");
let notInclude = this.form.notIncludeUrsa.split(";");
let errorList = [];
notInclude.forEach((element) => {
if (element.indexOf("_") > 0) {
errorList.push(element);
} else {
let flag = 0;
for (let i = 0; i < include.length; i++) {
if (
element == "" ||
(include[i].indexOf("_") > 0 &&
include[i].substring(0, 1) == element.substring(0, 1))
) {
flag = 1;
break;
}
}
});
console.log(errorList);
if (errorList.length != 0) {
this.$message({
showClose: true,
message: "URSA不包含中[" +
errorList +
"]错误,URSA不包含必须属于URSA包含中的类型",
type: "error",
});
this.btnLoading = false;
return;
}
}
updateOrAddFlight(this.form).then((response) => {
if (response.code === 200) {
this.$message({
showClose: true,
message: "成功",
type: "success",
});
this.close();
} else {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.btnLoading = false;
if (flag == 0) {
errorList.push(element);
}
}
});
this.form.typeOfGoods = this.typeOfGoods;
this.form.declarationCategory = this.declarationCategory;
this.form.serviceCode = this.formServiceCode;
this.form.handlingCode = this.formHandlingCode;
this.form.subCategory = this.formSubCategory;
},
close() {
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
),
1
);
this.$router.push(
this.$store.state.tagsView.visitedViews[
this.$store.state.tagsView.visitedViews.length - 1
].path
);
},
},
created() {
let handle = this.$route.params.handle;
allDictData().then((response) => {
if (response.code != 200) {
console.log(errorList);
if (errorList.length != 0) {
this.$message({
showClose: true,
message:
"URSA不包含中[" +
errorList +
"]错误,URSA不包含必须属于URSA包含中的类型",
type: "error",
});
this.btnLoading = false;
return;
}
}
updateOrAddFlight(this.form).then((response) => {
if (response.code === 200) {
this.$message({
showClose: true,
message: "成功",
type: "success",
});
this.close();
} else {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
reuturn
;
this.btnLoading = false
;
}
let dict = response.data;
this.cargoType = dict.cargoType;
this.cargoStatus = dict.cargoStatus;
this.serviceCode = dict.serviceCode.sort((a, b) =>
a.englishName.localeCompare(b.englishName)
);
this.handlingCode =this.sorttodo(dict.handlingCode,"BLANK");
this.subCategory = dict.subCategory;
});
if (handle === "detail") {
this.disable = true;
this.form.typeOfGoods = this.typeOfGoods;
this.form.declarationCategory = this.declarationCategory;
this.form.serviceCode = this.formServiceCode;
this.form.handlingCode = this.formHandlingCode;
this.form.subCategory = this.formSubCategory;
},
close() {
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
),
1
);
this.$router.push(
this.$store.state.tagsView.visitedViews[
this.$store.state.tagsView.visitedViews.length - 1
].path
);
},
},
created() {
let handle = this.$route.params.handle;
allDictData().then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
reuturn;
}
let dict = response.data;
this.cargoType = dict.cargoType;
this.cargoStatus = dict.cargoStatus;
this.serviceCode = dict.serviceCode.sort((a, b) =>
a.englishName.localeCompare(b.englishName)
);
this.handlingCode = this.sorttodo(dict.handlingCode, "BLANK");
this.subCategory = dict.subCategory;
});
if (handle === "detail") {
this.disable = true;
}
if (handle != "add") {
this.nameDisabled = true;
let id = this.$route.params.id;
if (handle != "add") {
this.nameDisabled = true;
let id = this.$route.params.id;
if (isNaN(Number(id))) {
findDestinationFltRuleByActualFlight(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.isEmpty = true;
} else if (response.data == null) {
this.isEmpty = true;
if (isNaN(Number(id))) {
findDestinationFltRuleByActualFlight(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.isEmpty = true;
} else if (response.data == null) {
this.isEmpty = true;
} else {
let info = response.data;
info.typeOfGoods = info.typeOfGoods
? info.typeOfGoods.split(";")
: [];
info.declarationCategory = info.declarationCategory
? info.declarationCategory.split(";")
: [];
info.serviceCode = info.serviceCode
? info.serviceCode.split(";")
: [];
info.handlingCode = info.handlingCode
? info.handlingCode.split(";")
: [];
info.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
if (info.location != null || info.location == "") {
this.isLocation = "1";
} else {
let info = response.data;
info.typeOfGoods = info.typeOfGoods ?
info.typeOfGoods.split(";") :
[];
info.declarationCategory = info.declarationCategory ?
info.declarationCategory.split(";") :
[];
info.serviceCode = info.serviceCode ?
info.serviceCode.split(";") :
[];
info.handlingCode = info.handlingCode ?
info.handlingCode.split(";") :
[];
info.subCategory = info.subCategory ?
info.subCategory.split(";") :
[];
this.form = info;
if (info.location != null || info.location == "") {
this.isLocation = "1";
} else {
this.isLocation = "2";
}
this.isNeedRequired = info.isNeedRequired;
this.isLocation = "2";
}
this.loading = false;
});
} else {
//货物信息
findByFlightId(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.isEmpty = true;
this.isNeedRequired = info.isNeedRequired;
}
this.loading = false;
});
} else {
//货物信息
findByFlightId(id).then((response) => {
if (response.code != 200) {
this.$message({
showClose: true,
message: response.msg,
type: "error",
});
this.isEmpty = true;
} else {
let info = response.data.list;
info.typeOfGoods = info.typeOfGoods
? info.typeOfGoods.split(";")
: [];
info.declarationCategory = info.declarationCategory
? info.declarationCategory.split(";")
: [];
info.serviceCode = info.serviceCode
? info.serviceCode.split(";")
: [];
info.handlingCode = info.handlingCode
? info.handlingCode.split(";")
: [];
info.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
this.form = info;
if (info.location != null || info.location == "") {
this.isLocation = "1";
} else {
let info = response.data.list;
info.typeOfGoods = info.typeOfGoods ?
info.typeOfGoods.split(";") :
[];
info.declarationCategory = info.declarationCategory ?
info.declarationCategory.split(";") :
[];
info.serviceCode = info.serviceCode ?
info.serviceCode.split(";") :
[];
info.handlingCode = info.handlingCode ?
info.handlingCode.split(";") :
[];
info.subCategory = info.subCategory ?
info.subCategory.split(";") :
[];
this.form = info;
if (info.location != null || info.location == "") {
this.isLocation = "1";
} else {
this.isLocation = "2";
}
let isNeedRequired = response.data.isNeedRequired;
this.form.isNeedRequired = isNeedRequired;
this.isNeedRequired = isNeedRequired;
this.isLocation = "2";
}
this.loading = false;
});
}
} else {
this.loading = false;
let isNeedRequired = response.data.isNeedRequired;
this.form.isNeedRequired = isNeedRequired;
this.isNeedRequired = isNeedRequired;
}
this.loading = false;
});
}
},
};
} else {
this.loading = false;
}
},
};
</script>
<style rel="stylesheet/scss" lang="scss">
.el-textarea.is-disabled .el-textarea__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-textarea.is-disabled .el-textarea__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-input.is-disabled .el-input__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-input.is-disabled .el-input__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: rgba(255, 255, 255, 0.5);
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
background-color: rgba(255, 255, 255, 0.5);
}
.el-checkbox__input.is-disabled+
span.el-checkbox__label {
color: #303133;
}
.el-checkbox__input.is-disabled +
span.el-checkbox__label {
color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
border-color: #606266;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
border-color: #606266;
}
</style>
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
9d2f21a
<template>
<div
class="app-container"
>
<div>
<el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" size="medium">
<el-row>
<el-col :span="6">
...
...
@@ -51,8 +51,8 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" @click="handleFlightStatus('flightStatus10')">
航班
开启</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" @click="handleFlightStatus('flightStatus80')">
航班
关闭</el-button>
<el-button type="primary" icon="el-icon-circle-check" size="mini" @click="handleFlightStatus('flightStatus10')">
自动配舱
开启</el-button>
<el-button type="primary" icon="el-icon-circle-close" size="mini" @click="handleFlightStatus('flightStatus80')">
自动配舱
关闭</el-button>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
...
...
@@ -178,14 +178,14 @@
<el-col :span="12">
<el-form-item label="原始重量(KG)" prop="originalWeight">
<el-input-number @change="LowHighAvailable" placeholder="请输入原始重量(KG)" style="width:93%"
v-model="form.originalWeight"
:precision="2"
></el-input-number>
v-model="form.originalWeight"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="额外增重百分比" prop="extraWeightPercent">
<el-input-number @change="LowHighAvailable" placeholder="请输入额外增重百分比" style="width:93%"
v-model="form.extraWeightPercent"
:precision="2"
></el-input-number>
v-model="form.extraWeightPercent"></el-input-number>
</el-form-item>
</el-col>
...
...
@@ -207,14 +207,14 @@
<el-col :span="12">
<el-form-item label="高价百分比" prop="highPriceWeightPercent">
<el-input-number :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%"
v-model="form.highPriceWeightPercent"
:precision="2"
></el-input-number>
v-model="form.highPriceWeightPercent"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价百分比" prop="lowPriceWeightPercent">
<el-input-number :disabled="true" placeholder="请输入低价百分比" style="width:93%"
v-model="form.lowPriceWeightPercent"
:precision="2"
></el-input-number>
v-model="form.lowPriceWeightPercent"></el-input-number>
</el-form-item>
</el-col>
...
...
@@ -541,7 +541,6 @@
},
//计算高地价可配
LowHighAvailable() {
//判断是否开启高地价
if (this.form.highLowPriceFlg) {
this.ishighPriceWeightPercent=false;
...
...
@@ -556,21 +555,33 @@
this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form
.highPriceWeightPercent / 100));
// this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100)
} else {
}else if(this.title == "修改航班信息" && this.form.highPriceWeightPercent > 0){
if(this.form.highAvailableWeight){
this.$set(this.form, 'highAvailableWeight', this.form.highAvailableWeight)
}else{
this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form
.highPriceWeightPercent / 100));
}
}else {
this.$set(this.form, "highAvailableWeight", 0);
// this.form.HighAvailableWeight = 0;
}
//低价可配
if (this.form.lowPriceWeightPercent > 0) {
this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form
.highAvailableWeight);
//this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
} else {
}else if(this.title == "修改航班信息" && this.form.lowPriceWeightPercent > 0){
if(this.form.lowAvailableWeight){
this.$set(this.form, 'lowAvailableWeight', this.form.lowAvailableWeight)
}else{
this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form
.highAvailableWeight);
}
}else {
this.$set(this.form, "lowAvailableWeight", 0);
// this.form.lowAvailableWeight = 0;
}
}else{
this.ishighPriceWeightPercent=true;
}
...
...
@@ -581,7 +592,7 @@
let Weight = 0;
if (this.form.extraWeightPercent > 0) {
Weight = this.form.originalWeight + this.form.originalWeight * (this.form.extraWeightPercent / 100)
}
else {
}else {
Weight = this.form.originalWeight;
}
return Weight;
...
...
Please
register
or
login
to post a comment