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-13 09:47:55 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
457b8ec80ee58fe9979ff8a55b9db78d4d9883f1
457b8ec8
2 parents
c5513e3a
fb0dac6c
Merge branch 'et86-black' into test
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
210 additions
and
52 deletions
src/assets/styles/index.scss
src/utils/request.js
src/views/allocationConfig/cargoAllocation/index.vue
src/views/allocationConfig/flightAllocConfig/info.vue
src/views/allocationConfig/flightRandConfig/index.vue
src/views/allocationConfig/preReview/index.vue
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/et86Config/et86RuleConfig/edit/index.vue
src/assets/styles/index.scss
View file @
457b8ec
...
...
@@ -319,3 +319,28 @@ body {
.btn-mb-4
{
margin-bottom
:
4px
;
}
textarea
:
:-
webkit-input-placeholder
{
/* WebKit browsers */
color
:
#C0C4CC
!
important
;
font-size
:
13px
!
important
;
font-family
:
'Helvetica Neue'
,
Helvetica
,
'PingFang SC'
,
'Hiragino Sans GB'
,
'Microsoft YaHei'
,
SimSun
,
sans-serif
;
}
textarea
:
-
moz-placeholder
{
/* Mozilla Firefox 4 to 18 */
color
:
#c0c4cc
!
important
;
font-size
:
13px
!
important
;
font-family
:
'Helvetica Neue'
,
Helvetica
,
'PingFang SC'
,
'Hiragino Sans GB'
,
'Microsoft YaHei'
,
SimSun
,
sans-serif
;
}
textarea
:
:-
moz-placeholder
{
/* Mozilla Firefox 19+ */
color
:
#c0c4cc
!
important
;
font-size
:
13px
!
important
;
font-family
:
'Helvetica Neue'
,
Helvetica
,
'PingFang SC'
,
'Hiragino Sans GB'
,
'Microsoft YaHei'
,
SimSun
,
sans-serif
;
}
textarea
:
:-
ms-input-placeholder
{
/* Internet Explorer 10+ */
color
:
#c0c4cc
!
important
;
font-size
:
13px
!
important
;
font-family
:
'Helvetica Neue'
,
Helvetica
,
'PingFang SC'
,
'Hiragino Sans GB'
,
'Microsoft YaHei'
,
SimSun
,
sans-serif
;
}
...
...
src/utils/request.js
View file @
457b8ec
...
...
@@ -79,14 +79,22 @@ service.interceptors.response.use(res => {
type
:
'error'
})
return
Promise
.
reject
(
new
Error
(
msg
))
}
else
if
(
code
!==
200
&&
code
!==
201
&&
code
!==
202
&&
code
!=
203
&&
code
!=
603
&&
code
!=
402
)
{
}
else
if
(
code
!==
200
&&
code
!==
201
&&
code
!==
202
&&
code
!=
203
&&
code
!=
300
&&
code
!=
402
&&
code
!=
603
)
{
Message
({
message
:
msg
,
type
:
'error'
})
return
Promise
.
reject
(
'error'
)
type
:
"error"
,
})
;
return
Promise
.
reject
(
"error"
);
}
else
{
return
res
.
data
return
res
.
data
;
}
},
error
=>
{
...
...
src/views/allocationConfig/cargoAllocation/index.vue
View file @
457b8ec
...
...
@@ -136,7 +136,7 @@
</el-col>
<el-col :span="6">
<el-form-item label="运单号">
<el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号
(回车分割)
" :maxlength="12000"
<el-input class="formItem" type="textarea" :rows="4" placeholder="请输入运单号
(回车分割)
" :maxlength="12000"
v-model="formData.waybillNo" clearable></el-input>
</el-form-item>
</el-col>
...
...
src/views/allocationConfig/flightAllocConfig/info.vue
View file @
457b8ec
...
...
@@ -71,7 +71,8 @@
<el-button type="primary" v-if="val.status === '3'" size="mini"
icon="el-icon-video-pause" @click="changeStatus(idx)">
启 用</el-button>
<el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" @click="del(idx)">
<el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete"
@click="del(idx)">
删 除</el-button>
<div v-if="(routeSatus.indexOf('flightInformationMaintenance') >= 0)"
style="display: inline-block;">
...
...
@@ -80,7 +81,7 @@
<div v-else-if="(routeSatus.indexOf('FlightAllocConfig') >= 0)"
style="display: inline-block;">
<span
v-if="infoForm.fltDate != null && infoForm.fltDate != '' && infoForm.flt
Date != ' '">日期级别规则</span><span
v-if="val.id && val.ruleDate != null && val.ruleDate != '' && val.rule
Date != ' '">日期级别规则</span><span
v-else>普通规则</span>
</div>
<el-divider></el-divider>
...
...
@@ -148,9 +149,7 @@
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.minNumOfPieces"
oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
@input="change($event)"
@blur="inputBlurMinPieces($event)"
>
@input="change($event)" @blur="inputBlurMinPieces($event)">
</el-input>
<span ref="minNumOfPieces" class="el-form-item__error"></span>
</el-col>
...
...
@@ -158,9 +157,7 @@
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
@input="change($event)"
@blur="inputBlurMaxPieces($event)"
>
@input="change($event)" @blur="inputBlurMaxPieces($event)">
</el-input>
</el-col>
</el-form-item>
...
...
@@ -170,9 +167,7 @@
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.minWeight"
oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
@input="change($event)"
@blur="inputBlurMinWeight($event)"
>
@input="change($event)" @blur="inputBlurMinWeight($event)">
</el-input>
<span ref="minWeight" class="el-form-item__error"></span>
</el-col>
...
...
@@ -180,9 +175,7 @@
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.maxWeight"
oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
@input="change($event)"
@blur="inputBlurMaxWeight($event)"
>
@input="change($event)" @blur="inputBlurMaxWeight($event)">
</el-input>
</el-col>
</el-form-item>
...
...
@@ -324,13 +317,15 @@
<el-button type="primary" v-if="val.status === '3'" size="mini" icon="el-icon-video-pause"
@click="changeStatus(idx)">
启 用</el-button>
<el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" style="margin-right:10px" @click="del(idx)">
<el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" style="margin-right:10px"
@click="del(idx)">
删 除</el-button>
<div v-if="routeSatus.indexOf('flightInformationMaintenance') >= 0" style="display: inline-block;">
<span v-if="val.id">日期级别规则</span><span v-else>普通规则</span>
</div>
<div v-else-if="(routeSatus.indexOf('FlightAllocConfig') >= 0)" style="display: inline-block;">
<span v-if="infoForm.fltDate != null && infoForm.fltDate != '' && infoForm.fltDate != ' '">日期级别规则</span><span
<span
v-if="infoForm.fltDate != null && infoForm.fltDate != '' && infoForm.fltDate != ' '">日期级别规则</span><span
v-else>普通规则</span>
</div>
<el-divider></el-divider>
...
...
@@ -396,9 +391,7 @@
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.minNumOfPieces"
oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
@input="change($event)"
@blur="inputBlurMinPieces($event)"
>
@input="change($event)" @blur="inputBlurMinPieces($event)">
</el-input>
<span ref="minNumOfPieces" class="el-form-item__error"></span>
</el-col>
...
...
@@ -406,9 +399,7 @@
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.maxNumOfPieces"
oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
@input="change($event)"
@blur="inputBlurMaxPieces($event)"
>
@input="change($event)" @blur="inputBlurMaxPieces($event)">
</el-input>
</el-col>
</el-form-item>
...
...
@@ -418,9 +409,7 @@
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.minWeight"
oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
@input="change($event)"
@blur="inputBlurMinWeight($event)"
>
@input="change($event)" @blur="inputBlurMinWeight($event)">
</el-input>
<span ref="minWeight" class="el-form-item__error"></span>
</el-col>
...
...
@@ -428,9 +417,7 @@
<el-col :span="10">
<el-input class="numberInput" v-model.trim="val.maxWeight"
oninput="value=value.replace(/[^\d\.\-]/g,'')" @change="change"
@input="change($event)"
@blur="inputBlurMaxWeight($event)"
>
@input="change($event)" @blur="inputBlurMaxWeight($event)">
</el-input>
</el-col>
</el-form-item>
...
...
@@ -739,7 +726,7 @@ export default {
flightRouteListStr: val.flightRouteListStr,
status: val.status ? val.status : ''
}
if
(this.$route.params.handle == "updated")
{
if
(this.$route.params.handle == "updated")
{
delete obj.flightRoute
}
// 修改时 & 详情时
...
...
@@ -761,7 +748,7 @@ export default {
})
} else {
//航班类型为Purple Tail则显示所有航线维度
this.routeList.forEach(
route
=> {
this.routeList.forEach(
(route, sub)
=> {
let routeStatus = 1
res.data.list.forEach(item => {
if (route.route === item.flightRoute) {
...
...
@@ -778,21 +765,118 @@ export default {
flightRoute: route.route,
routePriority: route.routePriority,
})
this.newRoute(sub)
}
})
}
} else {
//航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
//航班配舱编辑
if (this.routeSatus == 'FlightAllocConfig') {
let infoRouteList = []
res.data.list.forEach(dateItem => {
this.infoForm.list.push(
this.dataHandle(dateItem)
)
infoRouteList.push(dateItem.flightRoute)
})
//判断是否有日期,看是否需要查询无日期维度
if (obj.flightDate != null && obj.flightDate != '' && obj.flightDate != ' ') {
findDestinationFltRuleByFlightNo({
purposeOfFlightNo: this.infoForm.fltNo,
fltDate: '',
flightRoute: this.infoForm.route,
flightRouteListStr: this.$route.params.route,
status: this.$route.params.status
}).then(resData => {
if (resData.data.list.length > 0) {
this.routeList.forEach((route, sub) => {
if (!infoRouteList.includes(route.route)) {
let routeStatus = 1
resData.data.list.forEach(item => {
if (item.flightRoute == route.route) {
item.id = undefined
item.status = undefined
routeStatus = 2
this.infoForm.list.push(
this.dataHandle(item)
)
}
})
if (routeStatus == 1) {
// 否则插入占位基础数据
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
this.newRoute(sub)
}
}
})
}
else {
this.routeList.forEach((route) => {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
})
}
}).catch(err => {
this.isEmpty = true
console.log(err)
})
} else {
this.routeList.forEach((route, sub) => {
if (!infoRouteList.includes(route.route)) {
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
ruleDate: this.infoForm.fltDate,
flightRoute: route.route,
routePriority: route.routePriority,
})
}
})
}
} else {
//航班维护跳转编辑
let params = {
purposeOfFlightNo: this.infoForm.fltNo,
flightRoute: this.infoForm.route,
flightRouteListStr: this.$route.params.route,
status: this.$route.params.status
}
findDestinationFltRuleByFlightNo(params).then(response => {
// 航线为空,对应航班或航班+日期下的全部维度(需补全未创建维度)
this.routeList.forEach((route, sub) => {
let routeStatus = 1
res.data.list.forEach(item => {
if (route.route === item.flightRoute) {
//航线对应插入数据
routeStatus = 2
// item.id = undefined
// item.status = undefined
this.infoForm.list.push(this.dataHandle(item))
}
})
if (routeStatus == 1) {
//日期下无维度的,查询是否存在无日期维度,有则占位展示,无则使用新增占位
response.data.list.forEach(item => {
if (route.route === item.flightRoute) {
item.id = undefined
item.status = undefined
item.flightRoute = this.infoForm.route
this.routeList.forEach(route => {
if (route.route === this.infoForm.route) {
item.routePriority = route.routePriority
}
})
this.infoForm.list.push(this.dataHandle(item))
}
})
//否则插入占位基础数据
this.infoForm.list.push({
purposeOfFlightNo: this.infoForm.fltNo,
...
...
@@ -803,6 +887,8 @@ export default {
this.newRoute(sub)
}
})
})
}
}
}
else {
...
...
@@ -814,7 +900,7 @@ export default {
flightRouteListStr: this.$route.params.route,
status: this.$route.params.status
}
if(this.$route.params.handle == "updated")
{
if (this.$route.params.handle == "updated")
{
delete params.flightRoute
}
//航线不为空,获取该航线下无日期通用维度设置
...
...
@@ -950,11 +1036,15 @@ export default {
//航班类型Purple Tail展示全部航线维度
findDestinationFltRuleByFlightNo(query).then(result => {
const { code, data } = result;
if(code == 200){
this.routeList = data.routeList;
let routesStatus = 1
if(data.routeList.length){
if (code == 200) {
let newRoute = JSON.parse(JSON.stringify(this.routeList.concat(data.routeList)))
const resRoute = newRoute.filter((item, index, self) => {
return self.findIndex(t => JSON.stringify(t) === JSON.stringify(item)) === index;
});
this.routeList = Array.from(new Set(resRoute));
if (data.routeList.length) {
this.routeList.forEach(route => {
let routesStatus = 1
data.list.forEach(item => {
if (route.route === item.flightRoute) {
routesStatus = 2
...
...
@@ -973,6 +1063,7 @@ export default {
routePriority: route.routePriority,
})
}
})
}
}
...
...
src/views/allocationConfig/flightRandConfig/index.vue
View file @
457b8ec
...
...
@@ -437,6 +437,7 @@ export default {
cancel() {
this.open = false;
this.findSourceFlightRules();
this.$refs.form.clearValidate();
//this.reset();
},
/** 重置按钮操作 */
...
...
src/views/allocationConfig/preReview/index.vue
View file @
457b8ec
...
...
@@ -45,7 +45,7 @@
<el-form ref="addForm" :model="newPre" label-width="auto" label-position="left" size="small" :rules="rules"
@submit.native.prevent>
<el-form-item label="航班号" prop="addFlitNo">
<el-input type="textarea" v-model="
fl
tNo" :rows="7" maxlength="255" show-word-limit placeholder="请输入航班号,用;分隔">
<el-input type="textarea" v-model="
newPre.addFli
tNo" :rows="7" maxlength="255" show-word-limit placeholder="请输入航班号,用;分隔">
</el-input>
</el-form-item>
</el-form>
...
...
@@ -89,7 +89,7 @@ export default {
addFlitNo: '',
},//新增航班
rules: {
fl
tNo: [
addFli
tNo: [
{
required: true,
message: "航班号不能为空",
...
...
@@ -199,6 +199,7 @@ export default {
close() {
this.dialogVisible = false
this.newPre.addFlitNo = ''
this.$refs.addForm.clearValidate()
},
//翻页
currentChange(val) {
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
457b8ec
...
...
@@ -180,8 +180,8 @@
</el-col>
<el-col :span="12">
<el-form-item label="原始重量(KG)" prop="originalWeight">
<el-input-number class="wid80" @change="LowHighAvailable" :precision="0" placeholder="请输入原始重量(KG)"
v-model="form.originalWeight"></el-input-number>
<el-input-number class="wid80" @change="LowHighAvailable" :
min="0" :
precision="0" placeholder="请输入原始重量(KG)"
v-model="form.originalWeight"
v-input-filter
></el-input-number>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -359,7 +359,7 @@ export default {
route: [
{
required: true,
message: "航班路线不能为空",
message: "航班路线不能为空
呀
",
trigger: "change",
},
// {
...
...
@@ -482,6 +482,29 @@ export default {
shiftKey: false,
};
},
directives: {
// 处理加减天数
"input-filter": {
bind: function (el, binding, { context }) {
el.handler = function (event) {
if (event.data == "E" || event.data == "e") {
// 无理数时
event.target.value = "";
}
if (event.target.value) {
if (Number(event.target.value) < 0) {
event.target.value = "";
}
event.target.dispatchEvent(new Event("input"));
}
};
el.addEventListener("input", el.handler);
},
unbind: function (el) {
el.removeEventListener("input", el.handler);
},
},
},
created() {
//查询条件数据源
this.queryParams.fltDateStart = this.nowDate()
...
...
@@ -615,11 +638,15 @@ export default {
this.selectOption.flightKindlist.forEach(item => {
if (item.id == val) {
if (item.chineseName.indexOf('White') >= 0) {
this.form.route = ''
this.routeMultiple = false
// this.rules.route[0].type = 'string'
this.form.route = ''
// this.rules.route[0].required = true;
} else if (item.chineseName.indexOf('Purple') >= 0) {
this.form.route = []
this.routeMultiple = true
// this.rules.route[0].type = 'array'
this.form.route = []
// this.rules.route[0].required = true;
}
}
})
...
...
@@ -1109,6 +1136,11 @@ export default {
},
//航线修改
routeChange(val) {
if(val.length){
this.rules.route[0].required = false;
}else{
// this.rules.route[0].required = true;
}
this.$forceUpdate()
},
//多选框选中数据
...
...
src/views/et86Config/et86RuleConfig/edit/index.vue
View file @
457b8ec
...
...
@@ -501,7 +501,7 @@ export default {
directives: {
// 处理加减天数
"input-filter": {
bind: function (el, binding) {
bind: function (el, binding
, { context }
) {
el.handler = function (event) {
if (event.data == "E" || event.data == "e") {
// 无理数时
...
...
@@ -510,10 +510,10 @@ export default {
if (event.target.value) {
if (Number(event.target.value) < -7) {
event.target.value = "";
this
.msgError("加减天数最小不能低于7天");
context
.msgError("加减天数最小不能低于7天");
} else if (Number(event.target.value) > 7) {
event.target.value = "";
this
.msgError("加减天数最小不能大于7天");
context
.msgError("加减天数最小不能大于7天");
} else if (/[\.]/.test(Number(event.target.value))) {
// 浮点数时
event.target.value = "";
...
...
Please
register
or
login
to post a comment