jinhui.wang

页面跳转状态修正,bug修复,输入校验修复

...@@ -80,6 +80,8 @@ export default { ...@@ -80,6 +80,8 @@ export default {
80 }) 80 })
81 }, 81 },
82 close() { 82 close() {
83 + this.routeList = []
84 + this.submitData = []
83 this.$emit('close') 85 this.$emit('close')
84 }, 86 },
85 drag(val) { 87 drag(val) {
...@@ -94,4 +96,5 @@ export default { ...@@ -94,4 +96,5 @@ export default {
94 </script> 96 </script>
95 97
96 <style lang="scss" scoped> 98 <style lang="scss" scoped>
99 +
97 </style> 100 </style>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -760,15 +760,15 @@ export default { ...@@ -760,15 +760,15 @@ export default {
760 }) 760 })
761 } else { 761 } else {
762 //航班类型Purple Tail展示全部航线维度 762 //航班类型Purple Tail展示全部航线维度
763 - this.isEmpty = true 763 + // this.isEmpty = true
764 - // this.routeList.forEach((route) => { 764 + this.routeList.forEach((route) => {
765 - // this.infoForm.list.push({ 765 + this.infoForm.list.push({
766 - // purposeOfFlightNo: this.infoForm.fltNo, 766 + purposeOfFlightNo: this.infoForm.fltNo,
767 - // ruleDate: this.infoForm.fltDate, 767 + ruleDate: this.infoForm.fltDate,
768 - // flightRoute: route.route, 768 + flightRoute: route.route,
769 - // routePriority: route.routePriority, 769 + routePriority: route.routePriority,
770 - // }) 770 + })
771 - // }) 771 + })
772 } 772 }
773 } 773 }
774 }).catch(err => { 774 }).catch(err => {
...@@ -807,7 +807,14 @@ export default { ...@@ -807,7 +807,14 @@ export default {
807 } 807 }
808 }) 808 })
809 } else { 809 } else {
810 - this.isEmpty = true 810 + this.routeList.forEach((route) => {
811 + this.infoForm.list.push({
812 + purposeOfFlightNo: this.infoForm.fltNo,
813 + ruleDate: this.infoForm.fltDate,
814 + flightRoute: route.route,
815 + routePriority: route.routePriority,
816 + })
817 + })
811 } 818 }
812 }).catch(err => { 819 }).catch(err => {
813 this.isEmpty = true 820 this.isEmpty = true
...@@ -858,39 +865,45 @@ export default { ...@@ -858,39 +865,45 @@ export default {
858 }, 865 },
859 //保存 866 //保存
860 submit(val) { 867 submit(val) {
861 - this.loading = true
862 let routeArr = [] 868 let routeArr = []
863 - let data = this.setDataHandle(this.infoForm.list[val]) 869 + let data = this.setDataHandle(JSON.parse(JSON.stringify(this.infoForm.list[val])))
864 - this.routeList.forEach((item, idx) => { 870 + if (new Number(data.minNumOfPieces) > new Number(data.maxNumOfPieces)) {
865 - routeArr.push(item.route) 871 + this.msgWarning('件数前区间不能大于后区间')
866 - }) 872 + } else if (new Number(data.minWeight) > new Number(data.maxWeight)) {
867 - data.routeSpecifyDateSeq = routeArr.join(';') 873 + this.msgWarning('重量前区间不能大于后区间')
868 - data.ruleDate = this.infoForm.fltDate
869 - this.infoForm.list[val].routePriority = this.routeList[val].routePriority
870 - if (this.infoForm.route != null && this.infoForm.route != '') {
871 - this.routeList.forEach(item => {
872 - if (item.route == this.infoForm.route) {
873 - data.routePriority = item.routePriority
874 - }
875 - })
876 - data.flightRoute = this.infoForm.route
877 } else { 874 } else {
878 - data.flightRoute = this.routeList[val].route 875 + this.loading = true
879 - data.routePriority = this.routeList[val].routePriority 876 + this.routeList.forEach((item, idx) => {
880 - } 877 + routeArr.push(item.route)
881 - updateOrAddFlight(data).then(res => { 878 + })
882 - this.loading = false 879 + data.routeSpecifyDateSeq = routeArr.join(';')
883 - if (res.code === 200) { 880 + data.ruleDate = this.infoForm.fltDate
884 - this.fltNoDisabled = true 881 + this.infoForm.list[val].routePriority = this.routeList[val].routePriority
885 - this.$forceUpdate() 882 + if (this.infoForm.route != null && this.infoForm.route != '') {
886 - this.msgSuccess('保存成功!') 883 + this.routeList.forEach(item => {
887 - this.infoForm.list[val] = this.dataHandle(res.data) 884 + if (item.route == this.infoForm.route) {
885 + data.routePriority = item.routePriority
886 + }
887 + })
888 + data.flightRoute = this.infoForm.route
888 } else { 889 } else {
889 - this.msgWarning(res.msg) 890 + data.flightRoute = this.routeList[val].route
891 + data.routePriority = this.routeList[val].routePriority
890 } 892 }
891 - }).catch(err => { 893 + updateOrAddFlight(data).then(res => {
892 - console.log(err) 894 + this.loading = false
893 - }) 895 + if (res.code === 200) {
896 + this.fltNoDisabled = true
897 + this.$forceUpdate()
898 + this.msgSuccess('保存成功!')
899 + this.infoForm.list[val] = this.dataHandle(res.data)
900 + } else {
901 + this.msgWarning(res.msg)
902 + }
903 + }).catch(err => {
904 + console.log(err)
905 + })
906 + }
894 }, 907 },
895 //删除 908 //删除
896 del(val) { 909 del(val) {
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
32 </el-form-item> 32 </el-form-item>
33 </el-form> 33 </el-form>
34 <Tables ref="newTables" ductName="flightRand" :data="sourceFlightRulesList" :headerData="tableHeaders['flightRand']" 34 <Tables ref="newTables" ductName="flightRand" :data="sourceFlightRulesList" :headerData="tableHeaders['flightRand']"
35 - :order="true" :totalCount="total" :loading="loading" :limitSize="queryParams.limit" 35 + :order="true" :showOverflowTooltip="false" :totalCount="total" :loading="loading" :limitSize="queryParams.limit"
36 :limitStart="queryParams.start" :page="queryParams.pageNum" :pageSizes="[20]" :height="tableHeight" 36 :limitStart="queryParams.start" :page="queryParams.pageNum" :pageSizes="[20]" :height="tableHeight"
37 @currentChange="currentChange"> 37 @currentChange="currentChange">
38 <template slot="optionColumn"> 38 <template slot="optionColumn">
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
66 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200"> 66 <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
67 <template slot-scope="scope"> 67 <template slot-scope="scope">
68 <el-button size="mini" type="text" icon="el-icon-edit" 68 <el-button size="mini" type="text" icon="el-icon-edit"
69 - @click="handleClick(scope.row.actualFlight, 'detail')">查看配置维度</el-button> 69 + @click="handleClick(scope.row.actualFlight, 'detail', scope.row.flightDate)">查看配置维度</el-button>
70 </template> 70 </template>
71 </el-table-column> 71 </el-table-column>
72 </el-table> 72 </el-table>
...@@ -115,7 +115,8 @@ ...@@ -115,7 +115,8 @@
115 </el-col> 115 </el-col>
116 <el-col :span="24"> 116 <el-col :span="24">
117 <el-form-item label="配载航班" prop="flightRank"> 117 <el-form-item label="配载航班" prop="flightRank">
118 - <el-input type="textarea" v-model="form.flightRank" :rows="4"></el-input> 118 + <el-input type="textarea" v-model="flightRank" rows="4" maxlength="255">
119 + </el-input>
119 </el-form-item> 120 </el-form-item>
120 </el-col> 121 </el-col>
121 <el-col :span="24"> 122 <el-col :span="24">
...@@ -217,6 +218,7 @@ export default { ...@@ -217,6 +218,7 @@ export default {
217 dayOfWeek: [], 218 dayOfWeek: [],
218 // 表单参数 219 // 表单参数
219 form: { 220 form: {
221 + flightRank: null,
220 dayOfWeek: [], 222 dayOfWeek: [],
221 }, 223 },
222 // 表单校验 224 // 表单校验
...@@ -264,13 +266,14 @@ export default { ...@@ -264,13 +266,14 @@ export default {
264 }, 266 },
265 methods: { 267 methods: {
266 //跳转到查看,修改页面 268 //跳转到查看,修改页面
267 - handleClick(flightiId, handle) { 269 + handleClick(fltNo, handle, fltDate) {
268 this.openFlightDate = false; 270 this.openFlightDate = false;
269 this.$router.push({ 271 this.$router.push({
270 name: "FlightAllocConfigInfo", 272 name: "FlightAllocConfigInfo",
271 params: { 273 params: {
272 handle: handle, 274 handle: handle,
273 - id: flightiId, 275 + fltNo: fltNo,
276 + fltDate: fltDate
274 }, 277 },
275 }); 278 });
276 }, 279 },
...@@ -438,7 +441,7 @@ export default { ...@@ -438,7 +441,7 @@ export default {
438 this.queryParams.start = val.start; 441 this.queryParams.start = val.start;
439 this.queryParams.pageNum = val.page; 442 this.queryParams.pageNum = val.page;
440 this.findSourceFlightRules(); 443 this.findSourceFlightRules();
441 - } 444 + },
442 }, 445 },
443 computed: { 446 computed: {
444 sourceFlightNo: { 447 sourceFlightNo: {
...@@ -449,8 +452,20 @@ export default { ...@@ -449,8 +452,20 @@ export default {
449 this.queryParams.sourceFlightNo = this.upCase(val); 452 this.queryParams.sourceFlightNo = this.upCase(val);
450 }, 453 },
451 }, 454 },
455 + flightRank: {
456 + get: function () {
457 + return this.form.flightRank;
458 + },
459 + set: function (val) {
460 + const reg = /^([a-zA-Z0-9\+\-]{0,20}(\;[a-zA-Z0-9\+\-]{0,20})*)$/
461 + if (reg.test(val)) {
462 + this.$set(this.form, 'flightRank', val)
463 + }
464 + }
465 + },
452 }, 466 },
453 }; 467 };
454 </script> 468 </script>
455 <style> 469 <style>
470 +
456 </style> 471 </style>
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
49 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> 49 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
50 <el-button type="warning" :disabled="tableData.length == 0" v-hasPermi="['base:caExport:export']" 50 <el-button type="warning" :disabled="tableData.length == 0" v-hasPermi="['base:caExport:export']"
51 @click="xlse()" :loading="downLoadingTip.downloading" icon="el-icon-download" size="mini">{{ 51 @click="xlse()" :loading="downLoadingTip.downloading" icon="el-icon-download" size="mini">{{
52 - downLoadingTip.downloading ? downLoadingTip.tip : "导出" 52 + downLoadingTip.downloading ? downLoadingTip.tip : "导出"
53 }}</el-button> 53 }}</el-button>
54 </div> 54 </div>
55 </el-form> 55 </el-form>
...@@ -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" />
......
...@@ -554,10 +554,10 @@ export default { ...@@ -554,10 +554,10 @@ export default {
554 kindChange(val) { 554 kindChange(val) {
555 this.selectOption.flightKindlist.forEach(item => { 555 this.selectOption.flightKindlist.forEach(item => {
556 if (item.id == val) { 556 if (item.id == val) {
557 - if (item.chineseName == 'White Tail') { 557 + if (item.chineseName.indexOf('White') >= 0) {
558 this.form.route = '' 558 this.form.route = ''
559 this.routeMultiple = false 559 this.routeMultiple = false
560 - } else if (item.chineseName == 'Purple Tail') { 560 + } else if (item.chineseName.indexOf('Purple') >= 0) {
561 this.form.route = [] 561 this.form.route = []
562 this.routeMultiple = true 562 this.routeMultiple = true
563 } 563 }
......