jinhui.wang

错误提示页面修改,输入验证修正,页面状态修正

...@@ -84,6 +84,12 @@ export const constantRoutes = [ ...@@ -84,6 +84,12 @@ export const constantRoutes = [
84 name: 'weatherTable', 84 name: 'weatherTable',
85 meta: { title: '流水表', icon: 'user' } 85 meta: { title: '流水表', icon: 'user' }
86 }, 86 },
87 + {
88 + path: '/upDateResult->:from',
89 + component: (resolve) => require(['@/views/preMdeConfig/upDateResult'], resolve),
90 + name: 'UpDateResult',
91 + meta: { title: '导入信息', icon: 'user' }
92 + }
87 ] 93 ]
88 }, 94 },
89 ] 95 ]
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
23 </el-date-picker> 23 </el-date-picker>
24 </el-form-item> 24 </el-form-item>
25 </el-col> 25 </el-col>
26 - <el-col :span="6" v-if="infoForm.route != null"> 26 + <el-col :span="6"
27 + v-if="infoForm.route != null && routeSatus != 'flightInformationMaintenancePurple Tail'">
27 <el-form-item label="航线"> 28 <el-form-item label="航线">
28 <el-input v-model.trim="infoForm.route" @change="getRoutes" disabled> 29 <el-input v-model.trim="infoForm.route" @change="getRoutes" disabled>
29 </el-input> 30 </el-input>
...@@ -576,8 +577,10 @@ export default { ...@@ -576,8 +577,10 @@ export default {
576 this.getRouteDimension({ fltNo: this.infoForm.fltNo, fltDate: this.infoForm.fltDate, route: route ? route : '', status: this.$route.params.status }) 577 this.getRouteDimension({ fltNo: this.infoForm.fltNo, fltDate: this.infoForm.fltDate, route: route ? route : '', status: this.$route.params.status })
577 } 578 }
578 if (this.$route.params.handle == 'add') { 579 if (this.$route.params.handle == 'add') {
580 + if (this.infoForm.fltNo && this.infoForm.fltNo != null && this.infoForm.fltNo != '') {
579 this.getRoutes(this.infoForm.fltNo) 581 this.getRoutes(this.infoForm.fltNo)
580 } 582 }
583 + }
581 }, 584 },
582 deep: true 585 deep: true
583 }, 586 },
...@@ -761,15 +764,14 @@ export default { ...@@ -761,15 +764,14 @@ export default {
761 }) 764 })
762 } else { 765 } else {
763 //航班类型Purple Tail展示全部航线维度 766 //航班类型Purple Tail展示全部航线维度
764 - this.isEmpty = true 767 + this.routeList.forEach((route) => {
765 - // this.routeList.forEach((route) => { 768 + this.infoForm.list.push({
766 - // this.infoForm.list.push({ 769 + purposeOfFlightNo: this.infoForm.fltNo,
767 - // purposeOfFlightNo: this.infoForm.fltNo, 770 + ruleDate: this.infoForm.fltDate,
768 - // ruleDate: this.infoForm.fltDate, 771 + flightRoute: route.route,
769 - // flightRoute: route.route, 772 + routePriority: route.routePriority,
770 - // routePriority: route.routePriority, 773 + })
771 - // }) 774 + })
772 - // })
773 } 775 }
774 } 776 }
775 }).catch(err => { 777 }).catch(err => {
...@@ -779,6 +781,7 @@ export default { ...@@ -779,6 +781,7 @@ export default {
779 } else { 781 } else {
780 //航线为空,提示未找到维度数据 782 //航线为空,提示未找到维度数据
781 if (this.routeSatus == 'flightInformationMaintenancePurple Tail') { 783 if (this.routeSatus == 'flightInformationMaintenancePurple Tail') {
784 + console.log(this.infoForm.fltNo, this.infoForm.route, this.$route.params.status)
782 findDestinationFltRuleByFlightNo({ 785 findDestinationFltRuleByFlightNo({
783 purposeOfFlightNo: this.infoForm.fltNo, 786 purposeOfFlightNo: this.infoForm.fltNo,
784 flightRoute: this.infoForm.route, 787 flightRoute: this.infoForm.route,
...@@ -808,7 +811,14 @@ export default { ...@@ -808,7 +811,14 @@ export default {
808 } 811 }
809 }) 812 })
810 } else { 813 } else {
811 - this.isEmpty = true 814 + this.routeList.forEach(route => {
815 + this.infoForm.list.push({
816 + purposeOfFlightNo: this.infoForm.fltNo,
817 + ruleDate: this.infoForm.fltDate,
818 + flightRoute: route.route,
819 + routePriority: route.routePriority,
820 + })
821 + })
812 } 822 }
813 }).catch(err => { 823 }).catch(err => {
814 this.isEmpty = true 824 this.isEmpty = true
...@@ -861,9 +871,9 @@ export default { ...@@ -861,9 +871,9 @@ export default {
861 submit(val) { 871 submit(val) {
862 let routeArr = [] 872 let routeArr = []
863 let data = this.setDataHandle(JSON.parse(JSON.stringify(this.infoForm.list[val]))) 873 let data = this.setDataHandle(JSON.parse(JSON.stringify(this.infoForm.list[val])))
864 - if (data.minNumOfPieces > data.maxNumOfPieces) { 874 + if (new Number(data.minNumOfPieces) > new Number(data.maxNumOfPieces)) {
865 this.msgWarning('件数前区间不能大于后区间') 875 this.msgWarning('件数前区间不能大于后区间')
866 - } else if (data.minWeight > data.maxWeight) { 876 + } else if (new Number(data.minWeight) > new Number(data.maxWeight)) {
867 this.msgWarning('重量前区间不能大于后区间') 877 this.msgWarning('重量前区间不能大于后区间')
868 } else { 878 } else {
869 this.loading = true 879 this.loading = true
......
...@@ -457,7 +457,7 @@ export default { ...@@ -457,7 +457,7 @@ export default {
457 return this.form.flightRank; 457 return this.form.flightRank;
458 }, 458 },
459 set: function (val) { 459 set: function (val) {
460 - const reg = /^([a-zA-Z0-9]{0,20}(\;[a-zA-Z0-9]{0,20})*)$/ 460 + const reg = /^([a-zA-Z0-9\+\-]{0,20}(\;[a-zA-Z0-9\+\-]{0,20})*)$/
461 if (reg.test(val)) { 461 if (reg.test(val)) {
462 this.$set(this.form, 'flightRank', val) 462 this.$set(this.form, 'flightRank', val)
463 } 463 }
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
58 <el-table-column label="申报类别" align="center" prop="typeName" /> 58 <el-table-column label="申报类别" align="center" prop="typeName" />
59 <el-table-column label="件数" align="center" prop="qty" width="70" /> 59 <el-table-column label="件数" align="center" prop="qty" width="70" />
60 <el-table-column label="实际重量" align="center" prop="actualWeight" width="100" /> 60 <el-table-column label="实际重量" align="center" prop="actualWeight" width="100" />
61 - <el-table-column :show-overflow-tooltip="true" label="品描述" align="center" prop="nameDescription" /> 61 + <el-table-column :show-overflow-tooltip="true" label="品描述" align="center" prop="nameDescription" />
62 <el-table-column label="航班日期" align="center" prop="fltDate" /> 62 <el-table-column label="航班日期" align="center" prop="fltDate" />
63 <el-table-column label="航班号" align="center" prop="fltNo" width="100" /> 63 <el-table-column label="航班号" align="center" prop="fltNo" width="100" />
64 <el-table-column label="航班路线" align="center" prop="route" /> 64 <el-table-column label="航班路线" align="center" prop="route" />
......
...@@ -569,10 +569,10 @@ export default { ...@@ -569,10 +569,10 @@ export default {
569 kindChange(val) { 569 kindChange(val) {
570 this.selectOption.flightKindlist.forEach(item => { 570 this.selectOption.flightKindlist.forEach(item => {
571 if (item.id == val) { 571 if (item.id == val) {
572 - if (item.chineseName == 'White Tail') { 572 + if (item.chineseName.indexOf('White') >= 0) {
573 this.form.route = '' 573 this.form.route = ''
574 this.routeMultiple = false 574 this.routeMultiple = false
575 - } else if (item.chineseName == 'Purple Tail') { 575 + } else if (item.chineseName.indexOf('Purple') >= 0) {
576 this.form.route = [] 576 this.form.route = []
577 this.routeMultiple = true 577 this.routeMultiple = true
578 } 578 }
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form class="form-header" ref="selectForm" label-position="right" label-width="auto" 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="50" clearable /> 8 + <el-input class="formItem" v-model="selectionData.goodsStation" placeholder="请输入货站名称"
9 + maxlength="50" clearable />
9 </el-form-item> 10 </el-form-item>
10 </el-col> 11 </el-col>
11 <el-col :span="6"> 12 <el-col :span="6">
12 <el-form-item label="品名"> 13 <el-form-item label="品名">
13 - <el-input v-model="selectionData.goodsName" placeholder="请输入货站名称" maxlength="50" clearable /> 14 + <el-input class="formItem" v-model="selectionData.goodsName" placeholder="请输入货站名称"
15 + maxlength="50" clearable />
14 </el-form-item> 16 </el-form-item>
15 </el-col> 17 </el-col>
16 </el-row> 18 </el-row>
...@@ -60,13 +62,11 @@ ...@@ -60,13 +62,11 @@
60 import { downLoadTemplate } from "@/api/flightInfoImport"; 62 import { downLoadTemplate } from "@/api/flightInfoImport";
61 import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation" 63 import { importGoods, batchDeleteGoods, searchGoods } from "@/api/goodsStation"
62 import Dialog from './dialog.vue' 64 import Dialog from './dialog.vue'
63 -import UpDateResult from './upDateResult.vue'
64 65
65 export default { 66 export default {
66 name: 'GoodsStation', 67 name: 'GoodsStation',
67 components: { 68 components: {
68 Dialog, 69 Dialog,
69 - UpDateResult
70 }, 70 },
71 data() { 71 data() {
72 return { 72 return {
...@@ -200,12 +200,12 @@ export default { ...@@ -200,12 +200,12 @@ export default {
200 confirmButtonText: "确定", 200 confirmButtonText: "确定",
201 type: "warning", 201 type: "warning",
202 }); 202 });
203 - } else { 203 + } else if (res.code === 201) {
204 - if (this.errorData.length > 0) {
205 this.$message.warning(res.msg); 204 this.$message.warning(res.msg);
206 this.errorData = res.data; 205 this.errorData = res.data;
207 this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } }) 206 this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
208 - } 207 + } else {
208 + this.$message.warning(res.msg);
209 } 209 }
210 } else { 210 } else {
211 this.$message.success(res.msg); 211 this.$message.success(res.msg);
......
1 -<template>
2 - <div>
3 - <el-dialog title="新 增" :visible.sync="dialogVisible" width="50%" top="1vh" :close-on-click-modal="false"
4 - :show-close="false" append-to-body center>
5 - <el-table ref="filterTable" class="mt20" :data="resultData" size="small" border>
6 - <el-table-column label="行号" prop="line" width="50" align="center">
7 - </el-table-column>
8 - <el-table-column label="错误信息" prop="errorMessage" width="200">
9 - <template slot-scope="scope">
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="resultData.length == 0"></el-table-column>
16 - <el-table-column v-for="(value, key) in this.resultData[0]" :key="key"
17 - v-if="key != 'errorMessage' && key != 'line'" header-align="center" align="center" :label="key"
18 - :prop="key"></el-table-column>
19 - </el-table>
20 - <div slot="footer" class="dialog-footer">
21 - <el-button @click="close">取 消</el-button>
22 - </div>
23 - </el-dialog>
24 - </div>
25 -</template>
26 -
27 -<script>
28 -
29 -export default {
30 - name: 'UpDateResult',
31 - props: {
32 - dialogVisible: {
33 - type: Boolean,
34 - default: false
35 - },
36 - resultData: {
37 - type: Array,
38 - default: null
39 - }
40 - },
41 - data() {
42 - return {
43 - }
44 - },
45 - wactch: {
46 - dialogVisible(val) {
47 - if (val) {
48 - }
49 - }
50 - },
51 - methods: {
52 - close() {
53 - this.$emit('close')
54 - }
55 - }
56 -}
57 -</script>
58 -
59 -<style lang="scss" scoped>
60 -
61 -</style>
...\ No newline at end of file ...\ No newline at end of file
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-form class="form-header" ref="dictForm" label-position="right" label-width="auto" 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 />
9 </el-form-item> 10 </el-form-item>
10 </el-col> 11 </el-col>
11 <el-col :span="6"> 12 <el-col :span="6">
12 <el-form-item label="航班号"> 13 <el-form-item label="航班号">
13 - <el-input v-model="selectionData.fltNo" placeholder="请输入航班号" maxlength="20" clearable /> 14 + <el-input class="formItem" v-model="selectionData.fltNo" placeholder="请输入航班号" maxlength="20"
15 + clearable />
14 </el-form-item> 16 </el-form-item>
15 </el-col> 17 </el-col>
16 </el-row> 18 </el-row>
......
...@@ -153,12 +153,12 @@ export default { ...@@ -153,12 +153,12 @@ export default {
153 confirmButtonText: "确定", 153 confirmButtonText: "确定",
154 type: "warning", 154 type: "warning",
155 }); 155 });
156 - } else { 156 + } else if (res.code === 201) {
157 this.msgWarning(res.data.msg); 157 this.msgWarning(res.data.msg);
158 - if (res.data.data && res.data.data.length > 0) {
159 this.errorData = res.data.data; 158 this.errorData = res.data.data;
160 this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightToArea' } }) 159 this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightToArea' } })
161 - } 160 + } else {
161 + this.msgWarning(res.data.msg);
162 } 162 }
163 } else { 163 } else {
164 this.msgSuccess("导入成功"); 164 this.msgSuccess("导入成功");
......
1 <template> 1 <template>
2 <div> 2 <div>
3 - <el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button>
4 <el-table ref="filterTable" class="mt20" :data="tableData" size="small" border> 3 <el-table ref="filterTable" class="mt20" :data="tableData" size="small" border>
5 - <el-table-column label="行号" prop="line" width="50" align="center"> 4 + <!-- <el-table-column label="行号" prop="line" width="50" align="center">
6 - </el-table-column> 5 + </el-table-column> -->
7 - <el-table-column label="错误信息" prop="errorMessage" width="200"> 6 + <el-table-column label="序号" type="index" width="70" align="center" />
7 + <el-table-column label="错误信息" prop="errorMessage">
8 <template slot-scope="scope"> 8 <template slot-scope="scope">
9 - <div v-for="(m, key) in scope.row.errorMessage" :key="key"> 9 + {{scope.row}}
10 + <!-- <div v-for="(m, key) in scope.row.errorMessage" :key="key">
10 {{ m }} 11 {{ m }}
11 - </div> 12 + </div> -->
12 </template> 13 </template>
13 </el-table-column> 14 </el-table-column>
14 - <el-table-column v-if="tableData.length == 0"></el-table-column> 15 + <!-- <el-table-column v-if="tableData.length == 0"></el-table-column>
15 - <el-table-column v-for="(value, key) in this.tableData[0]" :key="key" 16 + <el-table-column v-for="(value, key) in tableData" :key="key" v-if="key != 'errorMessage' && key != 'line'"
16 - v-if="key != 'errorMessage' && key != 'line'" header-align="center" align="center" :label="key" 17 + header-align="center" align="center" :label="key" :prop="key"></el-table-column> -->
17 - :prop="key"></el-table-column>
18 </el-table> 18 </el-table>
19 19
20 </div> 20 </div>
......
...@@ -159,12 +159,12 @@ export default { ...@@ -159,12 +159,12 @@ export default {
159 confirmButtonText: "确定", 159 confirmButtonText: "确定",
160 type: "warning", 160 type: "warning",
161 }); 161 });
162 - } else { 162 + } else if (res.code === 201) {
163 this.msgWarning(res.data.msg); 163 this.msgWarning(res.data.msg);
164 - if (res.data.data && res.data.data.length > 0) {
165 this.errorData = res.data.data; 164 this.errorData = res.data.data;
166 this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } }) 165 this.$router.push({ name: 'UpDateResult', params: { data: this.errorData, from: 'FlightInformationImport' } })
167 - } 166 + } else {
167 + this.msgWarning(res.data.msg);
168 } 168 }
169 } else { 169 } else {
170 this.msgSuccess("导入成功"); 170 this.msgSuccess("导入成功");
......