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-10-13 11:02:37 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
a308357e744c279147099b159be6a7c67fb06e1b
a308357e
2 parents
213ba758
cb465f9f
modify
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
129 deletions
src/components/YlForm/index.vue
src/views/et86Config/et86RuleConfig/edit/formConfig.js
src/views/et86Config/et86RuleConfig/edit/index.vue
src/views/et86Config/et86RuleConfig/formConfig.js
src/views/et86Config/et86RuleConfig/index.vue
src/components/YlForm/index.vue
View file @
a308357
...
...
@@ -268,6 +268,7 @@
import request from "@/utils/request";
import { deepClone } from "@/utils";
export default {
name: "YlForm",
props: {
rowGutter: {
type: Number,
...
...
src/views/et86Config/et86RuleConfig/edit/formConfig.js
deleted
100644 → 0
View file @
213ba75
export
const
formConfig
=
[
{
label
:
"重量(KG)"
,
type
:
"Input"
,
name
:
"minWeight"
,
prop
:
"minWeight"
,
placeholder
:
"0"
,
rules
:
{
required
:
true
,
message
:
"最小重量不得小于0KG"
,
trigger
:
[
"change"
,
"blur"
],
},
trigger
:
"blur"
,
// 事件名
},
{
label
:
""
,
type
:
"Input"
,
name
:
"maxWeight"
,
prop
:
"maxWeight"
,
placeholder
:
"34"
,
rules
:
{
required
:
true
,
message
:
"最大重量不得大于34KG"
,
trigger
:
[
"change"
,
"blur"
],
},
trigger
:
"blur"
,
// 事件名
},
{
label
:
"件数"
,
type
:
"Input"
,
name
:
"minNumOfPieces"
,
prop
:
"minNumOfPieces"
,
placeholder
:
"0"
,
rules
:
{
required
:
true
,
message
:
"最小件数不得小于0"
,
trigger
:
[
"change"
,
"blur"
],
},
trigger
:
"blur"
,
// 事件名
},
{
label
:
""
,
type
:
"Input"
,
name
:
"maxNumOfPieces"
,
prop
:
"maxNumOfPieces"
,
placeholder
:
"34"
,
rules
:
{
required
:
true
,
message
:
"最大件数不得小于最小件数"
,
trigger
:
[
"change"
,
"blur"
],
},
trigger
:
"blur"
,
// 事件名
},
];
src/views/et86Config/et86RuleConfig/edit/index.vue
View file @
a308357
...
...
@@ -97,7 +97,7 @@
v-model="scope.row.flightRoute"
size="small"
:disabled="scope.row.edit"
@
focus="inputFlightRoute(
scope)"
@
visible-change="visibleChangeRoute($event,
scope)"
>
<el-option
v-for="item in scope.row.routeList"
...
...
@@ -431,7 +431,6 @@
<script>
import YlForm from "@/components/YlForm";
import YlTable from "@/components/YlTable";
import { formConfig } from "./formConfig";
import { inputBlurValidate } from "@/utils/mixins";
import { tableAttr } from "./tableConfig";
import {
...
...
@@ -453,7 +452,6 @@ export default {
mixins: [indexMixins, inputBlurValidate],
data() {
return {
formConfig: formConfig, // 表单配置项
queryForm: {
// ET86配舱航班顺位维度
// 表单参数
...
...
@@ -640,22 +638,15 @@ export default {
this.tableAttr.loadingTable = false;
if (res.code == 200) {
const list = res.data.list;
let routeList = [];
if (list.length) {
list.map((item) => {
routeList.push(item);
});
let isEtesRoute = list.filter((item) => item.isEtesRoute == "Y"); // 过滤普通航线
if (isEtesRoute.length == 0) {
this.msgError("该航班下的航线均为普通航线");
}
// console.log(this.currentIndex)
// console.log(this.tableData)
// console.log(this.tableData[this.currentIndex])
// console.log(isEtesRoute)
this.tableData[this.currentIndex].flightRoute = "";
this.tableData[this.currentIndex].routeList = isEtesRoute;
// this.$set(this.tableData[this.currentIndex].routeList, index, isEtesRoute);
this.$set(this.tableData, this.currentIndex, {
...this.tableData[this.currentIndex],
});
} else {
this.msgError("暂无航线");
this.tableData[this.currentIndex].routeList = [];
...
...
@@ -705,14 +696,17 @@ export default {
this.msgError("请输入航班号");
}
},
// 航线
聚焦
事件
inputFlightRoute({ $index, row })
{
// 航线
Select下拉框出现/隐藏时触发
事件
visibleChangeRoute(e, { $index, row })
{
this.currentIndex = $index;
let params = {
fltNo: row.flightNo
fltNo: row.flightNo,
};
// 出现下拉框时触发
if (e) {
// 航线查询
this.getQueryRouteByFltNo(params);
}
// 航线查询
// this.getQueryRouteByFltNo(params);
},
// 添加ET86配舱航班顺位
addBtn(item) {
...
...
@@ -738,7 +732,7 @@ export default {
},
// 删除
deleBtn(item, $index) {
console.log("删除:",item, $index);
console.log("删除:",
item, $index);
this.tableData.splice($index, 1);
},
// 类别
...
...
@@ -819,6 +813,11 @@ export default {
this.postAdd(parmas); // 新增
} else {
if (this.validateForm) {
parmas.flightRankDtoList.map((item) => {
if (item.hasOwnProperty("routeList")) {
delete item.routeList;
}
});
this.postUpdate(parmas); // 修改
}
}
...
...
@@ -835,7 +834,7 @@ export default {
toLastView(visitedViews, view) {
const latestView = visitedViews.slice(-1)[0];
if (latestView) {
this.$router.
push
(latestView.fullPath);
this.$router.
replace
(latestView.fullPath);
} else {
if (view.name === "Dashboard") {
this.$router.replace({ path: "/redirect" + view.fullPath });
...
...
src/views/et86Config/et86RuleConfig/formConfig.js
View file @
a308357
...
...
@@ -55,50 +55,3 @@ export const formConfig = [
inputWidth
:
"100%"
,
},
];
export
const
editFormConfig
=
[
{
label
:
"航班号"
,
type
:
"Search"
,
name
:
"route"
,
prop
:
"fltNo"
,
placeholder
:
"请输入航班号"
,
rules
:
{
required
:
true
,
message
:
"请输入航班号"
,
trigger
:
[
"change"
,
"blur"
],
},
http
:
{
url
:
"/dictionary/queryRouteByFltNo"
,
method
:
"post"
,
data
:
{
fltNo
:
""
,
},
},
},
{
label
:
""
,
type
:
"inputNumber"
,
name
:
"count"
,
prop
:
"count"
,
placeholder
:
"+"
,
min
:
0
,
max
:
7
,
with
:
"50px"
,
},
{
label
:
"航线优先级"
,
type
:
"Input"
,
name
:
"route"
,
prop
:
"fltNum"
,
placeholder
:
"请选择航线优先级"
,
trigger
:
"focus"
,
},
{
label
:
"爆仓是否继续配舱"
,
type
:
"Checkbox"
,
name
:
"checked"
,
prop
:
"checked"
,
disabled
:
false
,
},
];
...
...
src/views/et86Config/et86RuleConfig/index.vue
View file @
a308357
...
...
@@ -2,14 +2,14 @@
<div ref="formHeaderRef" class="form-header container">
<el-row>
<el-col>
<yl-form
ref="ruleForm"
:formConfig="formConfig"
:queryForm="queryForm"
:inline="false"
formWidth="auto"
@blur="blurEvent"
/>
<yl-form
ref="ruleForm"
:formConfig="formConfig"
:queryForm="queryForm"
:inline="false"
formWidth="auto"
@blur="blurEvent"
/>
</el-col>
</el-row>
<yl-table
...
...
@@ -37,6 +37,7 @@ import {
findAllEtesRules, // ET86查询
deleteEtesRuleById, // 删除
} from "@/api/et86";
import store from "@/store";
export default {
name: "Et86RuleConfig",
components: {
...
...
@@ -69,6 +70,15 @@ export default {
tableData: [], // 表格数据
};
},
watch: {
$route(to, from) {
// 如果是从edit页面进入的Et86RuleConfig页面,那么删除Et86RuleConfig页面缓存
// store.dispatch("tagsView/delCachedView", to); // 删除当前路由组件Et86RuleConfig缓存
if (to.name == this.$options.name) {
this.searchBtn();
}
},
},
created() {
// ET86查询
this.$nextTick(() => {
...
...
Please
register
or
login
to post a comment