jinhui.wang

version:0.5.3

......@@ -42,6 +42,8 @@ export function updateOrAddFlight(form){
form.declarationCategory = form.declarationCategory.join(';');
form.serviceCode = form.serviceCode.join(';');
form.subCategory = form.subCategory.join(';');
form.handlingCode = form.handlingCode.join(';');
return request({
url:'/destinationFlight/updateOrAddFlight',
......
......@@ -35,7 +35,7 @@
:base-path="route.path"
/>
</el-menu>
<div class="version">version:0.5.1</div>
<div class="version">{{ version }}</div>
<!-- </el-scrollbar> -->
</div>
</template>
......@@ -45,8 +45,14 @@ import { mapGetters, mapState } from "vuex";
import Logo from "./Logo";
import SidebarItem from "./SidebarItem";
import variables from "@/assets/styles/variables.scss";
import settings from "@/settings";
export default {
data() {
return {
version: "",
};
},
components: { SidebarItem, Logo },
computed: {
...mapState(["settings"]),
......@@ -70,6 +76,9 @@ export default {
return !this.sidebar.opened;
},
},
created() {
this.version = settings.version;
},
};
</script>
......
......@@ -37,5 +37,10 @@ module.exports = {
* The default is only used in the production env
* If you want to also use it in dev, you can pass ['production', 'development']
*/
errorLog: 'production'
errorLog: 'production',
/**
* 版本号
*/
version:'version:0.5.3'
}
......
......@@ -9,10 +9,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
//baseURL: process.env.VUE_APP_BASE_API,
//baseURL: 'http://192.168.1.45:8080',
baseURL: `http://47.103.140.98:9002`,
// baseURL: 'https://imacuat.zmd.apac.fedex.com/IMAC2',
// baseURL: 'http://192.168.1.134:18080',
baseURL: `http://47.103.140.98:9002`, //阿里云服务器
// baseURL: 'https://imacuat.zmd.apac.fedex.com/IMAC2', //uat服务器
// baseURL: 'http://192.168.1.134:18080', //测试服务器
// 超时
timeout: 30000
......
......@@ -5,9 +5,9 @@ const mimeMap = {
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
zip: 'application/zip'
}
// const baseUrl = 'https://imacuat.zmd.apac.fedex.com/IMAC2'
const baseUrl = 'http://47.103.140.98:9002'
// const baseUrl = 'http://192.168.1.134:18080'
// const baseUrl = 'https://imacuat.zmd.apac.fedex.com/IMAC2' // uat服务器
const baseUrl = 'http://47.103.140.98:9002' //阿里云服务器
// const baseUrl = 'http://192.168.1.134:18080' //测试服务器
export function downLoadZip(str, filename) {
var url = baseUrl + str
axios({
......
......@@ -2,87 +2,55 @@
<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="8">
<el-form-item label="航班号" prop="purposeOfFlightNo">
<el-input
v-model.trim="form.purposeOfFlightNo"
style="width: 30%"
:disabled="nameDisabled"
></el-input>
<el-input v-model.trim="form.purposeOfFlightNo" style="width: 30%" :disabled="nameDisabled"></el-input>
</el-form-item>
<el-form-item>
<el-alert
title="提示:站点之间用回车符分隔"
type="warning"
show-icon
size="small"
:closable="false"
style="height: 30px; width: fit-content"
>
</el-alert>
</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>
</el-form-item>
</el-col>
</el-row>
<el-form-item>
<el-row :gutter="20">
<el-col :span="10">
<el-form-item label="站点包含">
<!-- <el-alert title="提示:站点之间用回车符分隔" type="info" show-icon size="small" :closable="false" style="height:30px; margin-buttom"> </el-alert> -->
<el-input
type="textarea"
v-model="form.location"
:rows="6"
resize="none"
></el-input>
</el-form-item>
<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-col>
<el-col :span="10">
<el-form-item label="站点不包含">
<el-input
type="textarea"
v-model="form.notLocation"
:rows="6"
resize="none"
></el-input>
</el-form-item>
<el-col :span="6">
<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-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-form-item>
<el-form-item>
<el-alert
title="提示:URSA之间用分号分隔,例:F2;F3;P_"
type="warning"
show-icon
size="small"
: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>
......@@ -90,63 +58,41 @@
<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%"></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 + 1"></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%"></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 + 0.01"></el-input-number>
</el-col>
<el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
</el-form-item>
......@@ -154,12 +100,8 @@
<el-form-item label="申报类别">
<el-card shadow="never" style="width: 70%">
<el-checkbox-group v-model="form.typeOfGoods">
<el-checkbox
v-for="item in cargoType"
:key="item.id"
:label="item.chineseName"
:name="item.chineseName"
></el-checkbox>
<el-checkbox v-for="item in cargoType" :key="item.id" :label="item.chineseName" :name="item.chineseName">
</el-checkbox>
</el-checkbox-group>
</el-card>
</el-form-item>
......@@ -167,12 +109,8 @@
<el-form-item label="货物类型">
<el-card shadow="never" style="width: 70%">
<el-checkbox-group v-model="form.declarationCategory">
<el-checkbox
v-for="item in cargoStatus"
:key="item.id"
:label="item.chineseName"
:name="item.chineseName"
></el-checkbox>
<el-checkbox v-for="item in cargoStatus" :key="item.id" :label="item.chineseName" :name="item.chineseName"
disabled></el-checkbox>
</el-checkbox-group>
</el-card>
</el-form-item>
......@@ -180,12 +118,17 @@
<el-form-item label="Service Code">
<el-card shadow="never" style="width: 70%">
<el-checkbox-group v-model="form.serviceCode">
<el-checkbox
v-for="item in serviceCode"
:key="item.id"
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
<el-checkbox v-for="item in serviceCode" :key="item.id" :label="item.englishName"
:name="item.englishName"></el-checkbox>
</el-checkbox-group>
</el-card>
</el-form-item>
<el-form-item label="Handling Code">
<el-card shadow="never" style="width: 70%">
<el-checkbox-group v-model="form.handlingCode">
<el-checkbox v-for="item in handlingCode" :key="item.id" :label="item.englishName"
:name="item.englishName"></el-checkbox>
</el-checkbox-group>
</el-card>
</el-form-item>
......@@ -193,24 +136,17 @@
<el-form-item label="Sub Category">
<el-card shadow="never" style="width: 70%">
<el-checkbox-group v-model="form.subCategory">
<el-checkbox
v-for="item in subCategory"
:key="item.id"
:label="item.englishName"
:name="item.englishName"
></el-checkbox>
<el-checkbox v-for="item in subCategory" :key="item.id" :label="item.englishName"
:name="item.englishName"></el-checkbox>
</el-checkbox-group>
</el-card>
</el-form-item>
</el-form>
<el-row style="margin-left: 200px">
<el-button
type="primary"
size="small"
v-if="$route.params.handle != 'detail'"
@click="submit('form')"
:loading="btnLoading"
>
<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>
......@@ -221,14 +157,14 @@
</template>
<script>
import {
import {
findByFlightId,
updateOrAddFlight,
allDictData,
findDestinationFltRuleByActualFlight,
} from "@/api/destinationFlight";
} from "@/api/destinationFlight";
export default {
export default {
data() {
return {
form: {
......@@ -236,20 +172,27 @@ export default {
declarationCategory: [],
serviceCode: [],
subCategory: [],
handlingCode:[],
},
rules: {
purposeOfFlightNo: [
{ required: true, message: "请输入航班号", trigger: "blur" },
],
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,
......@@ -258,6 +201,20 @@ export default {
};
},
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;
},
submit(form) {
this.$refs[form].validate((valid) => {
if (!valid) {
......@@ -276,7 +233,56 @@ export default {
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;
}
}
if (flag == 0) {
errorList.push(element);
}
}
});
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({
......@@ -297,6 +303,7 @@ export default {
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() {
......@@ -331,6 +338,9 @@ export default {
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") {
......@@ -354,19 +364,28 @@ export default {
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.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
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.loading = false;
});
......@@ -382,19 +401,30 @@ export default {
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.subCategory = info.subCategory
? info.subCategory.split(";")
: [];
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.loading = false;
});
......@@ -403,28 +433,32 @@ export default {
this.loading = false;
}
},
};
};
</script>
<style rel="stylesheet/scss" lang="scss">
.el-textarea.is-disabled .el-textarea__inner {
.el-textarea.is-disabled .el-textarea__inner {
background-color: rgba(255, 255, 255, 0.5);
color: #303133;
}
.el-input.is-disabled .el-input__inner {
}
.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 {
}
.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 {
}
.el-checkbox__input.is-disabled+span.el-checkbox__label {
color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
border-color: #303133;
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
}
.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
border-color: #606266;
}
}
</style>
......
......@@ -65,7 +65,7 @@
<!-- 查看目的航班对话框 -->
<el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false">
<el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false" :append-to-body="true">
<el-table v-loading="loadingFlightDate" :data="sourceFlightAndFlightDate">
<el-table-column label="原航班" align="center" prop="sourceFlightNo" />
......@@ -84,7 +84,7 @@
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false">
<el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="10">
......
......@@ -55,9 +55,9 @@
<el-form-item>
<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-form-item>
</el-form>
<!-- <el-row :gutter="10" class="mb8">
......@@ -114,7 +114,8 @@
</el-table-column> -->
<el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="120" />
<el-table-column v-if="findAllFltDatList.length>0" label="操作" align="center" class-name="small-padding fixed-width" width="130" fixed="right">
<el-table-column v-if="findAllFltDatList.length>0" label="操作" align="center"
class-name="small-padding fixed-width" width="130" fixed="right">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
<!-- <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDeleteorPlayorpause(scope.row,0,'删除')">
......@@ -130,12 +131,13 @@
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false">
<el-dialog :title="title" :visible.sync="open" width="60%" :close-on-click-modal="false" :append-to-body="true">
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
<el-row>
<el-col :span="12">
<el-form-item label="航班号" prop="fltNo">
<el-input @blur="blurfltNo" :disabled="formdisabled.fltNo" style="width:93%;" v-model="form.fltNo" placeholder="请输入航班号" />
<el-input @blur="blurfltNo" :disabled="formdisabled.fltNo" style="width:93%;" v-model="form.fltNo"
placeholder="请输入航班号" />
</el-form-item>
</el-col>
<!-- <el-col :span="1"> &#12288;</el-col> -->
......@@ -181,23 +183,21 @@
</el-col>
<el-col :span="12">
<el-form-item label="原始重量(KG)" prop="originalWeight">
<el-input placeholder="请输入原始重量(KG)" style="width:93%" min="0"
oninput="value=value.indexOf('.') > -1?value.slice(0, value.indexOf('.') + 3):value" type="number"
v-model="form.originalWeight"></el-input>
<el-input-number @change="LowHighAvailable" placeholder="请输入原始重量(KG)" style="width:93%"
v-model="form.originalWeight" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="额外增重百分比" prop="extraWeightPercent">
<el-input placeholder="请输入额外增重百分比" style="width:93%" min="0"
oninput="value=value.indexOf('.') > -1?value.slice(0, value.indexOf('.') + 3):value" type="number"
v-model="form.extraWeightPercent"></el-input>
<el-input-number @change="LowHighAvailable" placeholder="请输入额外增重百分比" style="width:93%"
v-model="form.extraWeightPercent" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否开启高低价" prop="highLowPriceFlg">
<el-switch v-model="form.highLowPriceFlg" active-color="#13ce66">
<el-switch @change='LowHighAvailable' v-model="form.highLowPriceFlg" active-color="#13ce66">
</el-switch>
</el-form-item>
</el-col>
......@@ -212,34 +212,61 @@
<el-col :span="12">
<el-form-item label="高价百分比" prop="highPriceWeightPercent">
<el-input placeholder="请输入高价百分比" style="width:93%" min="0"
oninput="value=value.indexOf('.') > -1?value.slice(0, value.indexOf('.') + 3):value" type="number"
v-model="form.highPriceWeightPercent"></el-input>
<el-input-number @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%"
v-model="form.highPriceWeightPercent" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价百分比" prop="lowPriceWeightPercent">
<el-input placeholder="请输入低价百分比" style="width:93%" min="0"
oninput="value=value.indexOf('.') > -1?value.slice(0, value.indexOf('.') + 3):value" type="number"
v-model="form.lowPriceWeightPercent"></el-input>
<el-input-number @change="LowHighAvailable" placeholder="请输入低价百分比" style="width:93%"
v-model="form.lowPriceWeightPercent" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价可配重量" prop="HighAvailableWeight">
<el-input-number :disabled="true" placeholder="请输入高价可配重量" style="width:93%"
v-model="form.HighAvailableWeight" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价可配重量" prop="LowAvailableWeight">
<el-input-number :disabled="true" placeholder="请输入低价可配重量" style="width:93%"
v-model="form.LowAvailableWeight" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价已配重量" prop="HighAllocatedWeight">
<el-input-number :disabled="true" placeholder="请输入高价已配重量" style="width:93%"
v-model="form.HighAllocatedWeight" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价已配重量" prop="LowAllocatedWeight">
<el-input-number :disabled="true" placeholder="请输入低价已配重量" style="width:93%"
v-model="form.LowAllocatedWeight" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="已配重量" prop="alloctedWeight">
<el-input :disabled="true" placeholder="请输入已配重量" style="width:93%" min="0"
oninput="value=value.indexOf('.') > -1?value.slice(0, value.indexOf('.') + 3):value" type="number"
v-model="form.alloctedWeight"></el-input>
<el-form-item label="已配总重量" prop="alloctedWeight">
<el-input-number :disabled="true" placeholder="请输入已配总重量" style="width:93%" v-model="form.alloctedWeight"
:precision="2"></el-input-number>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" :disabled="form.alloctedWeight>0 ? true:false" @click="submitForm">确 定</el-button>
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
......@@ -251,7 +278,8 @@
findAllFltDataApi,
findFltById,
saveOrUpdate,
findFltCommonConf
findFltCommonConf,
updateStatusBatch
} from "@/api/findAllFltData";
export default {
......@@ -360,42 +388,44 @@
},
methods: {
//输入航班号后
blurfltNo(){
if(this.form.fltNo!=null&&this.form.fltNo!=undefined &&this.form.fltNo!=""){
this.form.fltNo=this.form.fltNo.toUpperCase();
blurfltNo() {
if (this.form.fltNo != null && this.form.fltNo != undefined && this.form.fltNo != "") {
this.form.fltNo = this.form.fltNo.toUpperCase();
findFltCommonConf(this.form).then(response => {
if (response.code == 200) {
//额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑
if(response.data.extraWeightPercent!=null&&response.data.extraWeightPercent!=undefined){
if (response.data.extraWeightPercent != null && response.data.extraWeightPercent != undefined) {
this.$set(this.form, "extraWeightPercent", response.data.extraWeightPercent);
// this.form.extraWeightPercent=response.data.extraWeightPercent;
}else{
} else {
this.$set(this.form, "extraWeightPercent", 0);
//this.form.extraWeightPercent=response.data.extraWeightPercent=0;
}
//是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑
if(response.data.highLowPriceFlg!=null&&response.data.highLowPriceFlg!=undefined){
this.form.highLowPriceFlg=response.data.highLowPriceFlg=== 1 ? true : false;
}else{
this.form.highLowPriceFlg=response.data.highLowPriceFlg=1;
if (response.data.highLowPriceFlg != null && response.data.highLowPriceFlg != undefined) {
this.form.highLowPriceFlg = response.data.highLowPriceFlg === 1 ? true : false;
} else {
this.form.highLowPriceFlg = true;
}
//是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑;
if(response.data.isNeedRequired!=null&&response.data.isNeedRequired!=undefined){
this.form.isNeedRequired=response.data.isNeedRequired=== 1 ? true : false;
}else{
this.form.isNeedRequired=response.data.isNeedRequired=1;
if (response.data.isNeedRequired != null && response.data.isNeedRequired != undefined) {
this.form.isNeedRequired = response.data.isNeedRequired === 1 ? true : false;
} else {
this.form.isNeedRequired = false;
}
//高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑
if(response.data.highPriceWeightPercent!=null&&response.data.highPriceWeightPercent!=undefined){
this.form.highPriceWeightPercent=response.data.highPriceWeightPercent;
}else{
this.form.highPriceWeightPercent=response.data.highPriceWeightPercent=60;
if (response.data.highPriceWeightPercent != null && response.data.highPriceWeightPercent !=
undefined) {
this.form.highPriceWeightPercent = response.data.highPriceWeightPercent;
} else {
this.form.highPriceWeightPercent = response.data.highPriceWeightPercent = 60;
}
if(response.data.lowPriceWeightPercent!=null&&response.data.lowPriceWeightPercent!=undefined){
this.form.lowPriceWeightPercent=response.data.lowPriceWeightPercent;
}else{
this.form.lowPriceWeightPercent=response.data.lowPriceWeightPercent=40;
if (response.data.lowPriceWeightPercent != null && response.data.lowPriceWeightPercent != undefined) {
this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent;
} else {
this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent = 40;
}
this.LowHighAvailable();
} else {
this.msgError(response.msg);
}
......@@ -418,9 +448,9 @@
// 是否需要预审 1 预审 0 取消预审
needRequiredFormat(row) {
if (row.needRequired === 1) {
return '预审'
return ''
} else {
return '取消预审'
return ''
}
return row.ticketToPiece;
},
......@@ -448,7 +478,7 @@
//航班类型
this.flightTypelist = response.data.flightType;
//航班状态
// debugger
this.flightStatuslist = response.data.flightStatus;
} else {
......@@ -460,7 +490,7 @@
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.postId)
this.ids = selection.map(item => item.id)
this.single = selection.length != 1
this.multiple = !selection.length
},
......@@ -497,7 +527,10 @@
this.title = "添加航班信息";
this.form.id = null;
this.form.statusId = this.flightStatuslist[0].id;
this.form.alloctedWeight = 0;
this.form.alloctedWeight = 0; //已配重量
this.form.LowAllocatedWeight = 0; //低价已配重量
this.form.HighAllocatedWeight = 0; //高价已配重量
//航班号
this.formdisabled.fltNo = false;
//航班日期
......@@ -511,6 +544,50 @@
//原始重量
this.formdisabled.originalWeight = false;
},
//计算高地价可配
LowHighAvailable() {
//判断是否开启高地价
if (this.form.highLowPriceFlg) {
let Weight = 0;
//计算实际重量
if (this.form.highPriceWeightPercent > 0 || this.form.lowPriceWeightPercent > 0) {
Weight = this.Weightall();
}
//高价可配
if (this.form.highPriceWeightPercent > 0) {
this.$set(this.form, "HighAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form
.highPriceWeightPercent / 100));
// this.form.HighAvailableWeight = Weightall * (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 {
this.$set(this.form, "LowAvailableWeight", 0);
// this.form.LowAvailableWeight = 0;
}
}
},
//计算实际重量
Weightall() {
let Weight = 0;
if (this.form.extraWeightPercent > 0) {
Weight = this.form.originalWeight + this.form.originalWeight * (this.form.extraWeightPercent / 100)
} else {
Weight = this.form.originalWeight;
}
return Weight;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
......@@ -528,25 +605,9 @@
this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false;
//是否预审
this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false;
// if (this.form.alloctedWeight > 0) {
// //航班路线
// this.formdisabled.route = true;
// //航班种类
// this.formdisabled.kindId = true;
// //航班类型
// this.formdisabled.typeId = true;
// //原始重量
// this.formdisabled.originalWeight = true;
// }else{
// //航班路线
// this.formdisabled.route = false;
// //航班种类
// this.formdisabled.kindId = false;
// //航班类型
// this.formdisabled.typeId = false;
// //原始重量
// this.formdisabled.originalWeight = false;
// }
// 计算高地价可配
this.LowHighAvailable();
} else {
this.msgError(response.msg);
}
......@@ -593,15 +654,27 @@
if (valid) {
//debugger
let formdata = JSON.parse(JSON.stringify(this.form));
//高价百分比和低价百分比和不可以大于100
if(formdata.highPriceWeightPercent+formdata.lowPriceWeightPercent>100){
this.$message.warning("高低价百分比总和不可以大于100");
if (this.form.highLowPriceFlg && formdata.highPriceWeightPercent + formdata.lowPriceWeightPercent !=
100) {
this.$message.warning("请正确填写高低价百分比");
return;
}
//已删除的无法修改
//拿到已删除的id
let statusId=0;
this.flightStatuslist.map((item) => {
// this.unitList 是你 select option遍历的集合 e 是选中的id
if (item.chineseName === "已删除") {
statusId=item.id;
return;
}
})
if (statusId === formdata.statusId) {
this.$message.warning("已删除的航班无法修改");
return;
}
//是否开启高地价
formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0;
//是否预审
......@@ -641,6 +714,26 @@
this.queryParams.pageNum = 1;
this.queryParams.start = 0;
this.findAllFltData();
},
//批量开启/关闭航班
handleFlightStatus(status){
let handle = status == 'flightStatus80' ? '关闭' : '开启'
if (this.ids.length == 0){
this.msgError('请选择批量' + handle + '的航班')
return;
}
let data = {};
data.status = status;
data.updateIds = this.ids;
updateStatusBatch(data).then(response => {
if (response.code === 200) {
this.msgSuccess( handle + "成功");
this.findAllFltData();
} else {
this.msgError(response.msg);
}
});
}
}
......
......@@ -2,18 +2,18 @@
<div class="cargoPage" v-loading="downloading">
<el-form
ref="cargoForm"
size="mini"
size="small"
:model="formData"
label-position="top"
label-width="auto"
style="margin: 10px; width: 100%"
>
<el-row type="flex" style="flexWrap: wrap!important">
<el-row type="flex" style="flexWrap: wrap!important;margin:0 20px">
<el-col :span="6">
<el-form-item label="ACCS航班日期:">
<el-form-item label="配舱航班日期:">
<el-date-picker
class="formItem"
v-model="flightTime"
v-model="cargoPlaneTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
......@@ -24,34 +24,21 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建日期:">
<el-date-picker
class="formItem"
v-model="createDate"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS航班号:">
<el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号"></el-input>
<el-form-item label="配载航班号:">
<el-input type="textarea" v-model="cargoPlaneNo" class="formItem" placeholder="AC001;AC002"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="申报类别:">
<el-form-item label="海关回执状态:">
<el-select
placeholder="不限"
v-model="formData.typeId"
v-model="formData.customsReceiptStatusId"
class="formItem"
multiple
clearable
>
<el-option
v-for="item in findConditionData.cargoType"
v-for="item in findConditionData.cargoCustomsReturnStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
......@@ -60,42 +47,26 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="24">
<el-collapse>
<el-collapse-item>
<template slot="title">
<span style="fontWeight:900;color:#409EFF;fontSize:14px"><i class="el-icon-s-tools"></i>更多查询条件</span>
</template>
<el-row type="flex" style="flexWrap: wrap!important">
<el-col :span="6">
<el-form-item label="货物状态:">
<el-select
placeholder="不限"
v-model="formData.statusId"
<el-form-item label="运单号:">
<el-input
type="textarea"
v-model="formData.waybillNo"
class="formItem"
filterable
clearable
>
<el-option
v-for="item in findConditionData.cargoStatus"
:label="item.chineseName"
:value="item.id"
:key="item.id"
>
</el-option>
</el-select>
placeholder="xxxx;xxxx"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="海关回执状态:">
<el-form-item label="申报类别:">
<el-select
placeholder="不限"
v-model="formData.customsReceiptStatusId"
v-model="formData.typeId"
class="formItem"
clearable
>
<el-option
v-for="item in findConditionData.cargoCustomsReturnStatus"
v-for="item in findConditionData.cargoType"
:label="item.chineseName"
:value="item.id"
:key="item.id"
......@@ -124,50 +95,49 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否自动:">
<el-select
placeholder="不限"
v-model="formData.allocationTypeId"
class="formItem"
clearable
>
<el-option
label="手动"
value="1"
>
</el-option>
<el-option
label="自动"
value="2"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="运单号:">
<el-form-item label="URSA:">
<el-input
type="textarea"
v-model="formData.waybillNo"
v-model="ursa"
class="formItem"
placeholder="xxxx;xxxx"
placeholder="S_;P_;E2"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="站点:">
<el-input
type="textarea"
v-model="siteName"
class="formItem"
placeholder="PVG;PEK"
></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-collapse>
<el-collapse-item>
<template slot="title">
<span style="fontWeight:900;color:#409EFF;fontSize:14px"><i class="el-icon-s-tools"></i>更多查询条件</span>
</template>
<el-row type="flex" style="flexWrap: wrap!important">
<el-col :span="6">
<el-form-item label="URSA:">
<el-input
v-model="ursa"
<el-form-item label="ACCS原航班日期:">
<el-date-picker
class="formItem"
></el-input>
v-model="flightTime"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="ACCS航班号:">
<el-input type="text" v-model="fltNo" class="formItem" placeholder="请输入ACCS航班号"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
......@@ -181,6 +151,60 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="创建日期:">
<el-date-picker
class="formItem"
v-model="createDate"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:value-format="valueFormat"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="货物状态:">
<el-select
placeholder="不限"
v-model="formData.statusId"
class="formItem"
filterable
clearable
>
<el-option
v-for="item in findConditionData.cargoStatus"
:label="item.chineseName"
:value="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="不限"
v-model="formData.allocationTypeId"
class="formItem"
clearable
>
<el-option
label="手动"
value="1"
>
</el-option>
<el-option
label="自动"
value="2"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-collapse-item>
</el-collapse>
......@@ -226,15 +250,6 @@
</el-form-item>
</el-col> -->
<!-- <el-col :span="6">
<el-form-item label="航班序列单号:">
<el-input
type="text"
v-model="formData.mawbCode"
class="formItem"
></el-input>
</el-form-item>
</el-col> -->
<!-- <el-col :span="6">
<el-form-item label="配置航班类型:">
<el-select
placeholder="不限"
......@@ -270,8 +285,17 @@
</el-select>
</el-form-item>
</el-col> -->
<!-- <el-col :span="6">
<el-form-item label="航班序列单号:">
<el-input
type="text"
v-model="formData.mawbCode"
class="formItem"
></el-input>
</el-form-item>
</el-col> -->
</el-row>
<div style="paddingleft: 10px;marginTop:20px">
<div style="paddingLeft: 10px;marginTop:20px">
<el-button
type="primary"
icon="el-icon-search"
......@@ -298,12 +322,13 @@
ref="cargoTable"
:data="tableData"
v-loading="tableLoading"
border
highlight-current-row border stripe
size="mini"
@select="cheacked"
@select-all="selectAll"
>
<el-table-column type="selection" width="55" fixed> </el-table-column>
<el-table-column type="index" label="序号">
<el-table-column type="selection" width="55" fixed align="center"> </el-table-column>
<el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column
......@@ -311,9 +336,9 @@
:prop="item.value"
:label="item.name"
:key="item.name"
width="150"
header-align="center"
align="center"
:width="item.value=='bigPretrialOpinion'?'300':'170'"
:formatter="formatter"
sortable
>
......@@ -323,7 +348,7 @@
:total="totalCount"
:page-size.sync="limitSize"
background
style="margin-top: 40px; text-align: right"
style="marginTop: 40px; textAlign: right"
@next-click="nextClick"
@prev-click="prevClick"
@current-change="currentChange"
......@@ -371,10 +396,11 @@ export default {
{ name: "取件扫描号", value: "pickUpScanNo" },
{ name: "服务类型", value: "serviceTypeName" },
{ name: "运单号", value: "waybillNo" },
{ name: "总单号", value: "totalWaybillNo" },
{ name: "货物状态", value: "statusName" },
{ name: "ACCS航班号", value: "fltNoAccs" },
{ name: "ACCS航班日期", value: "fltDateAccs" },
{ name: "ACCS航线", value: "accsFlightRoute" },
{ name: "ACCS航班号", value: "fltNoAccs" },
{ name: "ACCS航班日期", value: "fltDateAccs" },
{ name: "ACCS航线", value: "accsFlightRoute" },
{ name: "预配航班日期", value: "preplanFlightTime" },
{ name: "预配航班号", value: "preplanFlightNo" },
{ name: "二配航班日期", value: "twoMatchFlightTime" },
......@@ -470,6 +496,9 @@ export default {
this.allQty = 0;
this.checks()
this.tableLoading = true;
if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){
this.formData.customsReceiptStatusId = null;
}
if (this.createDate != null && this.createDate.length > 0) {
this.formData.createTimeStart = this.createDate[0];
this.formData.createTimeEnd = this.createDate[1];
......@@ -498,7 +527,6 @@ export default {
this.formData.cargoPlaneStart = null;
this.formData.cargoPlaneEnd = null;
}
this.formData.limitStart = this.limitStart;
this.formData.limitSize = this.limitSize;
findCargoData(this.formData).then((res) => {
......@@ -620,6 +648,9 @@ export default {
// 导出表格
xlse(page) {
let cargoXlse = {title:"货物导出表",cargoConditionDto:{}};
if(this.formData.customsReceiptStatusId != null && this.formData.customsReceiptStatusId.length < 1){
this.formData.customsReceiptStatusId = null;
}
if (this.createDate != null && this.createDate.length > 0) {
this.formData.createTimeStart = this.createDate[0];
this.formData.createTimeEnd = this.createDate[1];
......@@ -697,6 +728,14 @@ export default {
this.formData.ursa = val.toUpperCase();
},
},
cargoPlaneNo:{
get: function () {
return this.formData.cargoPlaneNo;
},
set: function (val) {
this.formData.cargoPlaneNo = val.toUpperCase();
},
}
},
};
</script>
......@@ -712,5 +751,4 @@ export default {
width:100%;
max-width: 300px;
}
</style>
\ No newline at end of file
......
//version:0.5.1
//version:0.5.3
'use strict'
const path = require('path')
const defaultSettings = require('./src/settings.js')
......@@ -35,10 +35,9 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `https://imacuat.zmd.apac.fedex.com/IMAC2`,
// target: `http://192.168.1.45:8080`,
target: `http://47.103.140.98:9002`,
// target: `http://192.168.1.134:18080`,
// target: `https://imacuat.zmd.apac.fedex.com/IMAC2`, //uat服务器
target: `http://47.103.140.98:9002`, //阿里云服务器
// target: `http://192.168.1.134:18080`, //测试服务器
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......