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-25 12:55:46 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
53a0e3f2b9c53d158a34da2cc92b80180b81b7a7
53a0e3f2
1 parent
4cfe11f4
无用代码删除,bug修正
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1473 additions
and
943 deletions
src/api/caPreReviewImport.js
src/api/flightInfoImport.js
src/layout/components/Navbar.vue
src/utils/request.js
src/utils/zipdownload.js
src/views/allocationConfig/cargoAllocation/index.vue
src/views/allocationConfig/flightAllocConfig/index.vue
src/views/allocationConfig/flightAllocConfig/info.vue
src/views/allocationConfig/flightRandConfig/index.vue
src/views/basicInformation/caExportPreQualification/index.vue
src/views/basicInformation/caPreReviewImport/index.vue
src/views/basicInformation/flightInformationImport/index.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/systemConfig/roleConfig/index.vue
src/views/systemConfig/userConfig/index.vue
src/views/systemConfig/userConfig/profile/index.vue
vue.config.js
src/api/caPreReviewImport.js
View file @
53a0e3f
import
service
from
"../utils/request"
;
import
request
from
'@/utils/request'
export
function
downLoadTemplate
(
template
)
{
...
...
src/api/flightInfoImport.js
View file @
53a0e3f
import
service
from
"../utils/request"
;
import
request
from
'@/utils/request'
// 查询航班种类
...
...
src/layout/components/Navbar.vue
View file @
53a0e3f
...
...
@@ -16,7 +16,6 @@
</div>
<el-dropdown-menu slot="dropdown">
<router-link to="/user/profile">
<!-- <el-dropdown-item>个人中心</el-dropdown-item> -->
</router-link>
<el-dropdown-item @click.native="logout">
<span>退出登录</span>
...
...
src/utils/request.js
View file @
53a0e3f
...
...
@@ -12,6 +12,7 @@ const service = axios.create({
// baseURL: `http://47.103.140.98:7001/iMAC`,
baseURL
:
'https://imacuat.zmd.apac.fedex.com/iMAC'
,
// baseURL: 'http://192.168.1.133:7001/iMAC',
// baseURL: 'http://192.168.1.133:7001/iMAC',//生产
// 超时
timeout
:
30000
,
...
...
@@ -82,7 +83,7 @@ service.interceptors.response.use(res => {
type
:
'error'
})
return
Promise
.
reject
(
new
Error
(
msg
))
}
else
if
(
code
!==
200
&&
code
!==
201
&&
code
!==
202
)
{
}
else
if
(
code
!==
200
&&
code
!==
201
&&
code
!==
202
&&
code
!==
603
)
{
Message
({
message
:
msg
,
type
:
'error'
...
...
src/utils/zipdownload.js
View file @
53a0e3f
...
...
@@ -8,6 +8,7 @@ const mimeMap = {
const
baseUrl
=
'https://imacuat.zmd.apac.fedex.com/iMAC'
//uat服务器
// const baseUrl = 'http://47.103.140.98:7001/iMAC' //阿里云服务器
// const baseUrl = 'http://192.168.1.133:7001/iMAC' //测试服务器
// const baseUrl = 'http://192.168.1.133:7001/iMAC' //生产
export
function
downLoadZip
(
str
,
filename
)
{
var
url
=
baseUrl
+
str
...
...
src/views/allocationConfig/cargoAllocation/index.vue
View file @
53a0e3f
...
...
@@ -852,7 +852,7 @@ export default {
.catch(() => {});
},
//查询
select() {
async
select() {
this.loading = true;
this.dataInfo();
findCargoAllocationData(this.formData)
...
...
src/views/allocationConfig/flightAllocConfig/index.vue
View file @
53a0e3f
...
...
@@ -129,8 +129,6 @@ import {
enableOrDisable,
} from "@/api/destinationFlight";
import { parseTime } from "@/utils/FedEx";
export default {
name: "FlightAllocConfig",
data() {
...
...
src/views/allocationConfig/flightAllocConfig/info.vue
View file @
53a0e3f
...
...
@@ -391,7 +391,6 @@ export default {
}
}
});
console.log(errorList);
if (errorList.length != 0) {
this.$message({
showClose: true,
...
...
src/views/allocationConfig/flightRandConfig/index.vue
View file @
53a0e3f
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true">
<el-form-item label="ACCS原航班">
<el-input type="text" v-model="upCase" placeholder="请输入ACCS原航班" clearable class="formItem"></el-input>
<el-input
type="text"
v-model="upCase"
placeholder="请输入ACCS原航班"
clearable
class="formItem"
></el-input>
<!-- <el-input v-model="upCase" placeholder="请输入原航班" clearable size="small" /> -->
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择" clearable size="small">
<el-option v-for="dict in statusList" :key="dict.id" :label="dict.name" :value="dict.id" />
<el-select
v-model="queryParams.status"
placeholder="请选择"
clearable
size="small"
>
<el-option
v-for="dict in statusList"
:key="dict.id"
:label="dict.name"
:value="dict.id"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询ACCS原航班配置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>查询ACCS原航班配置</el-button
>
</el-form-item>
<br />
<el-form-item label="日期" prop="flightDate">
<el-date-picker value-format="yyyy-MM-dd" v-model="queryParams.flightDate" type="date" placeholder="选择日期">
<el-date-picker
value-format="yyyy-MM-dd"
v-model="queryParams.flightDate"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="findSourceFlightAndFlightDate">查询实际配载航班
</el-button> 
<span style="color: red;">注:ACCS原航班+日期查询该日期的航班实际情况</span>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="findSourceFlightAndFlightDate"
>查询实际配载航班 </el-button
> 
<span style="color: ff4949"
>注:ACCS原航班+日期查询该日期的航班实际情况</span
>
</el-form-item>
<br />
<el-form-item>
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">添加规则</el-button>
<el-button
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>添加规则</el-button
>
</el-col>
  <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
 
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="sourceFlightRulesList">
<el-table-column type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column label="ACCS原航班" align="center" prop="sourceFlightNo" />
<el-table-column label="配载航班排序" align="center" prop="flightRank" width="280" />
<el-table-column
label="ACCS原航班"
align="center"
prop="sourceFlightNo"
/>
<el-table-column
label="配载航班排序"
align="center"
prop="flightRank"
width="280"
/>
<!-- <el-table-column label="优先级" align="center" prop="priority" /> -->
<el-table-column label="周期" align="center" prop="dayOfWeek" width="180" />
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
<el-table-column label="开始时间" align="center" prop="startDate" width="100" />
<el-table-column label="结束时间" align="center" prop="endDate" width="100" />
<el-table-column label="最后修改人" align="center" prop="updateUserName" width="100" />
<el-table-column label="最后修改时间" align="center" prop="updateTime" width="100" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180" fixed="right">
<el-table-column
label="周期"
align="center"
prop="dayOfWeek"
width="180"
/>
<el-table-column
label="状态"
align="center"
prop="status"
:formatter="statusFormat"
/>
<el-table-column
label="开始时间"
align="center"
prop="startDate"
width="100"
/>
<el-table-column
label="结束时间"
align="center"
prop="endDate"
width="100"
/>
<el-table-column
label="最后修改人"
align="center"
prop="updateUserName"
width="100"
/>
<el-table-column
label="最后修改时间"
align="center"
prop="updateTime"
width="100"
/>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="180"
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,'删除')">
删除</el-button>
<el-button size="mini" type="text" icon="el-icon-video-play" v-if="scope.row.status == '3'"
@click="handleDeleteorPlayorpause(scope.row,1,'启用')">启用</el-button>
<el-button size="mini" type="text" icon="el-icon-video-pause" v-if="scope.row.status != '3'"
@click="handleDeleteorPlayorpause(scope.row,3,'停用')">停用</el-button>
<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, '删除')"
>
删除</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-video-play"
v-if="scope.row.status == '3'"
@click="handleDeleteorPlayorpause(scope.row, 1, '启用')"
>启用</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-video-pause"
v-if="scope.row.status != '3'"
@click="handleDeleteorPlayorpause(scope.row, 3, '停用')"
>停用</el-button
>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" layout=" prev, pager, next, jumper, sizes,total"
:page.sync="queryParams.pageNum" :limit.sync="queryParams.limit" @pagination="findSourceFlightRules" />
<pagination
v-show="total > 0"
:total="total"
layout=" prev, pager, next, jumper, sizes,total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.limit"
@pagination="findSourceFlightRules"
/>
<!-- 查看目的航班对话框 -->
<el-dialog title="实际配载航班" :visible.sync="openFlightDate" width="70%" :close-on-click-modal="false" :append-to-body="true">
<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 type="index" label="序号" align="center">
<template slot-scope="scope">{{ scope.$index + 1 }}</template>
</el-table-column>
<el-table-column label="ACCS原航班" align="center" prop="sourceFlightNo" />
<el-table-column label="实际配载航班" align="center" prop="actualFlight" width="280" />
<el-table-column
label="ACCS原航班"
align="center"
prop="sourceFlightNo"
/>
<el-table-column
label="实际配载航班"
align="center"
prop="actualFlight"
width="280"
/>
<el-table-column label="航班日期" align="center" prop="flightDate" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
width="200"
>
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleClick(scope.row.actualFlight, 'detail')">查看配置维度</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleClick(scope.row.actualFlight, 'detail')"
>查看配置维度</el-button
>
</template>
</el-table-column>
</el-table>
...
...
@@ -89,50 +227,84 @@
</div>
</el-dialog>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="55%" :append-to-body="true" :close-on-click-modal="false">
<el-dialog
:title="title"
:visible.sync="open"
width="55%"
:append-to-body="true"
:close-on-click-modal="false"
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="10">
<el-form-item label="ACCS原航班" prop="sourceFlightNo">
<el-input v-model="form.sourceFlightNo" placeholder="请输入ACCS原航班号" />
<el-input
v-model="form.sourceFlightNo"
placeholder="请输入ACCS原航班号"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="有效开始时间" prop="startDate">
<el-date-picker clearable size="small" :picker-options="pickerOptionsStart" v-model="form.startDate"
type="date" value-format="yyyy-MM-dd" placeholder="选择开始时间">
<el-date-picker
clearable
size="small"
:picker-options="pickerOptionsStart"
v-model="form.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择开始时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="有效结束时间" prop="endDate">
<el-date-picker clearable size="small" :picker-options="pickerOptionsEnd" v-model="form.endDate"
type="date" value-format="yyyy-MM-dd" placeholder="选择结束时间">
<el-date-picker
clearable
size="small"
:picker-options="pickerOptionsEnd"
v-model="form.endDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择结束时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="24" style="margin-bottom: 5%;">
<span style="color: red;margin-left: 10%;">提示:配载航班之同请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span><br />
<span style="color: red;margin-left: 10%;">提示:如果需要设置配载航班延迟或提前可以直接在目的航斑后加减【+-】天数。如:CA1053+1;CZ433-1</span>
<el-col :span="24" style="margin-bottom: 5%">
<span style="color: ff4949; margin-left: 10%"
>提示:配载航班之同请用分号分隔【符号不区分中英文】,例:CA1053;C7433</span
><br />
<span style="color: ff4949; margin-left: 10%"
>提示:如果需要设置配载航班延迟或提前可以直接在目的航斑后加减【+-】天数。如:CA1053+1;CZ433-1</span
>
</el-col>
<el-col :span="24">
<el-form-item label="配载航班" prop="flightRank">
<el-input type="textarea" v-model="form.flightRank" :rows="4"></el-input>
<el-input
type="textarea"
v-model="form.flightRank"
:rows="4"
></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="周期段">
<el-checkbox-group v-model="dayOfWeek">
<el-checkbox v-for="item in dayOfWeekList" :key="item" :label="item" :name="item"></el-checkbox>
<el-checkbox
v-for="item in dayOfWeekList"
:key="item"
:label="item"
:name="item"
></el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
...
...
@@ -143,296 +315,299 @@
</div>
</template>
<script>
import {
findSourceFlightRulesApi,
sourceFlightRulesSaveApi,
delOrEnableORDisableApi,
findSourceFlightAndFlightDateApi
} from "@/api/sourceFlightRules";
export default {
name: "FlightRandConfig",
data() {
return {
// data 中设定
pickerOptionsStart: {
disabledDate: time => {
let endDateVal = this.form.endDate;
if (endDateVal) {
return time.getTime() > new Date(endDateVal).getTime() || time.getTime() < new Date().getTime() - 24 *
60 * 60 * 1000;
} else {
return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
}
import {
findSourceFlightRulesApi,
sourceFlightRulesSaveApi,
delOrEnableORDisableApi,
findSourceFlightAndFlightDateApi,
} from "@/api/sourceFlightRules";
export default {
name: "FlightRandConfig",
data() {
return {
// data 中设定
pickerOptionsStart: {
disabledDate: (time) => {
let endDateVal = this.form.endDate;
if (endDateVal) {
return (
time.getTime() > new Date(endDateVal).getTime() ||
time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000
);
} else {
return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
}
},
pickerOptionsEnd: {
disabledDate: time =>
{
let beginDateVal = this.form.startDate;
if (beginDateVal) {
return time.getTime() < new Date(beginDateVal).getTime();
} else {
return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
}
},
pickerOptionsEnd:
{
disabledDate: (time) => {
let beginDateVal = this.form.startDate;
if (beginDateVal) {
return time.getTime() < new Date(beginDateVal).getTime();
} else {
return time.getTime() < new Date().getTime() - 24 * 60 * 60 * 1000;
}
},
},
//周期段
dayOfWeekList: ['D1', 'D2', 'D3', 'D4', 'D5', 'D6', 'D7'],
// 遮罩层
loading: false,
// 遮罩层
loadingFlightDate: false,
// 弹出层标题
title: "",
// 总条数
total: 0,
// 原航班规则数据
sourceFlightRulesList: [],
//目的航班数据
sourceFlightAndFlightDate: [],
statusList: [{
'id': 1,
'name': '有效'
}, {
'id': 3,
'name': '停用'
}],
// 新增修改查看规则弹出层
open: false,
// 是否显示查看目的航班弹出层
openFlightDate: false,
// 查询参数
queryParams: {
start: 0, //当前条数【代表第几条数据 +1开始】
pageNum: 1,
limit: 20, //一页显示多少条数据
sourceFlightNo: undefined, //原航班号
status: undefined, //状态
flightDate: undefined //日期
//周期段
dayOfWeekList: ["D1", "D2", "D3", "D4", "D5", "D6", "D7"],
// 遮罩层
loading: false,
// 遮罩层
loadingFlightDate: false,
// 弹出层标题
title: "",
// 总条数
total: 0,
// 原航班规则数据
sourceFlightRulesList: [],
//目的航班数据
sourceFlightAndFlightDate: [],
statusList: [
{
id: 1,
name: "有效",
},
dayOfWeek: [],
// 表单参数
form: {
dayOfWeek: []
{
id: 3,
name: "停用",
},
// 表单校验
rules: {
sourceFlightNo: [{
],
// 新增修改查看规则弹出层
open: false,
// 是否显示查看目的航班弹出层
openFlightDate: false,
// 查询参数
queryParams: {
start: 0, //当前条数【代表第几条数据 +1开始】
pageNum: 1,
limit: 20, //一页显示多少条数据
sourceFlightNo: undefined, //原航班号
status: undefined, //状态
flightDate: undefined, //日期
},
dayOfWeek: [],
// 表单参数
form: {
dayOfWeek: [],
},
// 表单校验
rules: {
sourceFlightNo: [
{
required: true,
message: "ACCS原航班号不能为空",
trigger: "blur"
}],
flightRank: [{
trigger: "blur",
},
],
flightRank: [
{
required: true,
message: "配载航班不能为空",
trigger: "blur"
}],
}
};
},
created() {
this.findSourceFlightRules();
},
methods: {
//跳转到查看,修改页面
handleClick(flightiId, handle) {
this.openFlightDate = false;
this.$router.push({
name: "FlightAllocConfigInfo",
params: {
handle: handle,
id: flightiId
trigger: "blur",
},
});
],
},
/** 查询原航班顺位规则*/
findSourceFlightRules() {
this.loading = true;
if (this.queryParams.pageNum > 1) {
this.queryParams.start = (this.queryParams.pageNum - 1) * this.queryParams.limit
};
},
created() {
this.findSourceFlightRules();
},
methods: {
//跳转到查看,修改页面
handleClick(flightiId, handle) {
this.openFlightDate = false;
this.$router.push({
name: "FlightAllocConfigInfo",
params: {
handle: handle,
id: flightiId,
},
});
},
/** 查询原航班顺位规则*/
findSourceFlightRules() {
this.loading = true;
if (this.queryParams.pageNum > 1) {
this.queryParams.start =
(this.queryParams.pageNum - 1) * this.queryParams.limit;
} else {
this.queryParams.start = 0;
}
findSourceFlightRulesApi(this.queryParams).then((response) => {
if (response.code == 200) {
this.sourceFlightRulesList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
} else {
this.
queryParams.start = 0
;
this.
msgError(response.msg)
;
}
findSourceFlightRulesApi(this.queryParams).then(response => {
if (response.code == 200) {
this.sourceFlightRulesList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
} else {
this.msgError(response.msg);
}
});
},
/** 新增按钮操作 */
handleAdd() {
this.form = {};
this.open = true;
this.title = "添加ACCS原航班顺位规则";
this.form.id = -1;
this.dayOfWeek = [];
},
/** 修改按钮操作 */
handleUpdate(row) {
this.form = {};
this.dayOfWeek = [];
this.open = true;
this.title = "修改ACCS原航班顺位规则";
this.form = JSON.parse(JSON.stringify(row));
this.dayOfWeek = this.form.dayOfWeek
? this.form.dayOfWeek.split(";")
: [];
//this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
},
/** 删除 启用 停用按钮操作 */
handleDeleteorPlayorpause(row, status, statusText) {
//删除前需要停用
if (status === 0 && row.status != "3") {
this.$message({
message: "请停用后删除",
type: "warning",
});
},
/** 新增按钮操作 */
handleAdd() {
this.form = {};
this.open = true;
this.title = "添加ACCS原航班顺位规则";
this.form.id = -1;
this.dayOfWeek = [];
},
/** 修改按钮操作 */
handleUpdate(row) {
this.form = {};
this.dayOfWeek = [];
this.open = true;
this.title = "修改ACCS原航班顺位规则";
this.form = JSON.parse(JSON.stringify(row));
this.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
//this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
},
/** 删除 启用 停用按钮操作 */
handleDeleteorPlayorpause(row, status, statusText) {
//删除前需要停用
if (status === 0 && row.status != '3') {
this.$message({
message: '请停用后删除',
type: 'warning'
});
return;
}
this.$confirm('是否确认' + statusText + '此数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
let disable = {
id: row.id,
status: status
};
return delOrEnableORDisableApi(disable);
}).then(response => {
if (response.code == 200) {
this.findSourceFlightRules();
this.msgSuccess(statusText + "成功");
} else {
this.msgError(response.msg);
}
}).catch(function() {});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.dayOfWeek = this.dayOfWeek.sort();
let formdata = JSON.parse(JSON.stringify(this.form));
formdata.sourceFlightNo=formdata.sourceFlightNo.trim().toUpperCase();
formdata.flightRank=formdata.flightRank.trim().toUpperCase();
if (formdata.startDate === undefined || formdata.startDate == null) {
formdata.startDate = "";
}
if (formdata.endDate === undefined || formdata.endDate == null) {
formdata.endDate = "";
return;
}
this.$confirm("是否确认" + statusText + "此数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let disable = {
id: row.id,
status: status,
};
delOrEnableORDisableApi(disable)
.then((response) => {
if (response.code == 200) {
this.findSourceFlightRules();
this.msgSuccess(statusText + "成功");
} else {
this.msgError(response.msg);
}
//处理数据
sourceFlightRulesSaveApi(formdata).then(response => {
if (response.code === 200) {
this.msgSuccess("保存成功");
this.open = false;
this.findSourceFlightRules();
} else {
this.msgError(response.msg);
}
});
})
.catch(() => {});
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.dayOfWeek = this.dayOfWeek.sort();
let formdata = JSON.parse(JSON.stringify(this.form));
formdata.sourceFlightNo = formdata.sourceFlightNo
.trim()
.toUpperCase();
formdata.flightRank = formdata.flightRank.trim().toUpperCase();
if (formdata.startDate === undefined || formdata.startDate == null) {
formdata.startDate = "";
}
});
},
// 表单重置
reset() {
this.form = {
dayOfWeek: []
};
this.resetForm("form");
},
/** 查询目的航班*/
findSourceFlightAndFlightDate() {
//校验原航班号非空
if (this.queryParams.sourceFlightNo === null || this.queryParams.sourceFlightNo === undefined || this
.queryParams.sourceFlightNo.trim() === '') {
this.$message.warning("ACCS原航班号为空");
return
}
//校验原日期非空
if (this.queryParams.flightDate === null || this.queryParams.flightDate === undefined) {
this.$message.warning("日期为空");
return
}
this.openFlightDate = true;
this.loadingFlightDate = true;
this.sourceFlightAndFlightDate = [];
findSourceFlightAndFlightDateApi(this.queryParams).then(response => {
if (response.code === 200) {
this.sourceFlightAndFlightDate = response.data;
this.loadingFlightDate = false;
} else {
this.msgError(response.msg);
if (formdata.endDate === undefined || formdata.endDate == null) {
formdata.endDate = "";
}
});
},
// 目的航班弹出框返回
cancelFlightDate() {
this.openFlightDate = false;
},
// 取消按钮
cancel() {
this.open = false;
//this.reset();
},
// 状态字典翻译
statusFormat(row) {
if (row.status === '1') {
return '有效'
} else if (row.status === '0') {
return '执行中'
} else if (row.status === '3') {
return '停用'
//处理数据
sourceFlightRulesSaveApi(formdata).then((response) => {
if (response.code === 200) {
this.msgSuccess("保存成功");
this.open = false;
this.findSourceFlightRules();
} else {
this.msgError(response.msg);
}
});
}
return row.status;
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.sourceFlightNo = undefined
this.resetForm("queryForm");
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.start = 0;
this.findSourceFlightRules();
},
});
},
computed: {
upCase: {
get: function() {
return this.queryParams.sourceFlightNo;
},
set: function(val) {
this.queryParams.sourceFlightNo = val.toUpperCase();
},
// 表单重置
reset() {
this.form = {
dayOfWeek: [],
};
this.resetForm("form");
},
/** 查询目的航班*/
findSourceFlightAndFlightDate() {
//校验原航班号非空
if (
this.queryParams.sourceFlightNo === null ||
this.queryParams.sourceFlightNo === undefined ||
this.queryParams.sourceFlightNo.trim() === ""
) {
this.$message.warning("ACCS原航班号为空");
return;
}
//校验原日期非空
if (
this.queryParams.flightDate === null ||
this.queryParams.flightDate === undefined
) {
this.$message.warning("日期为空");
return;
}
this.openFlightDate = true;
this.loadingFlightDate = true;
this.sourceFlightAndFlightDate = [];
findSourceFlightAndFlightDateApi(this.queryParams).then((response) => {
if (response.code === 200) {
this.sourceFlightAndFlightDate = response.data;
this.loadingFlightDate = false;
} else {
this.msgError(response.msg);
}
});
},
// 目的航班弹出框返回
cancelFlightDate() {
this.openFlightDate = false;
},
// 取消按钮
cancel() {
this.open = false;
//this.reset();
},
// 状态字典翻译
statusFormat(row) {
if (row.status === "1") {
return "有效";
} else if (row.status === "0") {
return "执行中";
} else if (row.status === "3") {
return "停用";
}
return row.status;
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.sourceFlightNo = undefined;
this.resetForm("queryForm");
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParams.start = 0;
this.findSourceFlightRules();
},
},
computed: {
upCase: {
get: function () {
return this.queryParams.sourceFlightNo;
},
set: function (val) {
this.queryParams.sourceFlightNo = val.toUpperCase();
},
},
};
},
};
</script>
<style>
</style>
...
...
src/views/basicInformation/caExportPreQualification/index.vue
View file @
53a0e3f
<template>
<div class="app-container">
<el-form class="form-header" :model="queryParams" label-position="right" label-width="auto" size="medium">
<el-form
class="form-header"
:model="queryParams"
label-position="right"
label-width="auto"
size="medium"
>
<el-row>
<el-col :span="6">
<el-form-item label="航班日期从" prop="fltDateStart">
...
...
@@ -87,27 +93,26 @@
</el-switch>
</el-col>
</el-row>
<div style="margin-top:25px">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
type="warning"
:disabled="tableData.length == 0"
@click="xlse()"
:loading="downLoadingTip.downloading"
icon="el-icon-download"
size="mini"
>{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出"
}}</el-button
>
<div style="margin-top:
25px">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
type="warning"
:disabled="tableData.length == 0"
@click="xlse()"
:loading="downLoadingTip.downloading"
icon="el-icon-download"
size="mini"
>{{
downLoadingTip.downloading ? downLoadingTip.tip : "导出"
}}</el-button
>
</div>
</el-form>
<el-table
...
...
src/views/basicInformation/caPreReviewImport/index.vue
View file @
53a0e3f
...
...
@@ -13,7 +13,7 @@
</el-form-item>
</el-form>
<div style="font-size: 12px; font-weight: 700">
提示:<span style="color: #
000
0ff">以下为所提交的数据或出错信息</span>
提示:<span style="color: #
189
0ff">以下为所提交的数据或出错信息</span>
</div>
<el-table ref="filterTable" :data="tableData" v-loading="loading" style="width: 100%; margin-top: 20px" size="small" border>
<el-table-column label="行号" prop="line" fixed width="50" align="center">
...
...
@@ -81,7 +81,6 @@
uploadExcel(option) {
//上传excel
const file = option.file;
console.log(option);
this.loading=true;
importcaPreReview(file, this.form.type).then((res) => {
this.loading=false;
...
...
src/views/basicInformation/flightInformationImport/index.vue
View file @
53a0e3f
...
...
@@ -34,7 +34,7 @@
</el-form-item>
</el-form>
<div style="font-size: 12px; font-weight: 700">
提示:<span style="color: #
000
0ff">以下为所提交的数据或出错信息</span>
提示:<span style="color: #
189
0ff">以下为所提交的数据或出错信息</span>
</div>
<el-table
ref="filterTable"
...
...
@@ -64,8 +64,7 @@
</el-table>
</div>
</template>
</div>
</template>
<script>
import {
filghtKindData,
...
...
@@ -73,7 +72,7 @@ import {
importFlight,
} from "@/api/flightInfoImport";
export default {
name:"FlightInformationImport",
name:
"FlightInformationImport",
data() {
return {
flightType: [],
...
...
@@ -126,15 +125,14 @@ export default {
uploadExcel(option) {
//上传excel
const file = option.file;
console.log(option);
importFlight(file, this.form.type).then((res) => {
if (res.code != 200) {
if (res.code == 603) {
this.$alert(res.msg
, "提示", {
this.$alert(res.msg, "提示", {
confirmButtonText: "确定",
type: "warning",
});
}else {
}
else {
this.$message.error(res.msg);
this.tableData = res.data;
}
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
53a0e3f
<template>
<div>
<el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" size="medium">
<el-form
class="form-header"
:model="queryParams"
ref="queryForm"
label-position="right"
label-width="auto"
size="medium"
>
<el-row>
<el-col :span="6">
<el-form-item label="航班日期从" prop="fltDateStart">
<el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateStart" type="date" placeholder="选择日期">
<el-date-picker
class="formItem"
value-format="yyyy-MM-dd"
v-model="queryParams.fltDateStart"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="到" prop="fltDateEnd">
<el-date-picker class="formItem" value-format="yyyy-MM-dd" v-model="queryParams.fltDateEnd" type="date" placeholder="选择日期">
<el-date-picker
class="formItem"
value-format="yyyy-MM-dd"
v-model="queryParams.fltDateEnd"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班号" prop="fltNo">
<el-input class="formItem" v-model="queryParams.fltNo" placeholder="请输入航班号" clearable />
<el-input
class="formItem"
v-model="queryParams.fltNo"
placeholder="请输入航班号"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班类型" prop="typeId">
<el-select class="formItem" v-model="queryParams.typeId" placeholder="请选择航班类型" clearable>
<el-option v-for="dict in flightTypelist" :key="dict.id" :label="dict.chineseName" :value="dict.id" />
<el-select
class="formItem"
v-model="queryParams.typeId"
placeholder="请选择航班类型"
clearable
>
<el-option
v-for="dict in flightTypelist"
:key="dict.id"
:label="dict.chineseName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班状态" prop="statusId">
<el-select class="formItem" v-model="queryParams.statusId" placeholder="请选择航班状态" clearable>
<el-option v-for="dict in flightStatuslist" :key="dict.id" :label="dict.chineseName" :value="dict.id" />
<el-select
class="formItem"
v-model="queryParams.statusId"
placeholder="请选择航班状态"
clearable
>
<el-option
v-for="dict in flightStatuslist"
:key="dict.id"
:label="dict.chineseName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="航班种类" prop="flightKindId">
<el-select class="formItem" v-model="queryParams.flightKindId" placeholder="请选择航班种类" clearable>
<el-option v-for="dict in flightKindlist" :key="dict.id" :label="dict.chineseName" :value="dict.id" />
<el-select
class="formItem"
v-model="queryParams.flightKindId"
placeholder="请选择航班种类"
clearable
>
<el-option
v-for="dict in flightKindlist"
:key="dict.id"
:label="dict.chineseName"
:value="dict.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<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="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除
</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-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="danger"
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除
</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">
...
...
@@ -70,94 +154,253 @@
</el-button>
</el-col>
</el-row> -->
<el-table max-height="500" highlight-current-row border stripe v-loading="loading" :data="findAllFltDatList"
@selection-change="handleSelectionChange">
<el-table
max-height="500"
highlight-current-row
border
stripe
v-loading="loading"
:data="findAllFltDatList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="航班日期" align="center" prop="fltDate" width="120" />
<el-table-column label="航班起飞时间" align="center" prop="takeOffTime" width="120" />
<el-table-column
label="航班日期"
align="center"
prop="fltDate"
width="120"
/>
<el-table-column
label="航班起飞时间"
align="center"
prop="takeOffTime"
width="120"
/>
<el-table-column label="航班号" align="center" prop="fltNo" />
<el-table-column label="航班路线" align="center" prop="route" />
<el-table-column label="航班类型" align="center" prop="typeName" width="100" />
<el-table-column label="航班种类" align="center" prop="flightKindName" width="130" />
<el-table-column
label="航班类型"
align="center"
prop="typeName"
width="100"
/>
<el-table-column
label="航班种类"
align="center"
prop="flightKindName"
width="130"
/>
<el-table-column label="航班状态" align="center" prop="statusName" />
<el-table-column label="总重量" align="center" prop="totalWeight" width="130" />
<el-table-column label="原始重量(KG)" align="center" prop="originalWeight" width="130" />
<el-table-column label="总体积(cm³)" align="center" prop="totalVolume" width="130" />
<el-table-column label="是否限制一票一件" align="center" prop="ticketToPiece" width="150"
:formatter="ticketToPieceFormat" />
<el-table-column label="是否需要预审" align="center" prop="needRequired" width="150" :formatter="needRequiredFormat" />
<el-table-column label="额外增重百分比" align="center" prop="extraWeightPercent" width="150" />
<el-table-column label="高价百分比" align="center" prop="highPriceWeightPercent" width="150" />
<el-table-column label="低价百分比" align="center" prop="lowPriceWeightPercent" width="150" />
<el-table-column label="是否开启高地价" align="center" prop="highLowPriceFlg" width="150"
:formatter="highLowPriceFlgFormat" />
<el-table-column label="已配重量" align="center" prop="alloctedWeight" width="150" />
<el-table-column label="已配体积(cm³)" align="center" prop="alloctedVolume" width="150" />
<el-table-column label="航班优先级" align="center" prop="priorityName" width="150" />
<el-table-column label="配舱优先级" align="center" prop="priorityRuleName" width="150" />
<el-table-column label="创建人" align="center" prop="createUserName" width="120" />
<el-table-column label="创建时间" align="center" prop="createTime" width="155" />
<el-table-column
label="总重量"
align="center"
prop="totalWeight"
width="130"
/>
<el-table-column
label="原始重量(KG)"
align="center"
prop="originalWeight"
width="130"
/>
<el-table-column
label="总体积(cm³)"
align="center"
prop="totalVolume"
width="130"
/>
<el-table-column
label="是否限制一票一件"
align="center"
prop="ticketToPiece"
width="150"
:formatter="ticketToPieceFormat"
/>
<el-table-column
label="是否需要预审"
align="center"
prop="needRequired"
width="150"
:formatter="needRequiredFormat"
/>
<el-table-column
label="额外增重百分比"
align="center"
prop="extraWeightPercent"
width="150"
/>
<el-table-column
label="高价百分比"
align="center"
prop="highPriceWeightPercent"
width="150"
/>
<el-table-column
label="低价百分比"
align="center"
prop="lowPriceWeightPercent"
width="150"
/>
<el-table-column
label="是否开启高地价"
align="center"
prop="highLowPriceFlg"
width="150"
:formatter="highLowPriceFlgFormat"
/>
<el-table-column
label="已配重量"
align="center"
prop="alloctedWeight"
width="150"
/>
<el-table-column
label="已配体积(cm³)"
align="center"
prop="alloctedVolume"
width="150"
/>
<el-table-column
label="航班优先级"
align="center"
prop="priorityName"
width="150"
/>
<el-table-column
label="配舱优先级"
align="center"
prop="priorityRuleName"
width="150"
/>
<el-table-column
label="创建人"
align="center"
prop="createUserName"
width="120"
/>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="155"
/>
<!-- <el-table-column label="创建时间" align="center" prop="createTime" width="155">
<template slot-scope="scope">
<span>{{ renderTime(scope.row.createTime) }}</span>
</template>
</el-table-column> -->
<el-table-column label="最后修改人" align="center" prop="lastModifyUserName" width="155" />
<el-table-column
label="最后修改人"
align="center"
prop="lastModifyUserName"
width="155"
/>
<!-- <el-table-column label="最后修改时间" align="center" prop="lastModifyTime" width="155">
<template slot-scope="scope">
<span>{{ renderTime(scope.row.lastModifyTime) }}</span>
</template>
</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
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"
>
<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="handleDelete(scope.row,'删除')">
<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="handleDelete(scope.row,'删除')">
删除</el-button> -->
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" layout=" prev, pager, next, jumper, sizes,total"
:page.sync="queryParams.pageNum" :limit.sync="queryParams.limitSize" @pagination="findAllFltData" />
<pagination
v-show="total > 0"
:total="total"
layout=" prev, pager, next, jumper, sizes,total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.limitSize"
@pagination="findAllFltData"
/>
<!-- 添加或修改对话框 -->
<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-position="right" label-width="auto">
<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-position="right"
label-width="auto"
>
<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">  </el-col> -->
<el-col :span="12">
<el-form-item label="航班日期" prop="fltDate">
<el-date-picker :disabled="formdisabled.fltDate" clearable size="small" v-model="form.fltDate" type="date"
value-format="yyyy-MM-dd" placeholder="选择航班日期">
<el-date-picker
:disabled="formdisabled.fltDate"
clearable
size="small"
v-model="form.fltDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择航班日期"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班路线" prop="route">
<el-input style="width:93%" v-model="form.route" placeholder="请输入航班路线" />
<el-input
style="width: 93%"
v-model="form.route"
placeholder="请输入航班路线"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班种类" prop="kindId">
<el-select v-model="form.kindId" placeholder="请选择航班种类">
<el-option v-for="item in flightKindlist" :key="item.id" :label="item.chineseName" :value="item.id">
<el-option
v-for="item in flightKindlist"
:key="item.id"
:label="item.chineseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
...
...
@@ -165,36 +408,62 @@
<el-col :span="12">
<el-form-item label="航班类型" prop="typeId">
<el-select v-model="form.typeId" placeholder="请选择航班类型">
<el-option v-for="item in flightTypelist" :key="item.id" :label="item.chineseName" :value="item.id">
<el-option
v-for="item in flightTypelist"
:key="item.id"
:label="item.chineseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="航班状态" prop="statusId">
<el-select :disabled="true" v-model="form.statusId" placeholder="请选择航班状态">
<el-option v-for="item in flightStatuslist" :key="item.id" :label="item.chineseName" :value="item.id">
<el-select
:disabled="true"
v-model="form.statusId"
placeholder="请选择航班状态"
>
<el-option
v-for="item in flightStatuslist"
:key="item.id"
:label="item.chineseName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<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"></el-input-number>
<el-input-number
@change="LowHighAvailable"
placeholder="请输入原始重量(KG)"
style="width: 93%"
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"></el-input-number>
<el-input-number
@change="LowHighAvailable"
placeholder="请输入额外增重百分比"
style="width: 93%"
v-model="form.extraWeightPercent"
></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="是否开启高低价" prop="highLowPriceFlg">
<el-switch @change='LowHighAvailable' 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>
...
...
@@ -202,65 +471,95 @@
<!-- 是否需要预审,1:预审,0:取消预审 -->
<el-col :span="12">
<el-form-item label="是否预审" prop="isNeedRequired">
<el-switch :disabled="true" v-model="form.isNeedRequired" active-color="#13ce66">
<el-switch
:disabled="true"
v-model="form.isNeedRequired"
active-color="#13ce66"
>
</el-switch>
</el-form-item>
</el-col>
<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"></el-input-number>
<el-input-number
:disabled="ishighPriceWeightPercent"
@change="LowHighAvailable"
placeholder="请输入高价百分比"
style="width: 93%"
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"></el-input-number>
<el-input-number
:disabled="true"
placeholder="请输入低价百分比"
style="width: 93%"
v-model="form.lowPriceWeightPercent"
></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-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-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-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-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-number :disabled="true" placeholder="请输入已配总重量" style="width:93%" v-model="form.alloctedWeight"
:precision="2"></el-input-number>
<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" @click="submitForm">确 定</el-button>
...
...
@@ -268,501 +567,597 @@
</div>
</el-dialog>
<el-dialog title="未删除成功航班" width="40%" center :visible.sync="dialogTableVisible">
<el-dialog
title="未删除成功航班"
width="40%"
center
:visible.sync="dialogTableVisible"
>
<el-table :data="gridData">
<el-table-column property="fltNo" label="航班号" width="150"></el-table-column>
<el-table-column property="fltDate" label="航班日期" width="200"></el-table-column>
<el-table-column property="alloctedWeight" label="已配重量" width="200"></el-table-column>
<el-table-column
property="fltNo"
label="航班号"
width="150"
></el-table-column>
<el-table-column
property="fltDate"
label="航班日期"
width="200"
></el-table-column>
<el-table-column
property="alloctedWeight"
label="已配重量"
width="200"
></el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import {
delFlight,
findFltConditionDataApi,
findAllFltDataApi,
findFltById,
saveOrUpdate,
findFltCommonConf,
updateStatusBatch
} from "@/api/findAllFltData";
export default {
name: "FlightInformationMaintenance",
data() {
return {
gridData:[],
dialogTableVisible: false,
//高价百分比是否打开
ishighPriceWeightPercent:true,
//form属性禁用状态
formdisabled: {
//航班号
fltNo: false,
//航班日期
fltDate: false,
//航班路线
route: false,
//航班种类
kindId: false,
//航班类型
typeId: false,
//原始重量
originalWeight: false
},
import {
delFlight,
findFltConditionDataApi,
findAllFltDataApi,
findFltById,
saveOrUpdate,
findFltCommonConf,
updateStatusBatch,
} from "@/api/findAllFltData";
export default {
name: "FlightInformationMaintenance",
data() {
return {
gridData: [],
dialogTableVisible: false,
//高价百分比是否打开
ishighPriceWeightPercent: true,
//form属性禁用状态
formdisabled: {
//航班号
fltNo: false,
//航班日期
fltDate: false,
//航班路线
route: false,
//航班种类
flightKindlist: [],
//航班状态
flightStatuslist: [],
kindId: false,
//航班类型
flightTypelist: [],
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 遮罩层
loading: false,
// 遮罩层
loadingFlightDate: false,
// 弹出层标题
title: "",
// 总条数
total: 0,
// 原航班规则数据
findAllFltDatList: [],
//目的航班数据
sourceFlightAndFlightDate: [],
statusList: [{
'id': 1,
'name': '有效'
}, {
'id': 3,
'name': '停用'
}],
// 新增修改查看规则弹出层
open: false,
// 是否显示查看目的航班弹出层
openFlightDate: false,
// 查询参数
queryParams: {
limitStart: 0, //当前条数【代表第几条数据 +1开始】
pageNum: 1,
limitSize: 20, //一页显示多少条数据
fltDateStart: undefined, //航班日期开始
fltDateEnd: undefined, //航班日期结束
typeId: undefined, //航班类型
statusId: undefined, //航班状态
flightKindId: undefined, //航班种类
fltNo: undefined //航班号,要大写
},
// 表单参数
form: {
typeId: false,
//原始重量
originalWeight: false,
},
//航班种类
flightKindlist: [],
//航班状态
flightStatuslist: [],
//航班类型
flightTypelist: [],
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 遮罩层
loading: false,
// 遮罩层
loadingFlightDate: false,
// 弹出层标题
title: "",
// 总条数
total: 0,
// 原航班规则数据
findAllFltDatList: [],
//目的航班数据
sourceFlightAndFlightDate: [],
statusList: [
{
id: 1,
name: "有效",
},
{
id: 3,
name: "停用",
},
// 表单校验
rules: {
fltNo: [{
],
// 新增修改查看规则弹出层
open: false,
// 是否显示查看目的航班弹出层
openFlightDate: false,
// 查询参数
queryParams: {
limitStart: 0, //当前条数【代表第几条数据 +1开始】
pageNum: 1,
limitSize: 20, //一页显示多少条数据
fltDateStart: undefined, //航班日期开始
fltDateEnd: undefined, //航班日期结束
typeId: undefined, //航班类型
statusId: undefined, //航班状态
flightKindId: undefined, //航班种类
fltNo: undefined, //航班号,要大写
},
// 表单参数
form: {},
// 表单校验
rules: {
fltNo: [
{
required: true,
message: "ACCS原航班号不能为空",
trigger: "blur"
}],
fltDate: [{
trigger: "blur",
},
],
fltDate: [
{
required: true,
message: "航班日期不能为空",
trigger: "blur"
}],
kindId: [{
trigger: "blur",
},
],
kindId: [
{
required: true,
message: "航班种类不能为空",
trigger: "change"
}],
originalWeight: [{
trigger: "change",
},
],
originalWeight: [
{
required: true,
message: "原始重量(KG)不能为空",
trigger: "blur"
}],
}
};
},
created() {
//查询条件数据源
this.findFltConditionData();
this.findAllFltData();
},
methods: {
//输入航班号后
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!=null && response.data.extraWeightPercent != null && response.data.extraWeightPercent != undefined) {
this.$set(this.form, "extraWeightPercent", response.data.extraWeightPercent);
// this.form.extraWeightPercent=response.data.extraWeightPercent;
} else {
this.$set(this.form, "extraWeightPercent", 0);
//this.form.extraWeightPercent=response.data.extraWeightPercent=0;
}
//是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑
if (response.data!=null &&response.data.highLowPriceFlg != null && response.data.highLowPriceFlg != undefined) {
this.form.highLowPriceFlg = response.data.highLowPriceFlg === 1 ? true : false;
} else {
this.$set(this.form, "highLowPriceFlg", true);
//this.form.highLowPriceFlg = true;
}
//是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑;
if (response.data!=null &&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!=null &&response.data.highPriceWeightPercent != null && response.data.highPriceWeightPercent !=
undefined) {
this.form.highPriceWeightPercent = response.data.highPriceWeightPercent;
} else {
this.form.highPriceWeightPercent = 60;
}
if (response.data!=null &&response.data.lowPriceWeightPercent != null && response.data.lowPriceWeightPercent != undefined) {
this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent;
} else {
this.form.lowPriceWeightPercent = 40;
}
this.LowHighAvailable();
} else {
this.msgError(response.msg);
}
});
}
},
// 是否一票一件
ticketToPieceFormat(row) {
if (row.ticketToPiece === 1) {
return '是'
} else {
return '否'
}
return row.ticketToPiece;
trigger: "blur",
},
],
},
// 是否需要预审 1 预审 0 取消预审
needRequiredFormat(row) {
if (row.needRequired === 1) {
return '是'
} else {
return '否'
}
return row.ticketToPiece;
},
//是否开启高低价
highLowPriceFlgFormat(row) {
if (row.highLowPriceFlg === 1) {
return '开启'
} else {
return '未开启'
}
return row.ticketToPiece;
},
//时间格式化
renderTime(date) {
var dateee = new Date(date).toJSON();
return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
},
//查询条件数据源
findFltConditionData() {
findFltConditionDataApi().then(response => {
};
},
created() {
//查询条件数据源
this.findFltConditionData();
this.findAllFltData();
},
methods: {
//输入航班号后
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) {
//航班种类
this.flightKindlist = response.data.flightKind;
//航班类型
this.flightTypelist = response.data.flightType;
//航班状态
this.flightStatuslist = response.data.flightStatus;
//额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑
if (
response.data != null &&
response.data.extraWeightPercent != null &&
response.data.extraWeightPercent != undefined
) {
this.$set(
this.form,
"extraWeightPercent",
response.data.extraWeightPercent
);
// this.form.extraWeightPercent=response.data.extraWeightPercent;
} else {
this.$set(this.form, "extraWeightPercent", 0);
//this.form.extraWeightPercent=response.data.extraWeightPercent=0;
}
//是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑
if (
response.data != null &&
response.data.highLowPriceFlg != null &&
response.data.highLowPriceFlg != undefined
) {
this.form.highLowPriceFlg =
response.data.highLowPriceFlg === 1 ? true : false;
} else {
this.$set(this.form, "highLowPriceFlg", true);
//this.form.highLowPriceFlg = true;
}
//是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑;
if (
response.data != null &&
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 != null &&
response.data.highPriceWeightPercent != null &&
response.data.highPriceWeightPercent != undefined
) {
this.form.highPriceWeightPercent =
response.data.highPriceWeightPercent;
} else {
this.form.highPriceWeightPercent = 60;
}
if (
response.data != null &&
response.data.lowPriceWeightPercent != null &&
response.data.lowPriceWeightPercent != undefined
) {
this.form.lowPriceWeightPercent =
response.data.lowPriceWeightPercent;
} else {
this.form.lowPriceWeightPercent = 40;
}
this.LowHighAvailable();
} else {
this.msgError(response.msg);
}
});
},
}
},
// 是否一票一件
ticketToPieceFormat(row) {
if (row.ticketToPiece === 1) {
return "是";
} else {
return "否";
}
return row.ticketToPiece;
},
// 是否需要预审 1 预审 0 取消预审
needRequiredFormat(row) {
if (row.needRequired === 1) {
return "是";
} else {
return "否";
}
return row.ticketToPiece;
},
//是否开启高低价
highLowPriceFlgFormat(row) {
if (row.highLowPriceFlg === 1) {
return "开启";
} else {
return "未开启";
}
return row.ticketToPiece;
},
//时间格式化
renderTime(date) {
var dateee = new Date(date).toJSON();
return new Date(+new Date(dateee) + 8 * 3600 * 1000)
.toISOString()
.replace(/T/g, " ")
.replace(/\.[\d]{3}Z/, "");
},
//查询条件数据源
findFltConditionData() {
findFltConditionDataApi().then((response) => {
if (response.code == 200) {
//航班种类
this.flightKindlist = response.data.flightKind;
//航班类型
this.flightTypelist = response.data.flightType;
//航班状态
this.flightStatuslist = response.data.flightStatus;
} else {
this.msgError(response.msg);
}
});
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length != 1
this.multiple = !selection.length
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length != 1;
this.multiple = !selection.length;
},
/** 航班信息维护查询*/
findAllFltData() {
this.loading = true;
if (this.queryParams.pageNum > 1) {
this.queryParams.limitStart =
(this.queryParams.pageNum - 1) * this.queryParams.limitSize;
} else {
this.queryParams.limitStart = 0;
}
if (
this.queryParams.fltNo != null &&
this.queryParams.fltNo != undefined &&
this.queryParams.fltNo != ""
) {
this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase();
}
/** 航班信息维护查询*/
findAllFltData(
) {
this.loading = true
;
if (this.queryParams.pageNum > 1) {
this.
queryParams.limitStart = (this.queryParams.pageNum - 1) * this.queryParams.limitSize
findAllFltDataApi(this.queryParams).then((response) => {
if (response.code == 200
) {
this.findAllFltDatList = response.data.list
;
this.total = response.data.totalCount;
this.
loading = false;
} else {
this.
queryParams.limitStart = 0
;
this.
msgError(response.msg)
;
}
if (this.queryParams.fltNo != null && this.queryParams.fltNo != undefined && this.queryParams.fltNo != '') {
this.queryParams.fltNo = this.queryParams.fltNo.toUpperCase();
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加航班信息";
this.form.id = null;
this.form.statusId = this.flightStatuslist[0].id;
this.form.alloctedWeight = 0; //已配重量
this.form.lowAllocatedWeight = 0; //低价已配重量
this.form.highAllocatedWeight = 0; //高价已配重量
//航班号
this.formdisabled.fltNo = false;
//航班日期
this.formdisabled.fltDate = false;
//航班路线
this.formdisabled.route = false;
//航班种类
this.formdisabled.kindId = false;
//航班类型
this.formdisabled.typeId = false;
//原始重量
this.formdisabled.originalWeight = false;
},
//计算高地价可配
LowHighAvailable() {
//判断是否开启高地价
if (this.form.highLowPriceFlg) {
this.ishighPriceWeightPercent = false;
let Weight = 0;
//计算实际重量
if (
this.form.highPriceWeightPercent > 0 ||
this.form.lowPriceWeightPercent > 0
) {
Weight = this.Weightall();
}
findAllFltDataApi(this.queryParams).then(response => {
if (response.code == 200) {
this.findAllFltDatList = response.data.list;
this.total = response.data.totalCount;
this.loading = false;
//高价可配
if (this.form.highPriceWeightPercent > 0) {
this.$set(
this.form,
"lowPriceWeightPercent",
100 - this.form.highPriceWeightPercent
);
this.$set(
this.form,
"highAvailableWeight",
(Weight - this.form.alloctedWeight) *
(this.form.highPriceWeightPercent / 100)
);
// this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100)
} else if (
this.title == "修改航班信息" &&
this.form.highPriceWeightPercent > 0
) {
if (this.form.highAvailableWeight) {
this.$set(
this.form,
"highAvailableWeight",
this.form.highAvailableWeight
);
} else {
this.msgError(response.msg);
}
});
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加航班信息";
this.form.id = null;
this.form.statusId = this.flightStatuslist[0].id;
this.form.alloctedWeight = 0; //已配重量
this.form.lowAllocatedWeight = 0; //低价已配重量
this.form.highAllocatedWeight = 0; //高价已配重量
//航班号
this.formdisabled.fltNo = false;
//航班日期
this.formdisabled.fltDate = false;
//航班路线
this.formdisabled.route = false;
//航班种类
this.formdisabled.kindId = false;
//航班类型
this.formdisabled.typeId = false;
//原始重量
this.formdisabled.originalWeight = false;
},
//计算高地价可配
LowHighAvailable() {
//判断是否开启高地价
if (this.form.highLowPriceFlg) {
this.ishighPriceWeightPercent=false;
let Weight = 0;
//计算实际重量
if (this.form.highPriceWeightPercent > 0 || this.form.lowPriceWeightPercent > 0) {
Weight = this.Weightall();
this.$set(
this.form,
"highAvailableWeight",
(Weight - this.form.alloctedWeight) *
(this.form.highPriceWeightPercent / 100)
);
}
//高价可配
if (this.form.highPriceWeightPercent > 0) {
this.$set(this.form, "lowPriceWeightPercent", 100-this.form.highPriceWeightPercent);
this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form
.highPriceWeightPercent / 100));
// this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100)
}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 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.$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 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.ishighPriceWeightPercent=true;
} else {
this.$set(this.form, "lowAvailableWeight", 0);
// this.form.lowAvailableWeight = 0;
}
} else {
this.ishighPriceWeightPercent = true;
}
},
//计算实际重量
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;
},
},
//计算实际重量
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;
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.open = true;
this.title = "修改航班信息";
//航班号
this.formdisabled.fltNo = true;
//航班日期
this.formdisabled.fltDate = true;
//根据ID查item
findFltById(row).then((response) => {
if (response.code == 200) {
this.form = response.data;
//是否开启高地价
this.form.highLowPriceFlg =
this.form.highLowPriceFlg === 1 ? true : false;
//是否预审
this.form.isNeedRequired =
this.form.isNeedRequired === 1 ? true : false;
// 计算高地价可配
this.LowHighAvailable();
} else {
this.msgError(response.msg);
}
return Weight;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.open = true;
this.title = "修改航班信息";
//航班号
this.formdisabled.fltNo = true;
//航班日期
this.formdisabled.fltDate = true;
//根据ID查item
findFltById(row).then(response => {
if (response.code == 200) {
this.form = response.data;
//是否开启高地价
this.form.highLowPriceFlg = this.form.highLowPriceFlg === 1 ? true : false;
//是否预审
this.form.isNeedRequired = this.form.isNeedRequired === 1 ? true : false;
// 计算高地价可配
this.LowHighAvailable();
});
},
/** 删除按钮操作 */
handleDelete(row) {
const fIds = this.ids;
this.$confirm("是否确认删除所选数据?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
return delFlight(fIds);
})
.then((response) => {
this.findAllFltData();
if (response.data.length > 0) {
this.gridData = response.data;
this.$confirm(response.msg, "提示", {
confirmButtonText: "查看删除失败航班信息",
cancelButtonText: "取消",
type: "warning",
center: true,
})
.then(() => {
this.dialogTableVisible = true;
})
.catch(() => {});
} else {
this.msg
Error
(response.msg);
this.msg
Success
(response.msg);
}
})
.catch(() => {});
},
});
},
/** 删除按钮操作 */
handleDelete(row) {
const fIds =this.ids;
this.$confirm('是否确认删除所选数据?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delFlight(fIds);
}).then(response => {
this.findAllFltData();
if(response.data.length>0){
this.gridData=response.data;
this.$confirm(response.msg, '提示', {
confirmButtonText: '查看删除失败航班信息',
cancelButtonText: '取消',
type: 'warning',
center: true
}).then(() => {
this.dialogTableVisible=true;
}).catch(function() { });
}else{
this.msgSuccess(response.msg);
}
}).catch(function() {});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
let formdata = JSON.parse(JSON.stringify(this.form));
//高价百分比和低价百分比和不可以大于100
if (this.form.highLowPriceFlg && (formdata.highPriceWeightPercent>100||formdata.highPriceWeightPercent<0) ) {
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("已删除的航班无法修改");
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate((valid) => {
if (valid) {
let formdata = JSON.parse(JSON.stringify(this.form));
//高价百分比和低价百分比和不可以大于100
if (
this.form.highLowPriceFlg &&
(formdata.highPriceWeightPercent > 100 ||
formdata.highPriceWeightPercent < 0)
) {
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;
}
//是否开启高地价
formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0;
//是否预审
formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0;
//处理数据
saveOrUpdate(formdata).then(response => {
if (response.code === 200) {
this.msgSuccess("保存成功");
this.open = false;
this.findAllFltData();
} else {
this.msgError(response.msg);
}
});
});
if (statusId === formdata.statusId) {
this.$message.warning("已删除的航班无法修改");
return;
}
});
},
// 表单重置
reset() {
this.form = {};
this.resetForm("form");
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
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;
//是否开启高地价
formdata.highLowPriceFlg = formdata.highLowPriceFlg ? 1 : 0;
//是否预审
formdata.isNeedRequired = formdata.isNeedRequired ? 1 : 0;
//处理数据
saveOrUpdate(formdata).then((response) => {
if (response.code === 200) {
this.msgSuccess("保存成功");
this.open = false;
this.findAllFltData();
} else {
this.msgError(response.msg);
}
});
}
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);
}
});
}
});
},
// 表单重置
reset() {
this.form = {};
this.resetForm("form");
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
}
};
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
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);
}
});
},
},
};
</script>
<style>
.el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
.el-table__body tr.current-row>
td {
background-color: #a0cfff;
}
.el-table--striped .el-table__body tr.hover-row.el-table__row--striped>
td,
.el-table__body tr.hover-row>
td {
background-color: #d9ecff !important;
}
.el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
.el-table__body tr.current-row >
td {
background-color: #a0cfff;
}
.el-table--striped .el-table__body tr.hover-row.el-table__row--striped >
td,
.el-table__body tr.hover-row >
td {
background-color: #d9ecff !important;
}
</style>
...
...
src/views/systemConfig/roleConfig/index.vue
deleted
100644 → 0
View file @
4cfe11f
<template>
<div></div>
</template>
<script>
export default {
}
</script>
<style>
</style>
\ No newline at end of file
src/views/systemConfig/userConfig/index.vue
deleted
100644 → 0
View file @
4cfe11f
<template>
<div></div>
</template>
<script>
export default {
}
</script>
<style>
</style>
\ No newline at end of file
src/views/systemConfig/userConfig/profile/index.vue
deleted
100644 → 0
View file @
4cfe11f
<template>
<div></div>
</template>
<script>
export default {
}
</script>
<style>
</style>
\ No newline at end of file
vue.config.js
View file @
53a0e3f
...
...
@@ -37,6 +37,7 @@ module.exports = {
target
:
`https://imacuat.zmd.apac.fedex.com/iMAC`
,
// target: `http://47.103.140.98:7001/iMAC`,
// target: `http://192.168.1.134:18080`,
// target: `http://47.103.140.98:7001/IMAC2`, //生产
changeOrigin
:
true
,
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
Please
register
or
login
to post a comment