shanyunduo.cheng

成功失败提示

...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
10 <el-input 10 <el-input
11 v-model="queryParams.purposeOfFlightNo" 11 v-model="queryParams.purposeOfFlightNo"
12 placeholder="航班号" 12 placeholder="航班号"
13 + @keyup.enter.native="getList"
13 ></el-input> 14 ></el-input>
14 </el-form-item> 15 </el-form-item>
15 <el-form-item> 16 <el-form-item>
...@@ -139,6 +140,14 @@ export default { ...@@ -139,6 +140,14 @@ export default {
139 } 140 }
140 this.loading = true; 141 this.loading = true;
141 findFlightNo(this.queryParams).then((response) => { 142 findFlightNo(this.queryParams).then((response) => {
143 + if (response.code != 200) {
144 + this.$message({
145 + showClose: true,
146 + message: response.msg,
147 + type: "error",
148 + });
149 + reuturn;
150 + }
142 this.flyList = response.data.list; 151 this.flyList = response.data.list;
143 this.total = response.data.totalCount; 152 this.total = response.data.totalCount;
144 this.loading = false; 153 this.loading = false;
......
...@@ -63,24 +63,60 @@ ...@@ -63,24 +63,60 @@
63 <el-form-item label="件数"> 63 <el-form-item label="件数">
64 <el-col :span="3"> 64 <el-col :span="3">
65 <!-- <el-input v-model="form.minNumOfPieces"></el-input> --> 65 <!-- <el-input v-model="form.minNumOfPieces"></el-input> -->
66 - <el-input-number v-model="form.minNumOfPieces == 0 ? form.minNumOfPieces = undefined : form.minNumOfPieces" :precision="0" :controls="false" style="width:100%"></el-input-number> 66 + <el-input-number
67 + v-model="
68 + form.minNumOfPieces == 0
69 + ? (form.minNumOfPieces = undefined)
70 + : form.minNumOfPieces
71 + "
72 + :precision="0"
73 + :controls="false"
74 + style="width: 100%"
75 + ></el-input-number>
67 </el-col> 76 </el-col>
68 <el-col style="text-align: center" :span="1">-</el-col> 77 <el-col style="text-align: center" :span="1">-</el-col>
69 <el-col :span="3"> 78 <el-col :span="3">
70 <!-- <el-input v-model="form.maxNumOfPieces"></el-input> --> 79 <!-- <el-input v-model="form.maxNumOfPieces"></el-input> -->
71 - <el-input-number v-model="form.maxNumOfPieces == 0 ? form.maxNumOfPieces = undefined : form.maxNumOfPieces" :precision="0" :controls="false" style="width:100%"></el-input-number> 80 + <el-input-number
81 + v-model="
82 + form.maxNumOfPieces == 0
83 + ? (form.maxNumOfPieces = undefined)
84 + : form.maxNumOfPieces
85 + "
86 + :precision="0"
87 + :controls="false"
88 + style="width: 100%"
89 + ></el-input-number>
72 </el-col> 90 </el-col>
73 </el-form-item> 91 </el-form-item>
74 92
75 <el-form-item label="重量"> 93 <el-form-item label="重量">
76 <el-col :span="3"> 94 <el-col :span="3">
77 <!-- <el-input v-model="form.minWeight"></el-input> --> 95 <!-- <el-input v-model="form.minWeight"></el-input> -->
78 - <el-input-number v-model="form.minWeight == 0 ? form.minWeight = undefined : form.minWeight" :precision="2" :controls="false" style="width:100%"></el-input-number> 96 + <el-input-number
97 + v-model="
98 + form.minWeight == 0
99 + ? (form.minWeight = undefined)
100 + : form.minWeight
101 + "
102 + :precision="2"
103 + :controls="false"
104 + style="width: 100%"
105 + ></el-input-number>
79 </el-col> 106 </el-col>
80 <el-col style="text-align: center" :span="1">-</el-col> 107 <el-col style="text-align: center" :span="1">-</el-col>
81 <el-col :span="3"> 108 <el-col :span="3">
82 <!-- <el-input v-model="form.maxWeight"></el-input> --> 109 <!-- <el-input v-model="form.maxWeight"></el-input> -->
83 - <el-input-number v-model="form.maxWeight == 0 ? form.maxWeight = undefined : form.maxWeight" :precision="2" :controls="false" style="width:100%"></el-input-number> 110 + <el-input-number
111 + v-model="
112 + form.maxWeight == 0
113 + ? (form.maxWeight = undefined)
114 + : form.maxWeight
115 + "
116 + :precision="2"
117 + :controls="false"
118 + style="width: 100%"
119 + ></el-input-number>
84 </el-col> 120 </el-col>
85 </el-form-item> 121 </el-form-item>
86 122
...@@ -190,17 +226,24 @@ export default { ...@@ -190,17 +226,24 @@ export default {
190 updateOrAddFlight(this.form).then((response) => { 226 updateOrAddFlight(this.form).then((response) => {
191 if (response.code === 200) { 227 if (response.code === 200) {
192 this.$message({ 228 this.$message({
229 + showClose: true,
193 message: "成功", 230 message: "成功",
194 type: "success", 231 type: "success",
195 }); 232 });
233 + this.close();
234 + } else {
235 + this.$message({
236 + showClose: true,
237 + message: response.msg,
238 + type: "error",
239 + });
240 + this.btnLoading = false;
196 } 241 }
197 - this.close();
198 }); 242 });
199 this.form.typeOfGoods = this.typeOfGoods; 243 this.form.typeOfGoods = this.typeOfGoods;
200 this.form.declarationCategory = this.declarationCategory; 244 this.form.declarationCategory = this.declarationCategory;
201 this.form.serviceCode = this.formServiceCode; 245 this.form.serviceCode = this.formServiceCode;
202 this.form.subCategory = this.formSubCategory; 246 this.form.subCategory = this.formSubCategory;
203 - this.btnLoading = false;
204 }, 247 },
205 close() { 248 close() {
206 this.$store.state.tagsView.visitedViews.splice( 249 this.$store.state.tagsView.visitedViews.splice(
...@@ -217,9 +260,21 @@ export default { ...@@ -217,9 +260,21 @@ export default {
217 }, 260 },
218 }, 261 },
219 created() { 262 created() {
263 + let matched = this.$route.matched.filter(
264 + (item) => item.meta && item.meta.title
265 + );
266 + let routers = this.$router.options.routes;
220 let handle = this.$route.params.handle; 267 let handle = this.$route.params.handle;
221 268
222 allDictData().then((response) => { 269 allDictData().then((response) => {
270 + if (response.code != 200) {
271 + this.$message({
272 + showClose: true,
273 + message: response.msg,
274 + type: "error",
275 + });
276 + reuturn;
277 + }
223 let dict = response.data; 278 let dict = response.data;
224 this.cargoType = dict.cargoType; 279 this.cargoType = dict.cargoType;
225 this.cargoStatus = dict.cargoStatus; 280 this.cargoStatus = dict.cargoStatus;
...@@ -235,6 +290,14 @@ export default { ...@@ -235,6 +290,14 @@ export default {
235 290
236 //货物信息 291 //货物信息
237 findByFlightId(id).then((response) => { 292 findByFlightId(id).then((response) => {
293 + if (response.code != 200) {
294 + this.$message({
295 + showClose: true,
296 + message: response.msg,
297 + type: "error",
298 + });
299 + reuturn;
300 + }
238 let info = response.data.list; 301 let info = response.data.list;
239 info.typeOfGoods = info.typeOfGoods ? info.typeOfGoods.split(";") : []; 302 info.typeOfGoods = info.typeOfGoods ? info.typeOfGoods.split(";") : [];
240 info.declarationCategory = info.declarationCategory 303 info.declarationCategory = info.declarationCategory
...@@ -252,18 +315,18 @@ export default { ...@@ -252,18 +315,18 @@ export default {
252 }; 315 };
253 </script> 316 </script>
254 <style rel="stylesheet/scss" lang="scss"> 317 <style rel="stylesheet/scss" lang="scss">
255 -.el-textarea.is-disabled .el-textarea__inner{ 318 +.el-textarea.is-disabled .el-textarea__inner {
256 background-color: rgba(255, 255, 255, 0.5); 319 background-color: rgba(255, 255, 255, 0.5);
257 color: #82848a; 320 color: #82848a;
258 } 321 }
259 -.el-input.is-disabled .el-input__inner{ 322 +.el-input.is-disabled .el-input__inner {
260 - background-color: rgba(255, 255, 255, 0.5); 323 + background-color: rgba(255, 255, 255, 0.5);
261 color: #82848a; 324 color: #82848a;
262 } 325 }
263 -.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner{ 326 +.el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
264 - background-color: rgba(255, 255, 255, 0.5); 327 + background-color: rgba(255, 255, 255, 0.5);
265 } 328 }
266 -.el-checkbox__input.is-disabled + span.el-checkbox__label{ 329 +.el-checkbox__input.is-disabled + span.el-checkbox__label {
267 color: #82848a; 330 color: #82848a;
268 } 331 }
269 </style> 332 </style>
......