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-08-25 18:42:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f6af92ce9a276acb8353851bc9465b6d45584499
f6af92ce
1 parent
a877bdb3
modify
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
446 additions
and
453 deletions
src/components/YlForm/index.vue
src/layout/index.vue
src/layout/mixin/ResizeHandler.js
src/router/index.js
src/store/modules/permission.js
src/views/allocationConfig/et86BlackStation/components/ModleView.vue → src/views/et86Config/et86HsCodeBlack/components/ModleView.vue
src/views/allocationConfig/et86BlackStation/formConfig.js → src/views/et86Config/et86HsCodeBlack/formConfig.js
src/views/allocationConfig/et86BlackStation/index.vue → src/views/et86Config/et86HsCodeBlack/index.vue
src/views/allocationConfig/et86BlackStation/tableConfig.js → src/views/et86Config/et86HsCodeBlack/tableConfig.js
src/views/allocationConfig/et86/edit/formConfig.js → src/views/et86Config/et86RuleConfig/edit/formConfig.js
src/views/allocationConfig/et86/edit/index.vue → src/views/et86Config/et86RuleConfig/edit/index.vue
src/views/allocationConfig/et86/edit/mixins/index.js → src/views/et86Config/et86RuleConfig/edit/mixins/index.js
src/views/allocationConfig/et86/edit/tableConfig.js → src/views/et86Config/et86RuleConfig/edit/tableConfig.js
src/views/allocationConfig/et86/formConfig.js → src/views/et86Config/et86RuleConfig/formConfig.js
src/views/allocationConfig/et86/index.vue → src/views/et86Config/et86RuleConfig/index.vue
src/views/allocationConfig/et86/tableConfig.js → src/views/et86Config/et86RuleConfig/tableConfig.js
src/components/YlForm/index.vue
View file @
f6af92c
...
...
@@ -7,223 +7,251 @@
<el-form
:model="tempQueryForm"
:inline="inline"
:label-position="position"
:label-width="formWidth"
:loading="loading"
ref="ruleForm"
:size="size"
>
<el-
form-item
v-for="item in tempFormConfig
"
:
label="item.label
"
:
key="item.prop
"
:
prop="item.prop
"
:
rules="item.rules
"
<el-
row
:gutter="rowGutter
"
:
type="rowType
"
:
justify="rowJustify
"
:
align="rowAlign
"
:
tag="rowTag
"
>
<!-- 输入框 -->
<el-input
v-if="item.type === 'Input'"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.width }"
:disabled="item.disable"
:placeholder="
item.placeholder ? item.placeholder : '请输入' + item.label
"
v-on:[item.trigger]="
(e) => {
inputEvent(e, item);
}
"
@keyup.enter.native="toEnterSearch"
clearable
>
</el-input>
<template v-if="view">
<span v-text="tempQueryForm[item.prop]"></span>
</template>
<!-- 数字输入框 -->
<el-input
v-if="item.type === 'inputNumber'"
type="number"
:min="item.min"
:max="item.max"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.width }"
:disabled="item.disable"
:placeholder="
item.placeholder ? item.placeholder : '请输入' + item.label
"
v-on:keyup.enter="value = value.replace(/^-?[0-9]\d*$/, '')"
clearable
<el-col
v-for="item in tempFormConfig"
:span="item.span"
:offset="item.offset"
:tag="item.tag"
:push="item.push"
:pull="item.pull"
:xs="item.xs"
:sm="item.sm"
:md="item.md"
:lg="item.lg"
:xl="item.xl"
:style="{ width: item.colWidth }"
:key="item.prop"
>
</el-input>
<!-- InputNumber 计数器 -->
<el-input-number
v-if="item.type === 'Number'"
v-model.trim="tempQueryForm[item.prop]"
:min="0"
:max="10"
:size="item.size"
:style="{ width: item.width }"
label="描述文字"
></el-input-number>
<template v-if="view">
<span v-text="tempQueryForm[item.prop]"></span>
</template>
<!-- 下拉选择 -->
<el-select
v-if="item.type === 'Select'"
:multiple="item.multiple"
:filterable="item.filterable"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.width }"
:disabled="item.disable"
:loading="searchLoading"
:placeholder="
item.placeholder ? item.placeholder : '请选择' + item.label
"
clearable
>
<el-option
v-for="op in item.options.data"
:label="op[item.options.label] || op.label"
:value="op[item.options.value] || op.value"
:key="op[item.options.value] || op.value"
<el-form-item
:label="item.label"
:prop="item.prop"
:rules="item.rules"
:label-width="item.labelWidth"
>
</el-option>
</el-select>
<!-- 远程搜索 -->
<template v-if="item.type === 'Search'">
<el-autocomplete
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.width }"
:debounce="1500"
:fetch-suggestions="querySearchAsync"
:placeholder="
item.placeholder ? item.placeholder : '请选择' + item.label
"
@focus="focusKey(item)"
@select="selectSearch"
clearable
></el-autocomplete>
</template>
<!-- 输入框 -->
<el-input
v-if="item.type === 'Input'"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.inputWidth }"
:disabled="item.disable"
:placeholder="
item.placeholder ? item.placeholder : '请输入' + item.label
"
v-on:[item.trigger]="
(e) => {
inputEvent(e, item);
}
"
@keyup.enter.native="toEnterSearch"
clearable
>
</el-input>
<template v-if="view">
<span v-text="tempQueryForm[item.prop]"></span>
</template>
<!-- 数字输入框 -->
<el-input
v-if="item.type === 'inputNumber'"
type="number"
:min="item.min"
:max="item.max"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.inputWidth }"
:disabled="item.disable"
:placeholder="
item.placeholder ? item.placeholder : '请输入' + item.label
"
v-on:keyup.enter="value = value.replace(/^-?[0-9]\d*$/, '')"
clearable
>
</el-input>
<!-- InputNumber 计数器 -->
<el-input-number
v-if="item.type === 'Number'"
v-model.trim="tempQueryForm[item.prop]"
:min="0"
:max="10"
:size="item.size"
:style="{ width: item.inputWidth }"
label="描述文字"
></el-input-number>
<!-- 日期 -->
<el-date-picker
v-if="item.type === 'Date'"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.width }"
:disabled="item.disable"
:placeholder="item.placeholder ? item.placeholder : '请选择日期'"
:value-format="item.format"
clearable
>
</el-date-picker>
<template v-if="view">
<span v-text="tempQueryForm[item.prop]"></span>
</template>
<!-- 时间 -->
<el-time-select
v-if="item.type === 'Time'"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.width }"
:disabled="item.disable"
:placeholder="item.placeholder ? item.placeholder : '请选择时间'"
clearable
>
</el-time-select>
<!-- 下拉选择 -->
<el-select
v-if="item.type === 'Select'"
:multiple="item.multiple"
:filterable="item.filterable"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.inputWidth }"
:disabled="item.disable"
:loading="searchLoading"
:placeholder="
item.placeholder ? item.placeholder : '请选择' + item.label
"
clearable
>
<el-option
v-for="op in item.options.data"
:label="op[item.options.label] || op.label"
:value="op[item.options.value] || op.value"
:key="op[item.options.value] || op.value"
>
</el-option>
</el-select>
<!-- 日期时间 -->
<el-date-picker
v-if="item.type === 'DateTime'"
type="datetime"
v-model.trim="tempQueryForm[item.prop]"
:disabled="item.disable"
:placeholder="item.placeholder ? item.placeholder : '请选择日期'"
clearable
>
</el-date-picker>
<!-- 远程搜索 -->
<template v-if="item.type === 'Search'">
<el-autocomplete
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.inputWidth }"
:debounce="1500"
:fetch-suggestions="querySearchAsync"
:placeholder="
item.placeholder ? item.placeholder : '请选择' + item.label
"
@focus="focusKey(item)"
@select="selectSearch"
clearable
></el-autocomplete>
</template>
<!-- 日期范围 -->
<el-date-picker
v-if="item.type === 'datetimerange'"
type="datetimerange"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.width }"
:disabled="item.disable"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
clearable
>
</el-date-picker>
<!-- 日期 -->
<el-date-picker
v-if="item.type === 'Date'"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.inputWidth }"
:disabled="item.disable"
:placeholder="item.placeholder ? item.placeholder : '请选择日期'"
:value-format="item.format"
clearable
>
</el-date-picker>
<!-- 单选框 普通的样式 Radio 的尺寸,仅在 border 为真时有效-->
<template v-if="item.type === 'radio'">
<el-radio
v-model.trim="tempQueryForm[item.prop]"
v-for="op in item.options.data"
:disabled="item.disable"
:border="tempQueryForm[item.border]"
:size="tempQueryForm[item.size]"
:label="op[item.options.label] || op.label"
:value="op[item.options.value] || op.value"
:key="op[item.options.value] || op.value"
></el-radio>
</template>
<!-- 时间 -->
<el-time-select
v-if="item.type === 'Time'"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.inputWidth }"
:disabled="item.disable"
:placeholder="item.placeholder ? item.placeholder : '请选择时间'"
clearable
>
</el-time-select>
<!-- 单选框 按钮样式 -->
<el-radio-group
v-if="item.type === 'radioButtom'"
v-model.trim="tempQueryForm[item.prop]"
:size="tempQueryForm[item.size]"
:disabled="item.disable"
>
<el-radio-button
v-for="op in item.options.data"
:label="op[item.options.label] || op.label"
:value="op[item.options.value] || op.value"
:key="op[item.options.value] || op.value"
></el-radio-button>
</el-radio-group>
<!-- 日期时间 -->
<el-date-picker
v-if="item.type === 'DateTime'"
type="datetime"
v-model.trim="tempQueryForm[item.prop]"
:disabled="item.disable"
:placeholder="item.placeholder ? item.placeholder : '请选择日期'"
clearable
>
</el-date-picker>
<!-- 文本框 -->
<el-input
v-if="item.type === 'textarea'"
v-model.trim="tempQueryForm[item.prop]"
type="textarea"
:style="{ width: item.width }"
:disabled="item.disable"
:rows="item.row"
:autosize="item.autosize"
:placeholder="
item.placeholder ? item.placeholder : '请输入' + item.label
"
clearable
>
</el-input>
<!-- 多选框 -->
<template v-if="item.type === 'Checkbox'">
<el-checkbox
v-model="tempQueryForm[item.prop]"
:disabled="item.disabled"
></el-checkbox>
</template>
</el-form-item>
<!-- 查询按钮 de-->
<span v-show="inline & hiddenFormBtn">
<el-form-item v-show="show">
<el-button
type="primary"
@click="handleSearch('ruleForm')"
:btnLoading="btnLoading"
>
{{ formBtn }}
</el-button>
</el-form-item>
</span>
<span v-show="inline & hiddenFormBtn">
<el-form-item v-show="show">
<el-button @click="resetFields('ruleForm')">重置</el-button>
</el-form-item>
</span>
<!-- 日期范围 -->
<el-date-picker
v-if="item.type === 'datetimerange'"
type="datetimerange"
v-model.trim="tempQueryForm[item.prop]"
:style="{ width: item.inputWidth }"
:disabled="item.disable"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
clearable
>
</el-date-picker>
<!-- 单选框 普通的样式 Radio 的尺寸,仅在 border 为真时有效-->
<template v-if="item.type === 'radio'">
<el-radio
v-model.trim="tempQueryForm[item.prop]"
v-for="op in item.options.data"
:disabled="item.disable"
:border="tempQueryForm[item.border]"
:size="tempQueryForm[item.size]"
:label="op[item.options.label] || op.label"
:value="op[item.options.value] || op.value"
:key="op[item.options.value] || op.value"
></el-radio>
</template>
<!-- 单选框 按钮样式 -->
<el-radio-group
v-if="item.type === 'radioButtom'"
v-model.trim="tempQueryForm[item.prop]"
:size="tempQueryForm[item.size]"
:disabled="item.disable"
>
<el-radio-button
v-for="op in item.options.data"
:label="op[item.options.label] || op.label"
:value="op[item.options.value] || op.value"
:key="op[item.options.value] || op.value"
></el-radio-button>
</el-radio-group>
<!-- 文本框 -->
<el-input
v-if="item.type === 'textarea'"
v-model.trim="tempQueryForm[item.prop]"
type="textarea"
:style="{ width: item.inputWidth }"
:disabled="item.disable"
:rows="item.row"
:autosize="item.autosize"
:placeholder="
item.placeholder ? item.placeholder : '请输入' + item.label
"
clearable
>
</el-input>
<!-- 多选框 -->
<template v-if="item.type === 'Checkbox'">
<el-checkbox
v-model="tempQueryForm[item.prop]"
:disabled="item.disabled"
></el-checkbox>
</template>
</el-form-item>
</el-col>
<!-- 查询按钮 de-->
<span v-show="inline & hiddenFormBtn">
<el-form-item v-show="show">
<el-button
type="primary"
@click="handleSearch('ruleForm')"
:btnLoading="btnLoading"
>
{{ formBtn }}
</el-button>
</el-form-item>
</span>
<span v-show="inline & hiddenFormBtn">
<el-form-item v-show="show">
<el-button @click="resetFields('ruleForm')">重置</el-button>
</el-form-item>
</span>
</el-row>
</el-form>
</div>
</template>
...
...
@@ -233,30 +261,25 @@ import request from "@/utils/request";
import { deepClone } from "@/utils";
export default {
props: {
marginBottom
: {
rowGutter
: {
type: Number,
default:
30
,
default:
24
,
},
view: {
type: Boolean,
default: false,
},
formBtn: {
rowType: {
type: String,
default: "
查询
",
default: "",
},
btnLoading
: {
type:
Boolean
,
default:
false
,
rowJustify
: {
type:
String
,
default:
""
,
},
loading: {
//加载
type: Boolean,
default: false,
rowAlign: {
type: String,
default: "",
},
isBtnSave
: {
type:
Boolean
,
default:
false
,
rowTag
: {
type:
String
,
default:
"div"
,
},
// 由inline属性决定form表单是普通表单,还是行内表单
inline: {
...
...
@@ -273,14 +296,14 @@ export default {
type: Boolean,
default: false,
},
labelWidth: {
type: String,
default: "120px",
},
formWidth: {
//form表单宽度
type: String,
default: "200px",
default: "auto",
},
position: {
type: String,
default: "",
},
formConfig: {
type: Array,
...
...
@@ -295,6 +318,31 @@ export default {
type: String,
default: "small",
},
marginBottom: {
type: Number,
default: 30,
},
view: {
type: Boolean,
default: false,
},
formBtn: {
type: String,
default: "查询",
},
btnLoading: {
type: Boolean,
default: false,
},
loading: {
//加载
type: Boolean,
default: false,
},
isBtnSave: {
type: Boolean,
default: false,
},
},
data() {
return {
...
...
@@ -311,7 +359,7 @@ export default {
methods: {
// input事件绑定和注册
inputEvent(e, item) {
this.$emit(
"input"
, this.tempQueryForm);
this.$emit(
item.trigger
, this.tempQueryForm);
},
// 回车事件
toEnterSearch() {
...
...
src/layout/index.vue
View file @
f6af92c
...
...
@@ -4,11 +4,11 @@
<sidebar class="sidebar-container"
:style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBg : variables.menuLightBg }" />
<div :class="{ hasTagsView: needTagsView }" class="main-container">
<div :class="{ 'fixed-header': fixedHeader }">
<div :class="{ 'fixed-header': fixedHeader }"
ref="headerBlock"
>
<navbar />
<tags-view v-if="needTagsView" />
</div>
<app-main />
<app-main
ref="appMainBlock"
/>
<right-panel v-if="false">
<settings />
</right-panel>
...
...
src/layout/mixin/ResizeHandler.js
View file @
f6af92c
...
...
@@ -6,40 +6,45 @@ const WIDTH = 992 // refer to Bootstrap's responsive design
export
default
{
watch
:
{
$route
(
route
)
{
if
(
this
.
device
===
'mobile'
&&
this
.
sidebar
.
opened
)
{
store
.
dispatch
(
'app/closeSideBar'
,
{
withoutAnimation
:
false
})
if
(
this
.
device
===
"mobile"
&&
this
.
sidebar
.
opened
)
{
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
false
});
}
}
}
,
},
beforeMount
()
{
window
.
addEventListener
(
'resize'
,
this
.
$_resizeHandler
)
window
.
addEventListener
(
"resize"
,
this
.
$_resizeHandler
);
},
beforeDestroy
()
{
window
.
removeEventListener
(
'resize'
,
this
.
$_resizeHandler
)
window
.
removeEventListener
(
"resize"
,
this
.
$_resizeHandler
);
},
mounted
()
{
const
isMobile
=
this
.
$_isMobile
()
const
isMobile
=
this
.
$_isMobile
()
;
if
(
isMobile
)
{
store
.
dispatch
(
'app/toggleDevice'
,
'mobile'
)
store
.
dispatch
(
'app/closeSideBar'
,
{
withoutAnimation
:
true
})
store
.
dispatch
(
"app/toggleDevice"
,
"mobile"
);
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
true
});
}
this
.
getBlockCurrentHeight
();
},
methods
:
{
// use $_ for mixins properties
// https://vuejs.org/v2/style-guide/index.html#Private-property-names-essential
$_isMobile
()
{
const
rect
=
body
.
getBoundingClientRect
()
return
rect
.
width
-
1
<
WIDTH
const
rect
=
body
.
getBoundingClientRect
()
;
return
rect
.
width
-
1
<
WIDTH
;
},
$_resizeHandler
()
{
if
(
!
document
.
hidden
)
{
const
isMobile
=
this
.
$_isMobile
()
store
.
dispatch
(
'app/toggleDevice'
,
isMobile
?
'mobile'
:
'desktop'
)
const
isMobile
=
this
.
$_isMobile
()
;
store
.
dispatch
(
"app/toggleDevice"
,
isMobile
?
"mobile"
:
"desktop"
);
if
(
isMobile
)
{
store
.
dispatch
(
'app/closeSideBar'
,
{
withoutAnimation
:
true
})
store
.
dispatch
(
"app/closeSideBar"
,
{
withoutAnimation
:
true
});
}
}
},
getBlockCurrentHeight
(){;
// console.log(this.$refs.headerBlock, this.$refs.headerBlock.clientHeight);
// console.log(this.$refs.appMainBlock);
}
}
}
}
,
}
;
...
...
src/router/index.js
View file @
f6af92c
...
...
@@ -72,20 +72,19 @@ export const constantRoutes = [
component
:
Layout
,
hidden
:
true
,
children
:
[
{
path
:
"/et86"
,
component
:
(
resolve
)
=>
require
([
"@/views/allocationConfig/et86"
],
resolve
),
name
:
"et86"
,
meta
:
{
title
:
"ET86"
,
icon
:
"user"
},
children
:
[],
},
// {
// path: "/et86",
// component: (resolve) => require(["@/views/et86Config/et86RuleConfig"], resolve),
// name: "et86",
// meta: { title: "ET86", icon: "user" },
// children: [],
// },
{
path
:
"/edit"
,
component
:
(
resolve
)
=>
require
([
"@/views/
allocationConfig/et86
/edit"
],
resolve
),
require
([
"@/views/
et86Config/et86RuleConfig
/edit"
],
resolve
),
name
:
"edit"
,
meta
:
{
title
:
"
编辑
"
,
icon
:
"user"
,
noCache
:
false
},
meta
:
{
title
:
"
ET86规则
"
,
icon
:
"user"
,
noCache
:
false
},
},
{
path
:
"/info/:handle/id=:id;routeStatus=:routeStatus;fltNo=:fltNo;route=:route;fltDate=:fltDate;status=:status"
,
...
...
src/store/modules/permission.js
View file @
f6af92c
...
...
@@ -47,44 +47,6 @@ const permission = {
return
new
Promise
((
resolve
)
=>
{
// 向后端请求路由数据
getRouters
().
then
((
res
)
=>
{
const
newUrl
=
[
{
id
:
24
,
name
:
"et86"
,
path
:
"/et86"
,
hidden
:
false
,
component
:
"allocationConfig/et86"
,
meta
:
{
title
:
"ET86"
,
icon
:
"edit"
,
permissions
:
"allocation:rand:list"
,
noCache
:
false
,
},
alwaysShow
:
false
,
children
:
null
,
},
{
id
:
25
,
name
:
"et86BlackStation"
,
path
:
"/et86BlackStation"
,
hidden
:
false
,
component
:
"allocationConfig/et86BlackStation"
,
meta
:
{
title
:
"黑名单维护"
,
icon
:
"processing"
,
permissions
:
"allocation:rand:list"
,
noCache
:
false
,
},
alwaysShow
:
false
,
children
:
null
,
},
];
res
.
data
.
map
((
item
)
=>
{
if
(
item
.
name
==
"AllocationConfig"
)
{
item
.
children
.
push
(
newUrl
[
0
]);
item
.
children
.
push
(
newUrl
[
1
]);
}
});
res
.
data
=
hasPermi
.
routerPer
(
res
.
data
);
const
sdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
));
const
rdata
=
JSON
.
parse
(
JSON
.
stringify
(
res
.
data
));
...
...
src/views/
allocationConfig/et86BlackStation
/components/ModleView.vue
→
src/views/
et86Config/et86HsCodeBlack
/components/ModleView.vue
View file @
f6af92c
File moved
src/views/
allocationConfig/et86BlackStation
/formConfig.js
→
src/views/
et86Config/et86HsCodeBlack
/formConfig.js
View file @
f6af92c
File moved
src/views/
allocationConfig/et86BlackStation
/index.vue
→
src/views/
et86Config/et86HsCodeBlack
/index.vue
View file @
f6af92c
File moved
src/views/
allocationConfig/et86BlackStation
/tableConfig.js
→
src/views/
et86Config/et86HsCodeBlack
/tableConfig.js
View file @
f6af92c
File moved
src/views/
allocationConfig/et86
/edit/formConfig.js
→
src/views/
et86Config/et86RuleConfig
/edit/formConfig.js
View file @
f6af92c
File moved
src/views/
allocationConfig/et86
/edit/index.vue
→
src/views/
et86Config/et86RuleConfig
/edit/index.vue
View file @
f6af92c
...
...
@@ -8,6 +8,11 @@
<!-- ET86配舱航班顺位 -->
<el-row :gutter="24" justify="center">
<el-col :span="18">
<el-row style="margin-bottom: 15px" v-if="getRouter">
<el-col>
<el-button type="primary" icon="el-icon-plus" size="mini" @click="addBtn">添加</el-button>
</el-col>
</el-row>
<yl-table
emptyText="请添加配舱航班"
:attrs="tableAttr"
...
...
@@ -16,7 +21,6 @@
:pageConfig="{
isPagination: false,
}"
@add="addBtn"
>
<template #column>
<el-table-column
...
...
@@ -35,9 +39,9 @@
<el-input
v-model="scope.row.flightNo"
clearable
:
readonly="scope.row.edit | isE
dit"
:
disabled="scope.row.e
dit"
@focus="inputFocus(scope)"
@
input="inputEvent
"
@
blur="blurSearch
"
placeholder="请输入航班号"
size="small"
/>
...
...
@@ -53,8 +57,7 @@
<el-input
type="number"
v-model="scope.row.calculateDay"
:readonly="scope.row.edit | isEdit"
:disabled="scope.row.edit | isEdit"
:disabled="scope.row.edit"
min="-7"
max="7"
v-input-filter
...
...
@@ -75,6 +78,7 @@
v-model="scope.row.flightRoute"
placeholder="请选择"
size="small"
:disabled="scope.row.edit"
>
<el-option
v-for="item in scope.row.routeList"
...
...
@@ -95,7 +99,7 @@
<template slot-scope="scope">
<el-checkbox
v-model="scope.row.permitOverweight"
:disabled="scope.row.edit
| isEdit
"
:disabled="scope.row.edit"
@change="changeCheck(scope)"
></el-checkbox>
</template>
...
...
@@ -140,6 +144,8 @@
show-word-limit
:rows="4"
placeholder="请输入原航班号"
@blur="blurEvent"
:disabled="!getRouter"
></el-input>
</el-form-item>
</el-col>
...
...
@@ -149,6 +155,7 @@
<el-radio-group
v-model="isServiceCode"
@change="changeIsServiceCode"
:disabled="!getRouter"
>
<el-radio label="1">包含ServiceCode</el-radio>
<el-radio label="2">不包含ServiceCode</el-radio>
...
...
@@ -164,6 +171,7 @@
:rows="4"
placeholder="请输入ServiceCode"
@blur="serviceCodeBlur"
:disabled="!getRouter"
></el-input>
</el-col>
</el-form-item>
...
...
@@ -180,6 +188,7 @@
show-word-limit
:rows="4"
placeholder="URSA之间用分号分隔,例:F2;F3;P_"
:disabled="!getRouter"
></el-input>
</el-form-item>
</el-col>
...
...
@@ -193,6 +202,7 @@
show-word-limit
:rows="4"
placeholder="URSA之间用分号分隔,例:F2;F3;P_"
:disabled="!getRouter"
></el-input>
</el-form-item>
</el-col>
...
...
@@ -206,6 +216,7 @@
@change="changeCheckboxCargoType"
style="display: flex"
v-if="cargoType.length"
:disabled="!getRouter"
>
<el-checkbox
v-for="item in cargoType"
...
...
@@ -224,7 +235,7 @@
<el-col :span="24">
<el-col :span="3">
<el-form-item label="单品名">
<el-checkbox v-model="queryForm.multiHs"></el-checkbox>
<el-checkbox v-model="queryForm.multiHs"
:disabled="!getRouter"
></el-checkbox>
</el-form-item>
</el-col>
<el-col :span="8">
...
...
@@ -236,6 +247,7 @@
clearable
placeholder="最小重量"
@blur="inputBlurMinWeight($event)"
:disabled="!getRouter"
></el-input>
<span ref="minWeight" class="el-form-item__error"></span>
</el-col>
...
...
@@ -246,6 +258,7 @@
clearable
placeholder="最大重量"
@blur="inputBlurMaxWeight($event)"
:disabled="!getRouter"
></el-input>
</el-col>
</el-form-item>
...
...
@@ -259,6 +272,7 @@
clearable
placeholder="最少件数"
@blur="inputBlurMinPieces($event)"
:disabled="!getRouter"
></el-input>
<span ref="minNumOfPieces" class="el-form-item__error"></span>
</el-col>
...
...
@@ -269,6 +283,7 @@
clearable
placeholder="最多件数"
@blur="inputBlurMaxPieces($event)"
:disabled="!getRouter"
></el-input>
</el-col>
</el-form-item>
...
...
@@ -288,6 +303,7 @@
clearable
placeholder="最小申报价值"
@blur="inputBlurMin($event, 'minCNYCustomVal')"
:disabled="!getRouter"
></el-input>
<span
ref="minCNYCustomVal"
...
...
@@ -301,6 +317,7 @@
clearable
placeholder="最大申报价值"
@blur="inputBlurMax($event, 'maxCNYCustomVal')"
:disabled="!getRouter"
></el-input>
</el-col>
</el-form-item>
...
...
@@ -313,6 +330,7 @@
clearable
placeholder="最小申报价值"
@blur="inputBlurMin($event, 'minSUDCustomVal')"
:disabled="!getRouter"
></el-input>
<span
ref="minSUDCustomVal"
...
...
@@ -326,6 +344,7 @@
clearable
placeholder="最大申报价值"
@blur="inputBlurMax($event, 'maxSUDCustomVal')"
:disabled="!getRouter"
></el-input>
</el-col>
</el-form-item>
...
...
@@ -348,7 +367,6 @@
import YlForm from "@/components/YlForm";
import YlTable from "@/components/YlTable";
import { formConfig } from "./formConfig";
import { debounce } from "@/utils";
import { inputBlurValidate } from "@/utils/mixins";
import { tableAttr } from "./tableConfig";
import {
...
...
@@ -375,19 +393,19 @@ export default {
// ET86配舱航班顺位维度
// 表单参数
id: "", // 维度ID
originOfFlightNo: "
A380
", // 原航班号
originOfFlightNo: "", // 原航班号
includeServiceType: "", // 服务种类包含
notIncludeServiceType: "", // 服务种类不包含
includeUrsa: "", // URSA包含
notIncludeUrsa: "", // URSA不包含
declarationCategory: "", // 已勾选申报类别的数据
multiHs: false, // 单品名
minWeight: "",
minWeight: "",
// 最小重量
maxWeight: "",
minNumOfPieces: "",
minNumOfPieces: "",
// 最小件数
maxNumOfPieces: "",
currencyCd: "",
minCustomVal: "",
currencyCd: "",
// 币种
minCustomVal: "",
// 最小申报值
maxCustomVal: "",
},
tableAttr: tableAttr, // table配置项
...
...
@@ -400,9 +418,9 @@ export default {
checkboxCargoType: [], // 已勾选申报类别的数据
checkboxClassType: [], // 申报类别
serviceCodeData: [], // 【服务种类】调用接口获取服务种类所有的serviceCode
minCNYCustomVal: "", //
minCNYCustomVal: "", //
人民币最小申报值
maxCNYCustomVal: "", //
minSUDCustomVal: "", //
minSUDCustomVal: "", //
美元最小申报值
maxSUDCustomVal: "", //
};
},
...
...
@@ -422,7 +440,7 @@ export default {
this.getAllDictData(); // 获取全部字典
if (this.$route.query.name == "view" || this.$route.query.name == "edit") {
this.queryFindEtesRuleById(this.$route.query); // ET86详情
} else {
} else {
// 新增时默认一条数据
this.tableData = [
{
id: this.id,
...
...
@@ -443,8 +461,7 @@ export default {
"input-filter": {
bind: function (el, binding) {
el.handler = function (event) {
if (event.data == "E" || event.data == "e") {
// 无理数时
if (event.data == "E" || event.data == "e") { // 无理数时
event.target.value = "";
}
if (event.target.value) {
...
...
@@ -452,8 +469,7 @@ export default {
event.target.value = "";
} else if (Number(event.target.value) > 7) {
event.target.value = "";
} else if (/[\.]/.test(Number(event.target.value))) {
// 浮点数时
} else if (/[\.]/.test(Number(event.target.value))) { // 浮点数时
event.target.value = "";
} else {
}
...
...
@@ -467,28 +483,7 @@ export default {
},
},
},
filters: {
isEdit: function (value) {
switch (value) {
case "新增":
false;
break;
case "编辑":
true;
break;
default:
"新增";
}
},
// 航线个数
fltRoute(val) {
if (val.length && val.split(",").length > 2) {
return false;
} else {
return true;
}
},
},
filters: {},
methods: {
// ET86新增
postAdd(params) {
...
...
@@ -496,18 +491,24 @@ export default {
const { code, msg } = res;
if (code == 200) {
this.msgSuccess(msg || "创建成功!");
this.$router.push("/et86");
this.$router.push("/et86
RuleConfig
");
} else {
this.msgError(msg || "创建失败!");
}
});
})
.catch(() => {})
;
},
// ET86详情
queryFindEtesRuleById({ id, status }) {
queryFindEtesRuleById({ id, status
, name
}) {
findEtesRuleById({ id: id, status: status }).then((res) => {
const { code, data, msg } = res;
if (code == 200) {
data.list.flightRankDtoList.map((item) => {
if(name == "view"){
item.edit = true
}else{
item.edit = false
}
// 爆仓是否继续配舱
if (item.permitOverweight == "N") {
item.permitOverweight = false;
} else {
...
...
@@ -523,6 +524,7 @@ export default {
data.list.fltRuleDto[key] = true;
}
}
// 将详情获取为null的字段设置为空字符串,目的是为了判断的时候少些为null的判断,保持空数据同一的判断条件;
if (data.list.fltRuleDto[key] == null) {
data.list.fltRuleDto[key] = "";
}
...
...
@@ -531,7 +533,7 @@ export default {
} else {
this.msgError(msg || "获取查看失败");
}
});
})
.catch(() => {})
;
},
// ET86编辑
postUpdate(parmas) {
...
...
@@ -539,11 +541,11 @@ export default {
const { code, msg } = res;
if (code == 200) {
this.msgSuccess(msg || "修改成功!");
this.$router.push("/et86");
this.$router.push("/et86
RuleConfig
");
} else {
this.msgError(msg || "修改失败!");
}
});
})
.catch(() => {})
;
},
// 获取所有数据字典
getAllDictData() {
...
...
@@ -556,7 +558,7 @@ export default {
if (res.data.serviceCode.length) {
this.getObj(res.data);
}
});
})
.catch(() => {})
;
},
// 航线查询
getQueryRouteByFltNo(item) {
...
...
@@ -583,20 +585,19 @@ export default {
this.tableData[this.currentIndex].flightRoute = "";
}
}
});
})
.catch(() => {})
;
},
// 航班号input 聚焦事件
inputFocus({ $index }) {
this.currentIndex = $index;
},
// 航班号input搜索事件
inputEvent: debounce(function () {
// 失焦查询
blurSearch() {
this.tableData[this.currentIndex].flightNo = this.upCase(this.tableData[this.currentIndex].flightNo); // 转大写字母
let params = {
fltNo: this.tableData[this.currentIndex].flightNo,
};
let repeat = this.tableData.filter(
(item) => item.flightNo == this.tableData[this.currentIndex].flightNo
);
let repeat = this.tableData.filter((item) => item.flightNo == this.tableData[this.currentIndex].flightNo); // 筛选重复的航班
if (repeat.length > 1) {
this.msgError("航班顺位已重复");
return;
...
...
@@ -608,7 +609,7 @@ export default {
this.tableData[this.currentIndex].routeList = [];
this.msgError("请输入航班号");
}
},
1000),
},
// 添加ET86配舱航班顺位
addBtn(item) {
this.id++;
...
...
@@ -637,12 +638,14 @@ export default {
},
// 类别
changeCheckboxCargoType(arr) {
let include = this.cargoType.filter((item) =>
arr.some((val) => val == item.chineseName)
);
let include = this.cargoType.filter((item) =>arr.some((val) => val == item.chineseName)); // 查询已被勾选的类别
this.checkboxCargoType = include; //已勾选申报类别的数据
this.queryForm.declarationCategory = arr.join(";");
},
// 失焦事件
blurEvent() {
this.queryForm.originOfFlightNo = this.upCase(this.queryForm.originOfFlightNo);
},
// 表单提交
submitForm(formName) {
this.$refs[formName].validate((valid) => {
...
...
@@ -657,27 +660,20 @@ export default {
item.permitOverweight = "Y";
}
});
if (
this.minCNYCustomVal.length != "" ||
this.maxCNYCustomVal.length != ""
) {
// 校验ET86配舱航班顺位维度
if (this.minCNYCustomVal.length != "" || this.maxCNYCustomVal.length != "") {
this.queryForm.currencyCd = "CNY";
this.queryForm.minCustomVal = this.minCNYCustomVal;
this.queryForm.maxCustomVal = this.maxCNYCustomVal;
} else if (
this.minSUDCustomVal.length != "" ||
this.maxSUDCustomVal.length != ""
) {
} else if (this.minSUDCustomVal.length != "" || this.maxSUDCustomVal.length != "") {
this.queryForm.currencyCd = "USD";
this.queryForm.minCustomVal = this.minSUDCustomVal;
this.queryForm.maxCustomVal = this.maxSUDCustomVal;
} else {
this.queryForm.currencyCd = "CNY";
}
let fltNo = this.tableData.some((item) => item.flightNo == "");
let fltNoRoute = this.tableData.some(
(item) => item.flightRoute == ""
);
let fltNo = this.tableData.some((item) => item.flightNo == ""); // 通过遍历判断航班顺位列表有没有填写的航班号
let fltNoRoute = this.tableData.some((item) => item.flightRoute == ""); // 通过遍历判断航班顺位列表有没有填写的航线
if (fltNo) {
this.msgError("航班号不可为空");
return;
...
...
@@ -690,14 +686,8 @@ export default {
this.msgError("原航班号不可为空");
return;
}
this.queryForm.includeServiceType =
this.isServiceCode == "1" && this.serviceCode.length > 0
? this.serviceCode
: ""; // 包含服务种类
this.queryForm.notIncludeServiceType =
this.isServiceCode == "2" && this.serviceCode.length > 0
? this.serviceCode
: ""; // 不包含服务种类
this.queryForm.includeServiceType = this.isServiceCode == "1" && this.serviceCode.length > 0 ? this.serviceCode : ""; // 包含服务种类
this.queryForm.notIncludeServiceType = this.isServiceCode == "2" && this.serviceCode.length > 0 ? this.serviceCode : ""; // 不包含服务种类
let parmas = {
flightRankDtoList: tableData, // ET86配舱航班顺位
fltRuleDto: this.queryForm,
...
...
src/views/
allocationConfig/et86
/edit/mixins/index.js
→
src/views/
et86Config/et86RuleConfig
/edit/mixins/index.js
View file @
f6af92c
File moved
src/views/
allocationConfig/et86
/edit/tableConfig.js
→
src/views/
et86Config/et86RuleConfig
/edit/tableConfig.js
View file @
f6af92c
...
...
@@ -4,7 +4,7 @@ export const tableAttr = {
isDragSort
:
true
,
// 拖拽tableData数据一定要加id字段
maxHeight
:
300
,
btnCofig
:
{
isBtn
:
tru
e
,
isBtn
:
fals
e
,
btnGroup
:
[
{
type
:
"primary"
,
...
...
src/views/
allocationConfig/et86
/formConfig.js
→
src/views/
et86Config/et86RuleConfig
/formConfig.js
View file @
f6af92c
export
const
formConfig
=
[
{
label
:
"创建时间(从)"
,
label
:
"原航班"
,
type
:
"Input"
,
name
:
"originOfFlightNo"
,
prop
:
"originOfFlightNo"
,
placeholder
:
"请输入原航班号"
,
span
:
6
,
trigger
:
"blur"
,
},
{
label
:
"修改时间 从"
,
type
:
"Date"
,
name
:
"startTime"
,
prop
:
"startTime"
,
width
:
"140px"
,
placeholder
:
"请选择开始时间"
,
// rules: { required: true, message: "请选择开始时间", trigger: "blur" },
format
:
"yyyy-MM-dd"
,
colWidth
:
"25%"
,
inputWidth
:
"100%"
,
},
{
label
:
"
创建时间(到)
"
,
label
:
"
到
"
,
type
:
"Date"
,
name
:
"endTime"
,
prop
:
"endTime"
,
width
:
"140px"
,
placeholder
:
"请选择结束时间"
,
// rules: { required: true, message: "请选择结束时间", trigger: "blur" },
format
:
"yyyy-MM-dd"
,
colWidth
:
"19%"
,
labelWidth
:
"20px"
,
inputWidth
:
"100%"
,
},
{
label
:
"规则状态"
,
type
:
"Select"
,
name
:
"status"
,
prop
:
"status"
,
width
:
"140px"
,
placeholder
:
"请选择状态"
,
options
:
{
data
:
[
{
value
:
"1"
,
label
:
"有效"
,
},
{
},
{
value
:
"0"
,
label
:
"无效"
,
},
...
...
@@ -40,6 +50,9 @@ export const formConfig = [
label
:
"有效"
,
value
:
"1"
,
},
colWidth
:
"20%"
,
labelWidth
:
"70px"
,
inputWidth
:
"100%"
,
},
];
...
...
src/views/
allocationConfig/et86
/index.vue
→
src/views/
et86Config/et86RuleConfig
/index.vue
View file @
f6af92c
...
...
@@ -6,6 +6,9 @@
ref="ruleForm"
:formConfig="formConfig"
:queryForm="queryForm"
:inline="false"
formWidth="auto"
@blur="blurEvent"
/>
</el-col>
</el-row>
...
...
@@ -18,7 +21,6 @@
@sizeChange="handleSizeChange"
@currentChange="handleCurrentChange"
@search="searchBtn"
@restForm="restForm"
@add="addBtn"
>
</yl-table>
...
...
@@ -41,10 +43,12 @@ export default {
data() {
return {
formConfig: formConfig, // 表单配置项
queryForm: { // 表单参数
queryForm: {
// 表单参数
status: "有效",
},
pageConfig: { // 分页配置项
pageConfig: {
// 分页配置项
isPagination: true,
total: 0,
pageData: {
...
...
@@ -55,7 +59,6 @@ export default {
tableAttr: tableAttr, // table配置项
columns: columnHeader(this.viewRow, this.editRow, this.deleteRow), // 表头
tableData: [], // 表格数据
selectionList: [], // table复选框筛选集合
};
},
created() {
...
...
@@ -69,20 +72,14 @@ export default {
// ET86查询
queryFindAllEtesRules(params) {
this.tableAttr.loadingTable = true;
findAllEtesRules(params)
.then((res) => {
findAllEtesRules(params).then((res) => {
this.tableAttr.loadingTable = false;
const { code, data } = res;
if (code == 200) {
this.tableData = data.list;
this.pageConfig.total = data.total;
}
})
.catch(() => {});
},
// table复选框事件
selectionTable(e) {
this.selectionList = e;
}).catch(() => {});
},
//条数变化
handleSizeChange(e) {
...
...
@@ -96,14 +93,14 @@ export default {
this.searchBtn();
},
// 搜索
searchBtn(row) {
searchBtn() {
const { page, size } = this.pageConfig.pageData;
let params = {
createTimeStart: this.queryForm.startTime
? this.queryForm.startTime
: "",
createTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "",
limitStart: this.pageConfig.pageData.page,
limitSize: this.pageConfig.pageData.size,
originOfFlightNo: this.queryForm.originOfFlightNo,
updateTimeStart: this.queryForm.startTime ? this.queryForm.startTime : "",
updateTimeEnd: this.queryForm.endTime ? this.queryForm.endTime : "",
limitStart: (page - 1) * size,
limitSize: size,
status: this.queryForm.status,
};
if (this.queryForm.status == "有效") {
...
...
@@ -133,7 +130,7 @@ export default {
query: {
name: "view",
id: row.id,
status: row.status
status: row.status
,
},
});
},
...
...
@@ -144,7 +141,7 @@ export default {
query: {
name: "edit",
id: row.id,
status: row.status
status: row.status
,
},
});
},
...
...
@@ -156,17 +153,21 @@ export default {
type: "warning",
center: true,
}).then(() => {
deleteEtesRuleById({ id: row.id }).then(res=>
{
deleteEtesRuleById({ id: row.id }).then((res) =>
{
const { code, msg } = res;
if (code == 200) {
this.searchBtn();
this.msgSuccess("删除成功!");
}else
{
this.msgError(msg || "删除失败");
}
})
}).catch(() => {});
if (code == 200) {
this.searchBtn();
this.msgSuccess("删除成功!");
} else
{
this.msgError(msg || "删除失败");
}
});
}).catch(() => {});
},
// 失焦事件
blurEvent({ originOfFlightNo }){
this.queryForm.originOfFlightNo = this.upCase(originOfFlightNo)
}
},
};
</script>
...
...
src/views/
allocationConfig/et86
/tableConfig.js
→
src/views/
et86Config/et86RuleConfig
/tableConfig.js
View file @
f6af92c
...
...
@@ -19,15 +19,15 @@ export const tableAttr = {
loading
:
false
,
event
:
"search"
,
},
{
type
:
"info"
,
icon
:
""
,
btnName
:
"重置"
,
size
:
"mini"
,
round
:
false
,
loading
:
false
,
event
:
"restForm"
,
},
//
{
//
type: "info",
//
icon: "",
//
btnName: "重置",
//
size: "mini",
//
round: false,
//
loading: false,
//
event: "restForm",
//
},
{
type
:
"primary"
,
icon
:
"el-icon-plus"
,
...
...
@@ -42,12 +42,6 @@ export const tableAttr = {
};
export
const
columnHeader
=
(
viewRow
,
editRow
,
deleteRow
)
=>
[
{
type
:
"selection"
,
align
:
"center"
,
prop
:
"selection"
,
width
:
"50"
,
},
{
type
:
"index"
,
label
:
"序号"
,
prop
:
"id"
,
...
...
@@ -55,26 +49,20 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
width
:
"50"
,
},
{
label
:
"原航班
号
"
,
label
:
"原航班"
,
prop
:
"originOfFlightNo"
,
align
:
"center"
,
minWidth
:
10
0
,
minWidth
:
8
0
,
},
{
label
:
"
顺位
航班"
,
label
:
"
配载
航班"
,
prop
:
"rankFltNoStr"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"URSA包含"
,
prop
:
"includeUrsa"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"URSA不包含"
,
prop
:
"notIncludeUrsa"
,
label
:
"航线"
,
prop
:
"rankFltRouteStr"
,
align
:
"center"
,
minWidth
:
100
,
},
...
...
@@ -82,43 +70,30 @@ export const columnHeader = (viewRow, editRow, deleteRow) => [
label
:
"状态"
,
prop
:
"status"
,
align
:
"center"
,
minWidth
:
10
0
,
minWidth
:
8
0
,
render
:
(
h
,
params
)
=>
{
const
{
row
}
=
params
;
return
h
(
"div"
,
`
${
state
[
row
.
status
]}
`
);
},
},
{
label
:
"创建时间"
,
prop
:
"createTime"
,
align
:
"center"
,
minWidth
:
100
,
sortable
:
true
,
"sort-method"
:
(
a
,
b
)
=>
b
.
createTime
-
a
.
createTime
,
},
{
label
:
"创建人"
,
prop
:
"createUserName"
,
align
:
"center"
,
minWidth
:
100
,
},
{
label
:
"修改时间"
,
prop
:
"updateTime"
,
align
:
"center"
,
minWidth
:
100
,
minWidth
:
120
,
// "sort-method": (a, b) => b.createTime - a.createTime,
},
{
label
:
"修改人"
,
prop
:
"updateUserName"
,
align
:
"center"
,
minWidth
:
10
0
,
minWidth
:
8
0
,
},
{
label
:
"操作"
,
prop
:
"operate"
,
align
:
"center"
,
minWidth
:
12
0
,
minWidth
:
12
5
,
fixed
:
"right"
,
render
:
(
h
,
params
)
=>
{
return
h
(
"div"
,
[
...
...
Please
register
or
login
to post a comment