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
shanyunduo.cheng
2021-12-06 13:44:57 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
ad09441fd9789d3a57560d8c5a322e976a804663
ad09441f
2 parents
1836e511
7087dbcf
Merge branch 'master' of
http://118.178.128.178/Fedex/imac-vue
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
55 deletions
src/views/allocationConfig/flightRandConfig/index.vue
src/views/allocationConfig/flightRandConfig/index.vue
View file @
ad09441
...
...
@@ -50,9 +50,12 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280" 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.id,0,'删除')">删除</el-button>
<el-button size="mini" type="text" icon="el-icon-video-play"@click="handleDeleteorPlayorpause(scope.row.id,1,'启用')">启用</el-button>
<el-button size="mini" type="text" icon="el-icon-video-pause"@click="handleDeleteorPlayorpause(scope.row.id,3,'停用')">停用</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"
@click="handleDeleteorPlayorpause(scope.row,1,'启用')">启用</el-button>
<el-button size="mini" type="text" icon="el-icon-video-pause"
@click="handleDeleteorPlayorpause(scope.row,3,'停用')">停用</el-button>
</template>
</el-table-column>
</el-table>
...
...
@@ -70,7 +73,7 @@
<el-table-column label="航班日期" align="center" prop="flightDate" />
<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">查看配置维度</el-button>
<el-button size="mini" type="text" icon="el-icon-edit"
@click="handleClick(scope.row.sourceFlightNo, 'detail')"
>查看配置维度</el-button>
</template>
</el-table-column>
</el-table>
...
...
@@ -93,15 +96,15 @@
<el-row>
<el-col :span="12">
<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>
...
...
@@ -148,9 +151,10 @@
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;
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;
}
}
},
...
...
@@ -159,8 +163,8 @@
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;
}
else
{
return time.getTime() < new Date().getTime()
- 24 * 60 * 60 * 1000;
}
}
},
...
...
@@ -182,10 +186,7 @@
statusList: [{
'id': 1,
'name': '有效'
}, {
'id': 2,
'name': '配置中'
}, {
},{
'id': 3,
'name': '停用'
}],
...
...
@@ -202,7 +203,7 @@
status: undefined, //状态
flightDate: undefined //日期
},
dayOfWeek:[],
dayOfWeek:
[],
// 表单参数
form: {
dayOfWeek: []
...
...
@@ -226,6 +227,13 @@
this.findSourceFlightRules();
},
methods: {
//跳转到查看,修改页面
handleClick(flightiId, handle) {
this.$router.push({
name: "Info",
params: { handle: handle, id: flightiId },
});
},
/** 查询原航班顺位规则*/
findSourceFlightRules() {
//this.loading = true;
...
...
@@ -235,68 +243,77 @@
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.msgError(response.msg);
}
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.form
= {
};
this.open = true;
this.title = "添加原航班顺位规则";
this.form.id = -1;
this.dayOfWeek
=
[];
this.dayOfWeek
=
[];
},
/** 修改按钮操作 */
handleUpdate(row) {
this.form={
};
this.dayOfWeek
=
[];
this.open = true;
this.title = "修改原航班顺位规则";
this.form =
row;
this.dayOfWeek= this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
this.form = {
};
this.dayOfWeek
=
[];
this.open = true;
this.title = "修改原航班顺位规则";
this.form =
row;
this.dayOfWeek
= this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
//this.form.dayOfWeek = this.form.dayOfWeek ? this.form.dayOfWeek.split(";") : [];
},
/** 删除 启用 停用按钮操作 */
handleDeleteorPlayorpause(rowid,status,statusText) {
handleDeleteorPlayorpause(row, status, statusText) {
debugger
//删除前需要停用
if (status === 0 && row.status != '3') {
this.$message({
message: '请停用后删除',
type: 'warning'
});
return;
}
this.$confirm('是否确认' + statusText + '此数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
this.$confirm('是否确认' + statusText + '此数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
let disable
=
{
id:
row
id,
status:status
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);
}
return delOrEnableORDisableApi(disable);
}).then(response => {
if (response.code == 200)
{
this.findSourceFlightRules();
this.msgSuccess(statusText +
"成功");
} else
{
this.msgError(response.msg);
}
}).catch(function() {});
}).catch(function() {});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
this.form.dayOfWeek
=
this.dayOfWeek.sort();
this.form.dayOfWeek
=
this.dayOfWeek.sort();
//处理数据
sourceFlightRulesSaveApi(this.form).then(response => {
if (response.code === 200) {
...
...
@@ -337,10 +354,10 @@
this.loadingFlightDate = true;
this.sourceFlightAndFlightDate = [];
findSourceFlightAndFlightDateApi(this.queryParams).then(response => {
if
(response.code === 200)
{
if
(response.code === 200)
{
this.sourceFlightAndFlightDate = response.data;
this.loadingFlightDate = false;
}
else
{
}
else
{
this.msgError(response.msg);
}
...
...
@@ -355,7 +372,7 @@
// 取消按钮
cancel() {
this.open = false;
// this.reset();
// this.reset();
},
// 状态字典翻译
statusFormat(row) {
...
...
Please
register
or
login
to post a comment