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
Elements-SY
2023-09-18 19:00:17 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
c9aa0613730c7f473696acea8f5a10a4c3b49a41
c9aa0613
2 parents
bc5a449b
2ea0b1bc
Merge branch 'et86' into fix-issues
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
68 additions
and
38 deletions
src/views/allocationConfig/flightAllocConfig/info.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/basicInformation/queryCargo/index.vue
src/views/index.vue
src/views/systemConfig/dictionaryConfig/dialog.vue
src/views/allocationConfig/flightAllocConfig/info.vue
View file @
c9aa061
...
...
@@ -307,7 +307,7 @@
<el-card v-else shadow="always" v-for="( val, idx ) in infoForm.list " :key="idx" style="min-height:350px">
<div>
<el-empty description="未设置规则!" v-if="!val.isLocation">
<el-button type="primary" size="small" @click="newRoute(idx,
routeList[idx]
.route)">新增规则
<el-button type="primary" size="small" @click="newRoute(idx,
infoForm
.route)">新增规则
</el-button>
</el-empty>
<el-row class="rowPadding" v-else>
...
...
@@ -708,6 +708,10 @@ export default {
this.msgWarning('未查询到航线信息!')
} else {
this.routeList = res.data.routeList
let routes = []
this.routeList.forEach(item => {
routes.push(item.route)
})
if (res.data.list.length > 0) {
//请求到数据
if (this.infoForm.route != null && this.infoForm.route != '' && this.infoForm.route != ' ') {
...
...
@@ -728,6 +732,11 @@ export default {
status: this.$route.params.status
}
findDestinationFltRuleByFlightNo(params).then(response => {
response.data.routeList.forEach(item => {
if (!routes.includes(item.route)) {
this.routeList.push(item)
}
})
let infoRouteList = []
response.data.list.forEach(item => {
//航线对应插入数据
...
...
@@ -815,6 +824,11 @@ export default {
flightRouteListStr: this.$route.params.route,
status: this.$route.params.status
}).then(resData => {
resData.data.routeList.forEach(item => {
if (!routes.includes(item.route)) {
this.routeList.push(item)
}
})
if (resData.data.list.length > 0) {
this.routeList.forEach((route, sub) => {
if (!infoRouteList.includes(route.route)) {
...
...
@@ -927,6 +941,11 @@ export default {
status: this.$route.params.status
}
findDestinationFltRuleByFlightNo(params).then(response => {
response.data.routeList.forEach(item => {
if (!routes.includes(item.route)) {
this.routeList.push(item)
}
})
if (response.data.list.length > 0) {
let infoRouteList = []
res.data.list.forEach(item => {
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
c9aa061
...
...
@@ -133,9 +133,11 @@
</el-row>
<el-row style="margin-bottom:5px">
<el-col :span="12">
<el-form-item
prop="route"
>
<el-form-item>
<template slot="label">
<div style="display:inline-block">航班路线
<div style="display:inline-block">
<span class="error-route">*</span>
航班路线
<el-tooltip class="item" effect="dark" content="输入航班号后获取航线信息。航班种类为Purple Tail时可以进行多选,切换航班种类后需重新选择航线"
placement="top-start">
<span class="el-icon-warning" style="color:#1890ff;font-size:16px"></span>
...
...
@@ -143,17 +145,18 @@
</div>
</template>
<el-select v-if="routeMultiple" ref="routeSelect" class="wid80" v-model="form.route"
:disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange"
:disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange"
@blur="blurRoute"
:loading="routeLoading" :multiple='true' :key="routeMultiple">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
</el-option>
</el-select>
<el-select v-if="routeMultiple == false" ref="routeSelect" class="wid80" v-model="form.route"
:disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange"
:disabled="formdisabled.route" placeholder="请选择航线" no-data-text="未查询到航线" @change="routeChange"
@blur="blurRoute"
:loading="routeLoading" :multiple='false' :key="routeMultiple">
<el-option v-for="item in routeList" :key="item.id" :label="item.route" :value="item.route">
</el-option>
</el-select>
<span ref="errorRoute" class="el-form-item__error" v-show="routeError">航班路线不能为空</span>
</el-form-item>
<div class="formTips" v-if="title == '修改航班信息'">注意!:移除航线,相对应日期级别航线维度会同时删除</div>
</el-col>
...
...
@@ -322,7 +325,7 @@ export default {
},
//表单参数
form: {
isNeedRequired: 2
isNeedRequired: 2
,
},
routeList: [],
//表单校验
...
...
@@ -352,20 +355,9 @@ export default {
{
required: true,
message: "原始重量(KG)不能为空",
trigger: "blur",
},
],
route: [
{
required: true,
message: "航班路线不能为空",
trigger: "change",
},
// {
// pattern: /^(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)(;{1,1}(([\~A-Z]{3,4})(\-[A-Z]{3,4})+)){0,}$/,
// message: "请输入正确得航班线路"
// }
]
],
},
//原航班规则数据
findAllFltDatList: [],
...
...
@@ -479,6 +471,7 @@ export default {
openFlightDate: false,
//shift键状态
shiftKey: false,
routeError: false, // 请选择航线错误显示
};
},
directives: {
...
...
@@ -643,7 +636,7 @@ export default {
this.routeMultiple = true
this.form.route = []
}
this.
validateFieldForm()
this.
routeError = true
}
})
// this.$refs.routeSelect.$forceUpdate()
...
...
@@ -726,6 +719,7 @@ export default {
this.formdisabled.typeId = false;
//原始重量
this.formdisabled.originalWeight = false;
this.routeError = false;
this.$nextTick(() => {
this.$refs.form.clearValidate()
})
...
...
@@ -942,8 +936,19 @@ export default {
},
/** 提交按钮 */
submitForm: function () {
this.validateFieldForm()
this.$refs["form"].validate((valid) => {
if(this.form.route == undefined){
this.routeError = true;
console.log(this.form.route)
}
if(this.form.route.length || this.form.route !== undefined){
this.routeError = false;
}
if(this.form.route.length == 0 || this.form.route == undefined){
this.routeError = true;
return
}
if (valid) {
let formdata = JSON.parse(JSON.stringify(this.form));
//高价百分比和低价百分比和不可以大于100
...
...
@@ -1131,25 +1136,22 @@ export default {
console.log(err)
})
},
// 对部分表单字段进行校验的方法
validateFieldForm(){
this.$refs.form.validateField(['route'], (flag) => {})
if(this.form.route.length){
this.$nextTick(()=>{
this.$refs.form.clearValidate()
})
}
},
//航线修改
routeChange(val) {
this.validateFieldForm()
if(val.length){
this.$nextTick(()=>{
this.$refs.form.clearValidate()
})
if(this.form.route.length){
this.routeError = false;
}else{
this.routeError = true;
}
this.$forceUpdate()
},
blurRoute(){
if(this.form.route.length){
this.routeError = false;
}else{
this.routeError = true;
}
},
//多选框选中数据
tableSelect(val) {
this.ids = val.selection;
...
...
@@ -1206,4 +1208,7 @@ export default {
color: #ff4949;
text-align: right;
}
.error-route{
color: #ff4949;
}
</style>
...
...
src/views/basicInformation/queryCargo/index.vue
View file @
c9aa061
...
...
@@ -181,7 +181,7 @@
v-hasPermi="['log:cargo:flightTransfer']">航班迁转</el-button>
<el-button type="primary" size="small" :disabled="cargoPlaneTime == null || cargoPlaneTime.length <= 0"
@click="historyFlie" v-hasPermi="['log:cargo:archiveData']">
<el-tooltip class="item" effect="dark" content="请先选择配
置
航班日期" placement="top">
<el-tooltip class="item" effect="dark" content="请先选择配
舱
航班日期" placement="top">
<span class="el-icon-warning-outline">生成归档数据</span>
</el-tooltip>
</el-button>
...
...
@@ -367,7 +367,10 @@ export default {
} else {
this.tableHeader = this.tableHeaders['cargo']
}
if(this.$route.params.hasOwnProperty('hander') == false){
this.select(0,'create')
}
// this.$nextTick(()=>{
// let height = window.innerHeight - this.$refs.cargoForm.$el.offsetHeight - 50;
// if(height < 300){
...
...
src/views/index.vue
View file @
c9aa061
...
...
@@ -43,7 +43,7 @@
</el-form>
<el-row class="card2">
<el-col :span="1" v-for="item in fltBox" :key="item.fltNo">
<div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate, route: '' })"
<div class="fltBox" @click="rowClick({ fltNo: item.fltNo, fltDate: item.fltDate
? item.fltDate : selectData.fltDate
, route: '' })"
:style="{ backgroundColor: (item.percentage * 100).toFixed(2) >= 90 ? '#13ce66' : (item.percentage * 100).toFixed(2) >= 75 ? '#ffba00' : '#ff4949' }">
<div class="fltName">{{ item.fltNo }}</div>
<div class="fltWeight">{{ (item.percentage == 0 ? 0 : ((item.percentage) * 100).toFixed(2)) + '%' }}
...
...
@@ -173,6 +173,7 @@ export default {
let obj = {}
obj.fltNo = val.fltNo
obj.fltDate = val.fltDate
obj.hander = 'handle'
if (val.flightKindName == 'Purple Tail') {
obj.route = ''
} else {
...
...
src/views/systemConfig/dictionaryConfig/dialog.vue
View file @
c9aa061
...
...
@@ -147,7 +147,7 @@ export default {
watch: {
open(val, oldVal) {
if (val) {
this.newDictionary = { flightNo: undefined, chineseName: undefined }
this.newDictionary = { flightNo: undefined, chineseName: undefined
, isEtesRoute: false
}
if (this.status == 'add') {
this.title = '新增'
} else if (this.status == 'allAdd') {
...
...
@@ -205,6 +205,7 @@ export default {
}
addRoute(obj).then(res => {
this.loading = false
this.newDictionary.isEtesRoute = false
if (res.code === 200) {
this.msgSuccess(res.msg)
this.close()
...
...
@@ -213,6 +214,7 @@ export default {
}
}).catch(err => {
this.loading = false
this.newDictionary.isEtesRoute = false
console.log(err)
})
} else {
...
...
@@ -325,7 +327,7 @@ export default {
},
//关闭
close() {
this.newDictionary = { chineseName: null, code: null, remark: null }
this.newDictionary = { chineseName: null, code: null, remark: null
, isEtesRoute: false
}
this.routeList = []
this.clearValidate('add')
this.$emit('close', false)
...
...
Please
register
or
login
to post a comment