jinhui.wang

ver:1.7.0,增加货站查询条件,货站品名导出,修复bug,样式修正

...@@ -50,3 +50,13 @@ export function searchGoods(data) { ...@@ -50,3 +50,13 @@ export function searchGoods(data) {
50 data: data 50 data: data
51 }) 51 })
52 } 52 }
53 +
54 +//查询货站
55 +/**
56 + */
57 +export function findStationName() {
58 + return request({
59 + url: '/goods/findStationName',
60 + method: 'post',
61 + })
62 +}
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -58,5 +58,5 @@ module.exports = { ...@@ -58,5 +58,5 @@ module.exports = {
58 /** 58 /**
59 * 版本号 59 * 版本号
60 */ 60 */
61 - version: 'version:1.6.0' 61 + version: 'version:1.7.0'
62 } 62 }
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form ref="flightAllocForm" :inline="true" :model="queryParams" class="form-header" size="medium" 3 + <el-form ref="flightAllocForm" :model="queryParams" class="form-header" size="medium" label-position="right"
4 - label-position="right" label-width="auto" @submit.native.prevent> 4 + label-width="auto" @submit.native.prevent>
5 + <el-row>
6 + <el-col :span="6">
5 <el-form-item label="航班号"> 7 <el-form-item label="航班号">
6 - <el-input v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList"></el-input> 8 + <el-input class="formItem" v-model.trim="purposeOfFlightNo" placeholder="航班号" @keyup.enter.native="getList">
9 + </el-input>
7 </el-form-item> 10 </el-form-item>
11 + </el-col>
12 + <el-col :span="6">
8 <el-form-item label="航班日期"> 13 <el-form-item label="航班日期">
9 <el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期" 14 <el-date-picker class="formItem" v-model="queryParams.flightDate" type="date" placeholder="选择日期"
10 - value-format="yyyy-MM-dd" clearable> 15 + value-format="yyyy-MM-dd" clearable :disabled="queryParams.querySpecifyData =='2'">
11 </el-date-picker> 16 </el-date-picker>
12 </el-form-item> 17 </el-form-item>
18 + </el-col>
19 + <el-col :span="3">
13 <el-form-item label="状态"> 20 <el-form-item label="状态">
14 - <el-select v-model="queryParams.status" placeholder="状态"> 21 + <el-select class="formItem" v-model="queryParams.status" placeholder="状态">
15 <el-option label="有效" value="1"></el-option> 22 <el-option label="有效" value="1"></el-option>
16 <el-option label="停用" value="3"></el-option> 23 <el-option label="停用" value="3"></el-option>
17 </el-select> 24 </el-select>
18 </el-form-item> 25 </el-form-item>
19 - <el-form-item> 26 + </el-col>
20 - <el-button type="primary" icon="el-icon-search" :loading="loading" @click="getList" size="mini">查询</el-button> 27 + </el-row>
21 - </el-form-item>
22 <div> 28 <div>
29 + <el-form-item label="日期查询">
30 + <el-switch v-model="queryParams.querySpecifyData" active-value="1" inactive-value="2" active-color="#13ce66"
31 + inactive-color="#909399" @change="switchChange">
32 + </el-switch>
33 + </el-form-item>
34 + <el-button type="primary" icon="el-icon-search" :loading="loading" @click="getList" size="mini">查询</el-button>
23 <el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']" 35 <el-button class="mb20" type="primary" icon="el-icon-plus" size="mini" v-hasPermi="['allocation:alloc:add']"
24 @click=" 36 @click="
25 $router.push({ 37 $router.push({
...@@ -78,6 +90,7 @@ export default { ...@@ -78,6 +90,7 @@ export default {
78 queryParams: { 90 queryParams: {
79 purposeOfFlightNo: null, 91 purposeOfFlightNo: null,
80 flightDate: undefined, 92 flightDate: undefined,
93 + querySpecifyData: '2',
81 status: "1", 94 status: "1",
82 start: 0, 95 start: 0,
83 limit: 20, 96 limit: 20,
...@@ -149,6 +162,12 @@ export default { ...@@ -149,6 +162,12 @@ export default {
149 } 162 }
150 this.open = true 163 this.open = true
151 }, 164 },
165 + //开关改变
166 + switchChange(val) {
167 + if (val == '2') {
168 + this.queryParams.flightDate = undefined
169 + }
170 + },
152 close() { 171 close() {
153 this.open = false 172 this.open = false
154 }, 173 },
......
...@@ -240,6 +240,16 @@ ...@@ -240,6 +240,16 @@
240 :precision="2"></el-input-number> 240 :precision="2"></el-input-number>
241 </el-form-item> 241 </el-form-item>
242 </el-col> 242 </el-col>
243 + <el-col :span="12">
244 + <el-form-item label="特殊规则预留总重量" prop="accountTotalWeight">
245 + <el-input class="wid80" v-model="form.accountTotalWeight" disabled />
246 + </el-form-item>
247 + </el-col>
248 + <el-col :span="12">
249 + <el-form-item label="特殊规则已配重量" prop="accountAllocatedWeight">
250 + <el-input class="wid80" v-model="form.accountAllocatedWeight" disabled />
251 + </el-form-item>
252 + </el-col>
243 </el-row> 253 </el-row>
244 </el-form> 254 </el-form>
245 <div slot="footer" class="dialog-footer"> 255 <div slot="footer" class="dialog-footer">
...@@ -270,6 +280,7 @@ import { ...@@ -270,6 +280,7 @@ import {
270 updateAutoPushBatch, 280 updateAutoPushBatch,
271 } from "@/api/findAllFltData"; 281 } from "@/api/findAllFltData";
272 import { getpreAudit } from '@/api/system/preReview.js' 282 import { getpreAudit } from '@/api/system/preReview.js'
283 +import { queryRouteByFltNo } from '@/api/destinationFlight.js'
273 284
274 export default { 285 export default {
275 name: "FlightInformationMaintenance", 286 name: "FlightInformationMaintenance",
...@@ -543,8 +554,12 @@ export default { ...@@ -543,8 +554,12 @@ export default {
543 } 554 }
544 }); 555 });
545 //获取航线 556 //获取航线
546 - this.getRoute(this.form.fltNo).then(res => { 557 + queryRouteByFltNo({ fltNo: this.form.fltNo }).then(res => {
547 - this.routeList = res.list 558 + if (res.code === 200) {
559 + this.routeList = res.data.list
560 + } else {
561 + this.msgWarning(res.msg)
562 + }
548 }).catch(err => { 563 }).catch(err => {
549 console.log(err) 564 console.log(err)
550 }) 565 })
...@@ -873,6 +888,7 @@ export default { ...@@ -873,6 +888,7 @@ export default {
873 //取消按钮 888 //取消按钮
874 cancel() { 889 cancel() {
875 this.routeList = [] 890 this.routeList = []
891 + this.routeMultiple = false
876 this.open = false; 892 this.open = false;
877 this.findAllFltData(); 893 this.findAllFltData();
878 this.findFltConditionData(); 894 this.findFltConditionData();
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-dialog title="新 增" :visible.sync="open" width="25%" :close-on-click-modal="false" :show-close="false" 3 + <el-dialog :title="openStatus == 'add'?'新 增':'导出Excel'" :visible.sync="open" width="25%"
4 - append-to-body center> 4 + :close-on-click-modal="false" :show-close="false" append-to-body center>
5 <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto" 5 <el-form class="form-header" :model="formData" size="small" ref="addForm" label-width="auto"
6 label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent> 6 label-position="left" style="margin-bottom:10px" :rules="rules" @submit.native.prevent>
7 + <div v-if="openStatus == 'add'">
7 <el-form-item label="货站名称" prop="goodsStation"> 8 <el-form-item label="货站名称" prop="goodsStation">
8 <el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称"> 9 <el-input type="text" v-model="formData.goodsStation" maxlength="25" placeholder="请输入货站名称">
9 </el-input> 10 </el-input>
...@@ -13,9 +14,21 @@ ...@@ -13,9 +14,21 @@
13 placeholder="请输入品名,多个用“;”隔开"> 14 placeholder="请输入品名,多个用“;”隔开">
14 </el-input> 15 </el-input>
15 </el-form-item> 16 </el-form-item>
17 + </div>
18 + <div v-else>
19 + <el-form-item label="货站名称" prop="goodsStation">
20 + <el-select class="selectWidth100" v-model.lazy="formData.goodsStation" filterable
21 + :loading="goodsStationLoading" placeholder="不限">
22 + <el-option v-for="(item, index) in goodsStationList" :label="item" :value="item"
23 + :key="item">
24 + </el-option>
25 + </el-select>
26 + </el-form-item>
27 + </div>
16 </el-form> 28 </el-form>
17 <div slot="footer" class="dialog-footer"> 29 <div slot="footer" class="dialog-footer">
18 - <el-button type="primary" :loading="loading" @click="submit">确 定</el-button> 30 + <el-button v-if='openStatus == "add"' type="primary" :loading="loading" @click="submit">确 定</el-button>
31 + <el-button v-else type="primary" :loading="downloading" @click="download">导出Excel</el-button>
19 <el-button @click="close">取 消</el-button> 32 <el-button @click="close">取 消</el-button>
20 </div> 33 </div>
21 </el-dialog> 34 </el-dialog>
...@@ -23,7 +36,8 @@ ...@@ -23,7 +36,8 @@
23 </template> 36 </template>
24 37
25 <script> 38 <script>
26 -import { batchAddGoods } from "@/api/goodsStation" 39 +import { batchAddGoods, findStationName } from "@/api/goodsStation"
40 +import { downLoadXlsx } from "@/utils/zipdownload";
27 41
28 export default { 42 export default {
29 name: '', 43 name: '',
...@@ -32,19 +46,24 @@ export default { ...@@ -32,19 +46,24 @@ export default {
32 type: Boolean, 46 type: Boolean,
33 default: false 47 default: false
34 }, 48 },
49 + openStatus: {
50 + type: String,
51 + default: 'add'
52 + }
35 }, 53 },
36 data() { 54 data() {
37 return { 55 return {
38 formData: { 56 formData: {
39 goodsStation: null, 57 goodsStation: null,
40 - goodsList: null 58 + goodsList: ''
41 }, 59 },
60 + goodsStationList: [],
42 rules: { 61 rules: {
43 goodsStation: [ 62 goodsStation: [
44 { 63 {
45 required: true, 64 required: true,
46 message: "货站名称不能为空", 65 message: "货站名称不能为空",
47 - trigger: "blur", 66 + trigger: "change",
48 }, 67 },
49 ], 68 ],
50 goodsList: [ 69 goodsList: [
...@@ -55,12 +74,34 @@ export default { ...@@ -55,12 +74,34 @@ export default {
55 }, 74 },
56 ], 75 ],
57 }, 76 },
77 + goodsStationLoading: false,
78 + downloading: false,
58 loading: false, 79 loading: false,
59 } 80 }
60 }, 81 },
61 watch: { 82 watch: {
83 + open(val) {
84 + if (val && this.openStatus == 'downloadExcel') {
85 + this.getgoods()
86 + }
87 + }
62 }, 88 },
63 methods: { 89 methods: {
90 + //查询货站
91 + getgoods() {
92 + this.goodsStationLoading = true
93 + findStationName().then(res => {
94 + this.goodsStationLoading = false
95 + if (res.code === 200) {
96 + this.goodsStationList = res.data.list
97 + } else {
98 + this.msgWarning(res.msg)
99 + }
100 + }).catch(err => {
101 + this.goodsStationLoading = false
102 + console.log(err)
103 + })
104 + },
64 //提交 105 //提交
65 submit() { 106 submit() {
66 let obj = {} 107 let obj = {}
...@@ -87,6 +128,24 @@ export default { ...@@ -87,6 +128,24 @@ export default {
87 } 128 }
88 }) 129 })
89 }, 130 },
131 + //导出Excel
132 + download() {
133 + this.$refs['addForm'].validate(val => {
134 + if (val) {
135 + this.downloading = true
136 + let data = { goodsStation: this.formData.goodsStation }
137 + downLoadXlsx("/goods/exportGoods", data, "货站表")
138 + .then(() => {
139 + this.downloading = false
140 + this.close()
141 + })
142 + .catch(() => {
143 + this.downloading = false
144 + });
145 + }
146 + })
147 +
148 + },
90 //取消 149 //取消
91 close() { 150 close() {
92 this.formData = { 151 this.formData = {
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form class="form-header" ref="selectForm" label-width="auto" label-position="left" 3 + <el-form class="form-header" ref="goodsStationForm" :model="selectionData" label-position="right"
4 - style="margin-bottom:10px" @submit.native.prevent size="small"> 4 + label-width="auto" size="small" @submit.native.prevent>
5 <el-row> 5 <el-row>
6 <el-col :span="6"> 6 <el-col :span="6">
7 <el-form-item label="货站名称"> 7 <el-form-item label="货站名称">
8 - <el-input v-model="selectionData.goodsStation" placeholder="请输入货站名称" maxlength="20" clearable /> 8 + <el-input class="formItem" v-model="selectionData.goodsStation" placeholder="请输入货站名称"
9 + maxlength="50" clearable />
10 + </el-form-item>
11 + </el-col>
12 + <el-col :span="6">
13 + <el-form-item label="品名">
14 + <el-input class="formItem" v-model="selectionData.goodsName" placeholder="请输入货站名称"
15 + maxlength="50" clearable />
9 </el-form-item> 16 </el-form-item>
10 </el-col> 17 </el-col>
11 </el-row> 18 </el-row>
...@@ -23,6 +30,10 @@ ...@@ -23,6 +30,10 @@
23 <el-button type="primary" icon="el-icon-download" size="small" style="margin-right:10px" 30 <el-button type="primary" icon="el-icon-download" size="small" style="margin-right:10px"
24 @click="downloadTempleate">下载模板 31 @click="downloadTempleate">下载模板
25 </el-button> 32 </el-button>
33 + <el-button icon="el-icon-download" type="primary" size="small" style="margin-right:10px"
34 + @click="downloadExcel">
35 + 导出Excel
36 + </el-button>
26 <el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel" 37 <el-upload action="/caPreReviewImport/importFlight" name="file" :http-request="uploadExcel"
27 :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx" 38 :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileList" accept=".xlsx"
28 class="upload-demo" v-hasPermi="['base:goodsStation:add']"> 39 class="upload-demo" v-hasPermi="['base:goodsStation:add']">
...@@ -43,8 +54,7 @@ ...@@ -43,8 +54,7 @@
43 </el-table-column> 54 </el-table-column>
44 </template> 55 </template>
45 </Tables> 56 </Tables>
46 - <Dialog :open="open" @close="close" /> 57 + <Dialog :open="open" :openStatus="openStatus" @close="close" />
47 - <UpDateResult :dialogVisible="resultOpen" :resultData="errorData" @close="resultClose" />
48 </div> 58 </div>
49 </template> 59 </template>
50 60
...@@ -52,18 +62,17 @@ ...@@ -52,18 +62,17 @@
52 import { downLoadTemplate } from "@/api/flightInfoImport"; 62 import { downLoadTemplate } from "@/api/flightInfoImport";
53 import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation" 63 import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation"
54 import Dialog from './dialog.vue' 64 import Dialog from './dialog.vue'
55 -import UpDateResult from './upDateResult.vue'
56 65
57 export default { 66 export default {
58 name: 'GoodsStation', 67 name: 'GoodsStation',
59 components: { 68 components: {
60 Dialog, 69 Dialog,
61 - UpDateResult
62 }, 70 },
63 data() { 71 data() {
64 return { 72 return {
65 selectionData: { 73 selectionData: {
66 goodsStation: '', 74 goodsStation: '',
75 + goodsName: '',
67 size: 20, 76 size: 20,
68 page: 1 77 page: 1
69 }, 78 },
...@@ -74,9 +83,9 @@ export default { ...@@ -74,9 +83,9 @@ export default {
74 errorData: [], 83 errorData: [],
75 tableHeight: null, 84 tableHeight: null,
76 totalCount: 0, 85 totalCount: 0,
86 + openStatus: '',
77 loading: false, 87 loading: false,
78 open: false, 88 open: false,
79 - resultOpen: false,
80 } 89 }
81 }, 90 },
82 created() { 91 created() {
...@@ -118,6 +127,7 @@ export default { ...@@ -118,6 +127,7 @@ export default {
118 //新增 127 //新增
119 add() { 128 add() {
120 this.open = true 129 this.open = true
130 + this.openStatus = 'add'
121 }, 131 },
122 //删除 132 //删除
123 del(val) { 133 del(val) {
...@@ -160,6 +170,11 @@ export default { ...@@ -160,6 +170,11 @@ export default {
160 console.log(err) 170 console.log(err)
161 }) 171 })
162 }, 172 },
173 + //导出
174 + downloadExcel() {
175 + this.open = true
176 + this.openStatus = 'downloadExcel'
177 + },
163 //复选 178 //复选
164 tableSelect(val) { 179 tableSelect(val) {
165 this.checkData = val.selection 180 this.checkData = val.selection
...@@ -185,16 +200,15 @@ export default { ...@@ -185,16 +200,15 @@ export default {
185 confirmButtonText: "确定", 200 confirmButtonText: "确定",
186 type: "warning", 201 type: "warning",
187 }); 202 });
188 - } else { 203 + } else if (res.code === 201) {
189 this.$message.warning(res.msg); 204 this.$message.warning(res.msg);
190 this.errorData = res.data; 205 this.errorData = res.data;
191 - if (this.errorData.length > 0) { 206 + this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
192 - this.resultOpen = true 207 + } else {
193 - } 208 + this.$message.warning(res.msg);
194 } 209 }
195 } else { 210 } else {
196 this.$message.success(res.msg); 211 this.$message.success(res.msg);
197 - this.errorData = res.data;
198 this.selection(1) 212 this.selection(1)
199 } 213 }
200 }); 214 });
...@@ -233,6 +247,7 @@ export default { ...@@ -233,6 +247,7 @@ export default {
233 }, 247 },
234 close() { 248 close() {
235 this.open = false 249 this.open = false
250 + this.openStatus = ''
236 this.selection(1) 251 this.selection(1)
237 }, 252 },
238 resultClose() { 253 resultClose() {
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form class="form-header" ref="dictForm" label-width="auto" label-position="left" style="margin-bottom:10px" 3 + <el-form class="form-header" ref="goodsStationFlightForm" :model="selectionData" label-position="right"
4 - @submit.native.prevent size="small"> 4 + label-width="auto" size="small" style="margin-bottom:10px" @submit.native.prevent>
5 <el-row> 5 <el-row>
6 <el-col :span="6"> 6 <el-col :span="6">
7 <el-form-item label="货站名称"> 7 <el-form-item label="货站名称">
8 - <el-input v-model="selectionData.goodsStation" placeholder="请输入货站名称" maxlength="50" clearable /> 8 + <el-input class="formItem" v-model="selectionData.goodsStation" placeholder="请输入货站名称"
9 + maxlength="50" clearable />
10 + </el-form-item>
11 + </el-col>
12 + <el-col :span="6">
13 + <el-form-item label="航班号">
14 + <el-input class="formItem" v-model="selectionData.fltNo" placeholder="请输入航班号" maxlength="20"
15 + clearable />
9 </el-form-item> 16 </el-form-item>
10 </el-col> 17 </el-col>
11 </el-row> 18 </el-row>
......
1 +<template>
2 + <div>
3 + <el-table ref="filterTable" class="mt20" :data="tableData" size="small" border>
4 + <!-- <el-table-column label="行号" prop="line" width="50" align="center">
5 + </el-table-column> -->
6 + <el-table-column label="序号" type="index" width="70" align="center" />
7 + <el-table-column label="错误信息" prop="errorMessage">
8 + <template slot-scope="scope">
9 + {{scope.row}}
10 + <!-- <div v-for="(m, key) in scope.row.errorMessage" :key="key">
11 + {{ m }}
12 + </div> -->
13 + </template>
14 + </el-table-column>
15 + <!-- <el-table-column v-if="tableData.length == 0"></el-table-column>
16 + <el-table-column v-for="(value, key) in tableData" :key="key" v-if="key != 'errorMessage' && key != 'line'"
17 + header-align="center" align="center" :label="key" :prop="key"></el-table-column> -->
18 + </el-table>
19 +
20 + </div>
21 +</template>
22 +
23 +<script>
24 +
25 +export default {
26 + name: 'UpDateResult',
27 + data() {
28 + return {
29 + tableData: [],
30 + fromRoute: ''
31 + }
32 + },
33 + created() {
34 + this.tableData = this.$route.params.data
35 + this.fromRoute = this.$route.params.from
36 + },
37 + wactch: {
38 + dialogVisible(val) {
39 + if (val) {
40 + }
41 + }
42 + },
43 + methods: {
44 + close() {
45 + this.$store.state.tagsView.visitedViews.splice(
46 + this.$store.state.tagsView.visitedViews.findIndex(
47 + (item) => item.path === this.$route.path
48 + ),
49 + );
50 + this.$router.push({ name: this.fromRoute })
51 + }
52 + }
53 +}
54 +</script>
55 +
56 +<style lang="scss" scoped>
57 +
58 +</style>
...\ No newline at end of file ...\ No newline at end of file