Merge branch 'master' of http://118.178.128.178/Fedex/imac-vue
Showing
5 changed files
with
258 additions
and
17 deletions
| ... | @@ -4,9 +4,53 @@ import request from '@/utils/request' | ... | @@ -4,9 +4,53 @@ import request from '@/utils/request' |
| 4 | 4 | ||
| 5 | // 查询航班列表 | 5 | // 查询航班列表 |
| 6 | export function findFlightNo(query) { | 6 | export function findFlightNo(query) { |
| 7 | - return request({ | ||
| 8 | - url: '/destinationFlight/findFlightNo', | ||
| 9 | - method: 'post', | ||
| 10 | - data: query | ||
| 11 | - }) | ||
| 12 | - } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 7 | + return request({ | ||
| 8 | + url: '/destinationFlight/findFlightNo', | ||
| 9 | + method: 'post', | ||
| 10 | + data: query | ||
| 11 | + }) | ||
| 12 | +} | ||
| 13 | + | ||
| 14 | +// id查询目的航班列表 | ||
| 15 | +export function findByFlightId(id) { | ||
| 16 | + const data = { | ||
| 17 | + id | ||
| 18 | + } | ||
| 19 | + return request({ | ||
| 20 | + url: '/destinationFlight/findByFlightId', | ||
| 21 | + method: 'post', | ||
| 22 | + data: data | ||
| 23 | + }) | ||
| 24 | +} | ||
| 25 | + | ||
| 26 | +//申报类别 | ||
| 27 | +export function cargoTypeData(){ | ||
| 28 | + return request({ | ||
| 29 | + url: '/destinationFlight/cargoTypeData', | ||
| 30 | + method: 'post' | ||
| 31 | + }) | ||
| 32 | +} | ||
| 33 | + | ||
| 34 | +//货物类型 | ||
| 35 | +export function cargoStatusData(){ | ||
| 36 | + return request({ | ||
| 37 | + url: '/destinationFlight/cargoStatusData', | ||
| 38 | + method: 'post' | ||
| 39 | + }) | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +//ServiceCode | ||
| 43 | +export function serviceCodeData(){ | ||
| 44 | + return request({ | ||
| 45 | + url: '/destinationFlight/serviceCodeData', | ||
| 46 | + method: 'post' | ||
| 47 | + }) | ||
| 48 | +} | ||
| 49 | + | ||
| 50 | +//SubCategory | ||
| 51 | +export function subCategoryData(){ | ||
| 52 | + return request({ | ||
| 53 | + url: '/destinationFlight/subCategoryData', | ||
| 54 | + method: 'post' | ||
| 55 | + }) | ||
| 56 | +} | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -79,6 +79,26 @@ export const constantRoutes = [ | ... | @@ -79,6 +79,26 @@ export const constantRoutes = [ |
| 79 | meta: { title: '个人中心', icon: 'user' } | 79 | meta: { title: '个人中心', icon: 'user' } |
| 80 | } | 80 | } |
| 81 | ] | 81 | ] |
| 82 | + }, | ||
| 83 | + { | ||
| 84 | + path: '/destinationFlight', | ||
| 85 | + component: Layout, | ||
| 86 | + hidden: true, | ||
| 87 | + redirect: 'noredirect', | ||
| 88 | + children: [ | ||
| 89 | + { | ||
| 90 | + path: 'detail', | ||
| 91 | + component: (resolve) => require(['@/views/system/destinationFlight/info'], resolve), | ||
| 92 | + name: 'Detail', | ||
| 93 | + meta: { title: '目的航班信息', icon: 'user' } | ||
| 94 | + }, | ||
| 95 | + { | ||
| 96 | + path: 'update', | ||
| 97 | + component: (resolve) => require(['@/views/system/destinationFlight/info'], resolve), | ||
| 98 | + name: 'Update', | ||
| 99 | + meta: { title: '目的航班信息修改', icon: 'user' } | ||
| 100 | + } | ||
| 101 | + ] | ||
| 82 | } | 102 | } |
| 83 | ] | 103 | ] |
| 84 | 104 | ... | ... |
src/views/system/destinationFlight/index.vue
0 → 100644
File mode changed
src/views/system/destinationFlight/info.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div style="margin: 40px"> | ||
| 3 | + <el-form ref="form" :model="form" label-width="200px"> | ||
| 4 | + <el-form-item label="航班号"> | ||
| 5 | + <el-input | ||
| 6 | + v-model="form.purposeOfFlightNo" | ||
| 7 | + style="width: 30%" | ||
| 8 | + ></el-input> | ||
| 9 | + </el-form-item> | ||
| 10 | + | ||
| 11 | + <el-row :gutter="20"> | ||
| 12 | + <el-col :span="10"> | ||
| 13 | + <el-form-item label="站点包含"> | ||
| 14 | + <el-input | ||
| 15 | + type="textarea" | ||
| 16 | + v-model="form.location" | ||
| 17 | + :rows="6" | ||
| 18 | + resize="none" | ||
| 19 | + ></el-input> | ||
| 20 | + </el-form-item> | ||
| 21 | + </el-col> | ||
| 22 | + <el-col :span="10"> | ||
| 23 | + <el-form-item label="站点不包含"> | ||
| 24 | + <el-input | ||
| 25 | + type="textarea" | ||
| 26 | + v-model="form.notLocation" | ||
| 27 | + :rows="6" | ||
| 28 | + resize="none" | ||
| 29 | + ></el-input> | ||
| 30 | + </el-form-item> | ||
| 31 | + </el-col> | ||
| 32 | + </el-row> | ||
| 33 | + | ||
| 34 | + <el-row :gutter="20"> | ||
| 35 | + <el-col :span="10"> | ||
| 36 | + <el-form-item label="URSA包含"> | ||
| 37 | + <el-input | ||
| 38 | + type="textarea" | ||
| 39 | + v-model="form.includeUrsa" | ||
| 40 | + :rows="6" | ||
| 41 | + resize="none" | ||
| 42 | + ></el-input> | ||
| 43 | + </el-form-item> | ||
| 44 | + </el-col> | ||
| 45 | + <el-col :span="10"> | ||
| 46 | + <el-form-item label="URSA不包含"> | ||
| 47 | + <el-input | ||
| 48 | + type="textarea" | ||
| 49 | + v-model="form.notIncludeUrsa" | ||
| 50 | + :rows="6" | ||
| 51 | + resize="none" | ||
| 52 | + ></el-input> | ||
| 53 | + </el-form-item> | ||
| 54 | + </el-col> | ||
| 55 | + </el-row> | ||
| 56 | + | ||
| 57 | + <el-form-item label="件数"> | ||
| 58 | + <el-col :span="3"> | ||
| 59 | + <el-input v-model="form.minNumOfPieces"></el-input> | ||
| 60 | + </el-col> | ||
| 61 | + <el-col style="text-align: center" :span="1">-</el-col> | ||
| 62 | + <el-col :span="3"> | ||
| 63 | + <el-input v-model="form.maxNumOfPieces"></el-input> | ||
| 64 | + </el-col> | ||
| 65 | + </el-form-item> | ||
| 66 | + | ||
| 67 | + <el-form-item label="重量"> | ||
| 68 | + <el-col :span="3"> | ||
| 69 | + <el-input v-model="form.minWeight"></el-input> | ||
| 70 | + </el-col> | ||
| 71 | + <el-col style="text-align: center" :span="1">-</el-col> | ||
| 72 | + <el-col :span="3"> | ||
| 73 | + <el-input v-model="form.maxWeight"></el-input> | ||
| 74 | + </el-col> | ||
| 75 | + </el-form-item> | ||
| 76 | + | ||
| 77 | + <el-form-item label="申报类别"> | ||
| 78 | + <el-checkbox-group v-model="form.typeOfGoods"> | ||
| 79 | + <el-checkbox v-for="item in cargoType" :key="item.id" :label="item.chineseName" :name="item.chineseName"></el-checkbox> | ||
| 80 | + </el-checkbox-group> | ||
| 81 | + </el-form-item> | ||
| 82 | + | ||
| 83 | + <el-form-item label="货物类型"> | ||
| 84 | + <el-checkbox-group v-model="form.declarationCategory"> | ||
| 85 | + <el-checkbox v-for="item in cargoStatus" :key="item.id" :label="item.chineseName" :name="item.chineseName"></el-checkbox> | ||
| 86 | + </el-checkbox-group> | ||
| 87 | + </el-form-item> | ||
| 88 | + | ||
| 89 | + <el-form-item label="Service Code"> | ||
| 90 | + <el-checkbox-group v-model="form.serviceCode"> | ||
| 91 | + <el-checkbox v-for="item in serviceCode" :key="item.id" :label="item.englishName" :name="item.englishName"></el-checkbox> | ||
| 92 | + </el-checkbox-group> | ||
| 93 | + </el-form-item> | ||
| 94 | + | ||
| 95 | + <el-form-item label="Sub Category"> | ||
| 96 | + <el-checkbox-group v-model="form.subCategory"> | ||
| 97 | + <el-checkbox v-for="item in subCategory" :key="item.id" :label="item.englishName" :name="item.englishName"></el-checkbox> | ||
| 98 | + </el-checkbox-group> | ||
| 99 | + </el-form-item> | ||
| 100 | + | ||
| 101 | + <el-form-item> | ||
| 102 | + <el-button type="primary" @click="onSubmit">立即创建</el-button> | ||
| 103 | + <el-button>取消</el-button> | ||
| 104 | + </el-form-item> | ||
| 105 | + </el-form> | ||
| 106 | + </div> | ||
| 107 | +</template> | ||
| 108 | + | ||
| 109 | +<script> | ||
| 110 | +import { findByFlightId, cargoTypeData, cargoStatusData, serviceCodeData, subCategoryData } from "@/api/destinationFlight"; | ||
| 111 | + | ||
| 112 | +export default { | ||
| 113 | + data() { | ||
| 114 | + return { | ||
| 115 | + form: { | ||
| 116 | + typeOfGoods: [], | ||
| 117 | + declarationCategory: [], | ||
| 118 | + serviceCode: [], | ||
| 119 | + subCategory: [], | ||
| 120 | + }, | ||
| 121 | + cargoType:[], | ||
| 122 | + cargoStatus:[], | ||
| 123 | + serviceCode:[], | ||
| 124 | + subCategory:[] | ||
| 125 | + }; | ||
| 126 | + }, | ||
| 127 | + methods: { | ||
| 128 | + onSubmit() { | ||
| 129 | + console.log("submit!"); | ||
| 130 | + }, | ||
| 131 | + }, | ||
| 132 | + created() { | ||
| 133 | + let id = this.$route.query.id; | ||
| 134 | + | ||
| 135 | + //申报类别 | ||
| 136 | + cargoTypeData().then((response) => { | ||
| 137 | + this.cargoType = response.data; | ||
| 138 | + }) | ||
| 139 | + | ||
| 140 | + //货物类型 | ||
| 141 | + cargoStatusData().then((response) => { | ||
| 142 | + this.cargoStatus = response.data; | ||
| 143 | + }) | ||
| 144 | + | ||
| 145 | + //service code | ||
| 146 | + serviceCodeData().then((response) => { | ||
| 147 | + this.serviceCode = response.data; | ||
| 148 | + }) | ||
| 149 | + | ||
| 150 | + //subCategory | ||
| 151 | + subCategoryData().then((response) => { | ||
| 152 | + this.subCategory = response.data; | ||
| 153 | + }) | ||
| 154 | + | ||
| 155 | + | ||
| 156 | + //货物信息 | ||
| 157 | + findByFlightId(id).then((response) => { | ||
| 158 | + let info = response.data.list; | ||
| 159 | + info.typeOfGoods = info.typeOfGoods ? info.typeOfGoods.split(";") : []; | ||
| 160 | + info.declarationCategory = info.declarationCategory ? info.declarationCategory.split(";") : []; | ||
| 161 | + info.serviceCode = info.serviceCode ? info.serviceCode.split(";") : []; | ||
| 162 | + info.subCategory = info.subCategory ? info.subCategory.split(";") : []; | ||
| 163 | + this.form = info; | ||
| 164 | + }); | ||
| 165 | + }, | ||
| 166 | +}; | ||
| 167 | +</script> | ||
| 168 | + |
| ... | @@ -19,16 +19,18 @@ | ... | @@ -19,16 +19,18 @@ |
| 19 | label="航班号"> | 19 | label="航班号"> |
| 20 | </el-table-column> | 20 | </el-table-column> |
| 21 | <el-table-column | 21 | <el-table-column |
| 22 | - label="操作"> | 22 | + label="操作" prop="id"> |
| 23 | - <el-link type="primary">查看</el-link> | 23 | + <template slot-scope="scope"> |
| 24 | - <el-divider direction="vertical"></el-divider> | 24 | + <el-button type="text" @click="handleClick(scope.row.id, 'Detail')">查看</el-button> |
| 25 | - <el-link type="primary">修改</el-link> | 25 | + <el-divider direction="vertical"></el-divider> |
| 26 | - <el-divider direction="vertical"></el-divider> | 26 | + <el-button type="text" @click="handleClick(scope.row.id, 'Update')">修改</el-button> |
| 27 | - <el-link type="primary">删除</el-link> | 27 | + <el-divider direction="vertical"></el-divider> |
| 28 | - <el-divider direction="vertical"></el-divider> | 28 | + <el-button type="text">删除</el-button> |
| 29 | - <el-link type="primary">启用</el-link> | 29 | + <el-divider direction="vertical"></el-divider> |
| 30 | - <el-divider direction="vertical"></el-divider> | 30 | + <el-button type="text">启用</el-button> |
| 31 | - <el-link type="primary">停用</el-link> | 31 | + <el-divider direction="vertical"></el-divider> |
| 32 | + <el-button type="text">停用</el-button> | ||
| 33 | + </template> | ||
| 32 | </el-table-column> | 34 | </el-table-column> |
| 33 | </el-table> | 35 | </el-table> |
| 34 | <el-pagination | 36 | <el-pagination |
| ... | @@ -79,7 +81,14 @@ | ... | @@ -79,7 +81,14 @@ |
| 79 | this.total = response.data.totalCount; | 81 | this.total = response.data.totalCount; |
| 80 | this.loading = false; | 82 | this.loading = false; |
| 81 | }); | 83 | }); |
| 82 | - | 84 | + }, |
| 85 | + //跳转到查看,修改页面 | ||
| 86 | + handleClick(flightiId, pageName){ | ||
| 87 | + this.$router.push({name:pageName,query: {id:flightiId}}); | ||
| 88 | + }, | ||
| 89 | + //删除,启用,停用 | ||
| 90 | + changeStatus(id, handle){ | ||
| 91 | + | ||
| 83 | } | 92 | } |
| 84 | }, | 93 | }, |
| 85 | created() { | 94 | created() { | ... | ... |
-
Please register or login to post a comment