作者 小范

运输工具通用查询

... ... @@ -80,6 +80,8 @@
<el-date-picker
v-model="aircraft.deliverDate"
type="date"
value-format="yyyyMMdd"
format="yyyyMMdd"
style="width:100%"
placeholder="选择日期">
</el-date-picker>
... ... @@ -96,6 +98,20 @@
<el-col :span="24"> <el-button type="primary" @click="submitForm('aircraft')">保 存</el-button>
<el-button type="success">保存并发送</el-button></el-col>
</el-row>
<!--对话提示框-->
<el-row>
<el-dialog
title="系统提示"
:visible.sync="centerDialogVisible"
width="30%"
center>
<span>{{msg}}</span>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</el-row>
</el-main>
</el-container>
</template>
... ... @@ -118,6 +134,8 @@
.el-col{margin-right: 0px;}
</style>
<script>
const fecha = require('fecha');
import {addAircraft} from "../../api/transport";
export default {
data(){
return{
... ... @@ -190,9 +208,44 @@
deliverDate: [
{required: true, message: '请输入', trigger: 'blur'}
],
}
},
centerDialogVisible:false,
}
},
methods(){}
methods:{
//新增当日飞行计划(保存按钮)
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
addAircraft(this.aircraft).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
this.$router.push({path:'/queryAircraft',query:{airwayCode:JSON.stringify(this.aircraft.airwayCode)}});
}else{
this.msg=response.msg;
}
});
} else {
console.log('error submit!!');
return false;
}
});
},
//加载默认值
defaultData(){
if(this.$route.query!=null){
let ob=Object.assign(this.aircraft, this.$route.query);
/*有时分秒时用fecha
this.flight.flightDate=ob.flightDate;
this.flight.currentLandingTime=fecha.parse(ob.currentLandingTime,'yyyyMMddHHmm');
this.flight.currentTakeoffTime=fecha.parse(ob.currentTakeoffTime,'yyyyMMddHHmm');*/
}
},
},
mounted(){
this.defaultData();
}
}
</script>
\ No newline at end of file
... ...
... ... @@ -111,6 +111,7 @@
dischargecompleteddatetime:undefined,
arrivaldatetime:undefined,
meno:undefined,
accessFlag:'0'
},
rules: {
aircraftNo: [
... ...
... ... @@ -99,6 +99,7 @@
arrivaldatetime:undefined,
stayid:undefined,
meno:undefined,
accessFlag:'0'
},
rules: {
aircraftNo: [
... ...
... ... @@ -87,6 +87,7 @@
departuredatetime:undefined,
customDistrictNo:undefined,
meno:undefined,
accessFlag:'1'
},
rules: {
aircraftNo: [
... ...
... ... @@ -99,6 +99,7 @@
stayid:undefined,
departuredatetime:undefined,
meno:undefined,
accessFlag:'1'
},
rules: {
aircraftNo: [
... ...
... ... @@ -18,6 +18,8 @@
<el-date-picker
v-model="flight.flightDate"
type="date"
value-format="yyyyMMdd"
format="yyyyMMdd"
style="width:100%"
placeholder="选择日期">
</el-date-picker>
... ... @@ -52,8 +54,10 @@
<el-date-picker
v-model="flight.currentTakeoffTime"
type="date"
format="yyyyMMddHHmm"
value-format="yyyyMMddHHmm"
style="width:100%"
placeholder="选择日期">
placeholder="任意时间点">
</el-date-picker>
</el-form-item>
</el-col>
... ... @@ -62,8 +66,10 @@
<el-date-picker
v-model="flight.currentLandingTime"
type="date"
format="yyyyMMddHHmm"
value-format="yyyyMMddHHmm"
style="width:100%"
placeholder="选择日期">
placeholder="任意时间点">
</el-date-picker>
</el-form-item>
</el-col>
... ... @@ -100,6 +106,20 @@
</span>
</el-dialog>
</el-row>
<!--对话提示框-->
<el-row>
<el-dialog
title="系统提示"
:visible.sync="centerDialogVisible"
width="30%"
center>
<span>{{msg}}</span>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</el-row>
</el-main>
</el-container>
</template>
... ... @@ -122,8 +142,8 @@
.el-col{margin-right: 0px;}
</style>
<script>
import {addFlightPlan} from "../../api/transport";
const fecha = require('fecha');
import {addFlightPlan} from "../../api/transport";
export default {
data(){
return{
... ... @@ -174,10 +194,12 @@
{value:'1',label:'客运'},
{value:'2',label:'货运'}
],
centerDialogVisible:false,
msg:undefined
}
},
methods:{
//新增航线方法(保存按钮)
//新增当日飞行计划(保存按钮)
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
... ... @@ -186,7 +208,7 @@
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
this.$router.push({path:'/queryFlightplan',query:{serialNo:JSON.stringify(this.flight.serialNo)}});
this.$router.push({path:'/queryFlightplan',query:{flightNo:JSON.stringify(this.flight.flightNo)}});
}else{
this.msg=response.msg;
}
... ... @@ -197,11 +219,23 @@
}
});
},
//加载默认值
defaultData(){
if(this.$route.query!=null){
let ob=Object.assign(this.flight, this.$route.query);
/*有时分秒时用fecha
this.flight.flightDate=ob.flightDate;
this.flight.currentLandingTime=fecha.parse(ob.currentLandingTime,'yyyyMMddHHmm');
this.flight.currentTakeoffTime=fecha.parse(ob.currentTakeoffTime,'yyyyMMddHHmm');*/
}
},
},
// 过滤中英文
inputMe(e){
return e.replace(/[^a-zA-Z]/g,'').toUpperCase();
},
mounted(){
this.defaultData();
}
}
</script>
... ...
... ... @@ -30,6 +30,7 @@
<el-table
:data="tableData"
border
v-loading="tableloading"
style="width: 100%;margin-bottom: 10px">
<el-table-column
fixed="left"
... ... @@ -44,7 +45,7 @@
</el-table-column>
<el-table-column
fixed
prop=ownerCo"
prop=airwayCode"
label="航空器所有人代码"
width="120">
</el-table-column>
... ... @@ -74,7 +75,7 @@
</el-table-column>
<el-table-column
fixed
prop="owner"
prop="ownerCo"
label="航空器所有人"
width="120">
</el-table-column>
... ... @@ -128,10 +129,10 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[100, 200, 300, 400]"
:page-size="100"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="400">
:total="total">
</el-pagination>
</div>
</el-row>
... ... @@ -157,27 +158,90 @@
</style>
<script>
import {selectAircraft, editAircraft} from "../../api/transport";
export default {
data(){
return{
queryAircraft:{
flightNo:undefined,
airwayCode:undefined,
aircraftNo:undefined,
flightDate:undefined,
accessFlag:undefined,
},
rules:{},
labelPosition:'left',
currentPage: 4,
tableData:[]
currentPage: 1,
pageSize:10,
total:0,
tableData:[],
tableloading:false
}
},
methods: {
//分页
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.pageSize=val;
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage=val;
this.submitForm();
},
//获取通用航空器列表
submitForm() {
let params = {
currentPage: this.currentPage, pageSize: this.pageSize, airwayCode: this.queryAircraft.airwayCode,
aircraftNo: this.queryAircraft.aircraftNo
};
this.tableloading = true;
selectAircraft(params).then(res => {
let response = res.data.data;
this.tableData = response.list;
this.tableloading = false;
this.total = response.total;
});
},
//列表删除功能
handleDel(index, row) {
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
editAircraft(row).then(res => {
let response = res.data;
if (response.code == '200') {
this.$message({
type: 'info',
message: '删除成功'
});
this.submitForm();
} else {
this.$message({
type: 'info',
message: '删除失败'
});
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
//获取默认值
defaultData() {
this.airwayCode = JSON.parse(this.$route.query.airwayCode);
this.aircraftNo = JSON.parse(this.$route.query.aircraftNo);
},
//编辑通用航空器
handleEdit(index,row){
this.$router.push({path:'/aircraft',query: row})
},
//渲染方法
mounted(){
this.defaultData();
this.submitForm();
}
},
}
... ...
... ... @@ -31,7 +31,6 @@
:data="tableData"
border
v-loading="tableloading"
style="width: 100%;margin-bottom: 10px">
<el-table-column
fixed="left"
... ...
... ... @@ -26,6 +26,7 @@
<el-date-picker
v-model="queryFlightplan.flightDate"
type="date"
format="yyyyMMdd"
style="width:190px"
placeholder="选择日期">
</el-date-picker>
... ... @@ -174,7 +175,7 @@
</style>
<script>
import {selectFlightPlan, editFlightPlan, selectBill, editBill} from "../../api/transport";
import {selectFlightPlan, editFlightPlan} from "../../api/transport";
export default {
data(){
return{
... ... @@ -188,20 +189,28 @@
currentPage: 1,
pageSize:10,
total:0,
tableData:[]
tableData: [],
tableloading:false
}
},
methods: {
handleSizeChange(val){},
handleCurrentChange(val){},
//获取单据列表
//分页
handleSizeChange(val) {
this.pageSize=val;
},
handleCurrentChange(val) {
this.currentPage=val;
this.submitForm();
},
//获取当日飞行计划列表
submitForm() {
let params = {
currentPage: this.currentPage, pageSize: this.pageSize, flightNo: this.queryFlightplan.flightNo,
aircraftNo: this.queryFlightplan.aircraftNo, flightDate: this.queryFlightplan.flightDate
};
this.tableloading = true;
selectBill(params).then(res => {
selectFlightPlan(params).then(res => {
let response = res.data.data;
this.tableData = response.list;
this.tableloading = false;
... ... @@ -238,33 +247,20 @@
});
},
//获取默认值
/*defaultData() {
defaultData() {
this.flightNo = JSON.parse(this.$route.query.flightNo);
this.aircraftNo = JSON.parse(this.$route.query.aircraftNo);
this.flightDate = JSON.parse(this.$route.query.flightDate);
},*/
//编辑单据查询
/*handleEdit(index,row){
this.$router.push({path:'/bill',query:
{
uuid:JSON.stringify(row.uuid),
flightNo:JSON.stringify(row.flightNo),
flightDate:JSON.stringify(row.flightDate),
departurePort:JSON.stringify(row.departurePort),
departureCustomNo:JSON.stringify(row.departureCustomNo),
arrivalPort:JSON.stringify(row.arrivalPort),
arrivalCustomNo:JSON.stringify(row.arrivalCustomNo),
currentTakeoffTime:JSON.stringify(row.currentTakeoffTime),
currentLandingTime:JSON.stringify(row.currentLandingTime),
linesType:JSON.stringify(row.linesType)},*/
},
//渲染方法
mounted(){
//this.defaultData();
this.submitForm();
this.aircraftNo = JSON.parse(this.$route.query.aircraftNo);
},
//编辑当日飞行计划
handleEdit(index,row){
this.$router.push({path:'/flightplan',query: row})
},
//渲染方法
mounted(){
this.defaultData();
this.submitForm();
}
}
}
</script>
... ...
... ... @@ -8,7 +8,7 @@
</el-row>
<!-- 搜索区域-->
<el-row>
<el-form :label-position="labelPosition" :model="queryRouteaircraft" :rules="rules" ref="queryAircraft"
<el-form :label-position="labelPosition" :model="queryRouteaircraft" :rules="rules" ref="queryRouteaircraft"
label-width="130px" class="demo-ruleForm">
<el-col :span="8">
<el-form-item label="航空器所有人代码:" prop="airwayCode" label-width="130px">
... ... @@ -21,7 +21,7 @@
</el-form-item>
</el-col>
<el-col :span="6" >
<el-button type="primary" @click="submitForm('queryBill')">查询</el-button>
<el-button type="primary" @click="submitForm('queryRouteaircraft')">查询</el-button>
</el-col>
</el-form>
</el-row>
... ... @@ -30,6 +30,7 @@
<el-table
:data="tableData"
border
v-loading="tableloading"
style="width: 100%;margin-bottom: 10px">
<el-table-column
fixed="left"
... ... @@ -134,10 +135,10 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[100, 200, 300, 400]"
:page-size="100"
:page-sizes="[10, 20, 30, 40]"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="400">
:total="total">
</el-pagination>
</div>
</el-row>
... ... @@ -163,28 +164,90 @@
</style>
<script>
import {editAirLineAircraft, selectAirLineAircraft} from "../../api/transport";
export default {
data(){
return{
queryRouteaircraft:{
flightNo:undefined,
airwayCode:undefined,
aircraftNo:undefined,
flightDate:undefined,
accessFlag:undefined,
},
labelPosition:'left',
currentPage: 4,
tableData:[]
currentPage: 1,
pageSize:10,
total:0,
tableData:[],
tableloading:false
}
},
methods: {
//分页
handleSizeChange(val) {
console.log(`每页 ${val} 条`);
this.pageSize=val;
},
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.currentPage=val;
this.submitForm();
},
//获取航线航空器列表
submitForm() {
let params = {
currentPage: this.currentPage, pageSize: this.pageSize, airwayCode: this.queryRouteaircraft.airwayCode,
aircraftNo: this.queryRouteaircraft.aircraftNo
};
this.tableloading = true;
selectAirLineAircraft(params).then(res => {
let response = res.data.data;
this.tableData = response.list;
this.tableloading = false;
this.total = response.total;
});
},
//列表删除功能
handleDel(index, row) {
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
editAirLineAircraft(row).then(res => {
let response = res.data;
if (response.code == '200') {
this.$message({
type: 'info',
message: '删除成功'
});
this.submitForm();
} else {
this.$message({
type: 'info',
message: '删除失败'
});
}
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
//获取默认值
defaultData() {
this.airwayCode = JSON.parse(this.$route.query.airwayCode);
this.aircraftNo = JSON.parse(this.$route.query.aircraftNo);
},
//编辑航线航空器
handleEdit(index,row){
this.$router.push({path:'/routeaircraft',query: row})
},
//渲染方法
mounted(){
this.defaultData();
this.submitForm();
}
},
}
}
</script>
... ...
... ... @@ -80,6 +80,8 @@
<el-date-picker
v-model="aircraft.deliverDate"
type="date"
value-format="yyyyMMdd"
format="yyyyMMdd"
style="width:100%"
placeholder="选择日期">
</el-date-picker>
... ... @@ -96,6 +98,20 @@
<el-col :span="24"> <el-button type="primary" @click="submitForm('aircraft')">保 存</el-button>
<el-button type="success">保存并发送</el-button></el-col>
</el-row>
<!--对话提示框-->
<el-row>
<el-dialog
title="系统提示"
:visible.sync="centerDialogVisible"
width="30%"
center>
<span>{{msg}}</span>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
</span>
</el-dialog>
</el-row>
</el-main>
</el-container>
</template>
... ... @@ -118,6 +134,8 @@
.el-col{margin-right: 0px;}
</style>
<script>
import {addFlightPlan} from "../../api/transport";
export default {
data(){
return{
... ... @@ -191,9 +209,39 @@
{required: true, message: '请输入', trigger: 'blur'}
],
},
centerDialogVisible:false,
}
},
methods(){}
methods:{
//新增航线航空器(保存按钮)
submitForm(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
addFlightPlan(this.aircraft).then(res=>{
let response=res.data;
if(response.code=='200'){
this.centerDialogVisible=true;
this.msg=response.msg;
this.$router.push({path:'/queryRouteaircraft',query:{airwayCode:JSON.stringify(this.aircraft.airwayCode)},});
}else{
this.msg=response.msg;
}
});
} else {
console.log('error submit!!');
return false;
}
});
},
//加载默认值
defaultData(){
if(this.$route.query!=null){
let ob=Object.assign(this.airwayCode, this.$route.query);
}
},
},
mounted(){
this.defaultData();
}
}
</script>
\ No newline at end of file
... ...