jinhui.wang

version:0.5.6,bug修复,手动配舱排序增加,查询条件增加,配舱高地价限制增加

...@@ -45,3 +45,11 @@ export function findFltCommonConf(data) { ...@@ -45,3 +45,11 @@ export function findFltCommonConf(data) {
45 45
46 }) 46 })
47 } 47 }
48 +
49 +export function updateStatusBatch(data){
50 + return request({
51 + url: '/FlightPreserveController/updateStatusBatch',
52 + method: 'post',
53 + data: data
54 + })
55 +}
......
1 let ductLabels = { 1 let ductLabels = {
2 "cargoRulesStatus":{ 2 "cargoRulesStatus":{
3 - "1":"动", 3 + "1":"动",
4 - "2":"动" 4 + "2":"动"
5 } 5 }
6 } 6 }
7 7
......
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
30 :fixed="item.fixed" 30 :fixed="item.fixed"
31 :show-overflow-tooltip="showOverflowTooltip" 31 :show-overflow-tooltip="showOverflowTooltip"
32 :sortable="item.sorTable" 32 :sortable="item.sorTable"
33 - header-align="center"
34 :formatter="formatter" 33 :formatter="formatter"
34 + header-align="center"
35 :slotHeader="slotHeader" 35 :slotHeader="slotHeader"
36 :key="index" 36 :key="index"
37 > 37 >
...@@ -188,7 +188,6 @@ export default { ...@@ -188,7 +188,6 @@ export default {
188 this.newHeader = this.headerData; 188 this.newHeader = this.headerData;
189 }, 189 },
190 mounted() { 190 mounted() {
191 -
192 }, 191 },
193 methods: { 192 methods: {
194 nextClick() { 193 nextClick() {
...@@ -218,7 +217,11 @@ export default { ...@@ -218,7 +217,11 @@ export default {
218 this.selectTable.push(this.data[i]); 217 this.selectTable.push(this.data[i]);
219 } 218 }
220 } else if (selection.includes(this.data[row.index])) { 219 } else if (selection.includes(this.data[row.index])) {
221 - for (i = this.start + 1; i <= end; i++) { 220 + if(!selection.includes(this.data[this.start])){
221 + this.$refs.tables.toggleRowSelection(this.data[this.start], true);
222 + this.selectTable.push(this.data[this.start]);
223 + }
224 + for (i = this.start+1; i <= this.start+sum; i++) {
222 this.$refs.tables.toggleRowSelection(this.data[i], true); 225 this.$refs.tables.toggleRowSelection(this.data[i], true);
223 this.selectTable.push(this.data[i]); 226 this.selectTable.push(this.data[i]);
224 } 227 }
...@@ -254,7 +257,9 @@ export default { ...@@ -254,7 +257,9 @@ export default {
254 this.selectTable = [] 257 this.selectTable = []
255 this.$refs.tables.clearSelection() 258 this.$refs.tables.clearSelection()
256 }, 259 },
257 - // itemChange(val) {}, 260 + itemChange(val) {
261 + console.log(val)
262 + },
258 // checkChange(val) { 263 // checkChange(val) {
259 // console.log(val); 264 // console.log(val);
260 // }, 265 // },
......
...@@ -38,11 +38,11 @@ export const constantRoutes = [ ...@@ -38,11 +38,11 @@ export const constantRoutes = [
38 } 38 }
39 ] 39 ]
40 }, 40 },
41 - { 41 + // {
42 - path: '/login', 42 + // path: '/login',
43 - component: (resolve) => require(['@/views/login'], resolve), 43 + // component: (resolve) => require(['@/views/login'], resolve),
44 - hidden: true 44 + // hidden: true
45 - }, 45 + // },
46 { 46 {
47 path: '/404', 47 path: '/404',
48 component: (resolve) => require(['@/views/error/404'], resolve), 48 component: (resolve) => require(['@/views/error/404'], resolve),
...@@ -66,20 +66,20 @@ export const constantRoutes = [ ...@@ -66,20 +66,20 @@ export const constantRoutes = [
66 } 66 }
67 ] 67 ]
68 }, 68 },
69 - { 69 + // {
70 - path: '/user', 70 + // path: '/user',
71 - component: Layout, 71 + // component: Layout,
72 - hidden: true, 72 + // hidden: true,
73 - redirect: 'noredirect', 73 + // redirect: 'noredirect',
74 - children: [ 74 + // children: [
75 - { 75 + // {
76 - path: 'profile', 76 + // path: 'profile',
77 - component: (resolve) => require(['@/views/systemConfig/userConfig/profile/index'], resolve), 77 + // component: (resolve) => require(['@/views/systemConfig/userConfig/profile/index'], resolve),
78 - name: 'Profile', 78 + // name: 'Profile',
79 - meta: { title: '个人中心', icon: 'user' } 79 + // meta: { title: '个人中心', icon: 'user' }
80 - } 80 + // }
81 - ] 81 + // ]
82 - }, 82 + // },
83 { 83 {
84 path: '/', 84 path: '/',
85 component: Layout, 85 component: Layout,
......
...@@ -42,5 +42,5 @@ module.exports = { ...@@ -42,5 +42,5 @@ module.exports = {
42 /** 42 /**
43 * 版本号 43 * 版本号
44 */ 44 */
45 - version:'version:0.5.5.3' 45 + version:'version:0.5.6'
46 } 46 }
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
67 67
68 <script> 68 <script>
69 import { allocationFlight } from "@/api/cargoSelect"; 69 import { allocationFlight } from "@/api/cargoSelect";
70 -import { MessageBox } from 'element-ui' 70 +import { MessageBox } from "element-ui";
71 export default { 71 export default {
72 props: { 72 props: {
73 dialogVisible: { 73 dialogVisible: {
...@@ -82,10 +82,10 @@ export default { ...@@ -82,10 +82,10 @@ export default {
82 data() { 82 data() {
83 return { 83 return {
84 formData: { 84 formData: {
85 - ids:[], 85 + ids: [],
86 fltNo: undefined, 86 fltNo: undefined,
87 - fltDate:undefined, 87 + fltDate: undefined,
88 - overweight:false 88 + overweight: false,
89 }, 89 },
90 cargoHeader: [ 90 cargoHeader: [
91 { name: "口岸代码", value: "portName" }, 91 { name: "口岸代码", value: "portName" },
...@@ -96,101 +96,101 @@ export default { ...@@ -96,101 +96,101 @@ export default {
96 { name: "URSA", value: "ursa" }, 96 { name: "URSA", value: "ursa" },
97 { name: "实际重量", value: "actualWeight" }, 97 { name: "实际重量", value: "actualWeight" },
98 { name: "件数", value: "qty" }, 98 { name: "件数", value: "qty" },
99 + { name: "ACCS原航班号", value: "fltNoAccs" },
100 + { name: "ACCS原航班日期", value: "fltDateAccs" },
99 { name: "品名描述", value: "nameDescription" }, 101 { name: "品名描述", value: "nameDescription" },
100 { name: "是否自动", value: "cargoRulesStatus" }, 102 { name: "是否自动", value: "cargoRulesStatus" },
101 { name: "创建人", value: "createUserName" }, 103 { name: "创建人", value: "createUserName" },
102 { name: "创建时间", value: "createTime" }, 104 { name: "创建时间", value: "createTime" },
103 ], 105 ],
104 - fltHeader: [ 106 + rules: {
105 - { name: "航班日期", value: "fltDate" }, 107 + fltNo: [
106 - { name: "航班号", value: "fltNo" }, 108 + {
107 - { name: "航班路线", value: "route" },
108 - { name: "航班类型", value: "typeName" },
109 - { name: "总重量", value: "totalWeight" },
110 - { name: "额外增重百分比", value: "extraWeightPercent" },
111 - { name: "已配重量", value: "alloctedWeight" },
112 - { name: "配舱优先级", value: "priorityRuleName" },
113 - { name: "是否开启高地价", value: "highLowPriceFlg" },
114 - { name: "航班起飞时间", value: "takeOffTime" },
115 - { name: "创建人", value: "createUserName" },
116 - { name: "创建时间", value: "createTime" },
117 - ],
118 - rules:{
119 - fltNo: [{
120 required: true, 109 required: true,
121 message: "航班号不能为空", 110 message: "航班号不能为空",
122 - trigger: "blur" 111 + trigger: "blur",
123 - }], 112 + },
124 - fltDate: [{ 113 + ],
114 + fltDate: [
115 + {
125 required: true, 116 required: true,
126 message: "航班日期不能为空", 117 message: "航班日期不能为空",
127 - trigger: "change" 118 + trigger: "change",
128 - }], 119 + },
129 - } 120 + ],
121 + },
130 }; 122 };
131 }, 123 },
132 methods: { 124 methods: {
133 - cleaerForm(){ 125 + cleaerForm() {
134 - this.formData={ 126 + this.formData = {
135 - ids:[], 127 + ids: [],
136 fltNo: undefined, 128 fltNo: undefined,
137 - fltDate:undefined, 129 + fltDate: undefined,
138 - overweight:false 130 + overweight: false,
139 - } 131 + };
140 }, 132 },
141 //确定配舱 133 //确定配舱
142 submit() { 134 submit() {
143 let arr = []; 135 let arr = [];
144 - this.tableData.forEach(item => { 136 + this.tableData.forEach((item) => {
145 - arr.push(item.id) 137 + arr.push(item.id);
146 }); 138 });
147 this.formData.ids = arr; 139 this.formData.ids = arr;
148 - if(this.formData.fltNo && this.formData.fltDate){ 140 + if (this.formData.fltNo && this.formData.fltDate) {
149 - allocationFlight(this.formData).then(res=>{//code 200 配舱成功 601 重量已满需要确认 其余code直接输出msg 141 + allocationFlight(this.formData).then((res) => {
150 - if(res.code === 200){ 142 + //code 200 配舱成功 601 重量已满需要确认 其余code直接输出msg
143 + if (res.code === 200) {
151 this.$message({ 144 this.$message({
152 message: "货物配舱成功", 145 message: "货物配舱成功",
153 type: "success", 146 type: "success",
154 }); 147 });
155 - }else if(res.code === 202){ 148 + this.cleaerForm();
156 - MessageBox.confirm('航班配重已满,是否继续配舱?', '提示', { 149 + this.$emit("dialogBeforeClose", { close: false, reload: true });
157 - confirmButtonText: '确定', 150 + } else if (res.code === 202) {
158 - cancelButtonText: '取消', 151 + MessageBox.confirm(res.msg, "提示", {
159 - type: 'warning' 152 + confirmButtonText: "确定",
160 - } 153 + cancelButtonText: "取消",
161 - ).then(() => { 154 + type: "warning",
162 - this.formData.overweight = true;//确定继续overweight变为true再次请求接口 155 + })
163 - allocationFlight(this.formData).then(res=>{ 156 + .then(() => {
164 - if(res.code === 200){ 157 + this.formData.overweight = true; //确定继续overweight变为true再次请求接口
158 + allocationFlight(this.formData).then((res) => {
159 + if (res.code === 200) {
165 this.$message({ 160 this.$message({
166 message: "货物配舱成功", 161 message: "货物配舱成功",
167 type: "success", 162 type: "success",
168 }); 163 });
169 - }else{ 164 + } else {
170 this.$message({ 165 this.$message({
171 message: res.msg, 166 message: res.msg,
172 type: "warning", 167 type: "warning",
173 }); 168 });
174 } 169 }
170 + });
171 + this.cleaerForm();
172 + this.$emit("dialogBeforeClose", { close: false, reload: true });
175 }) 173 })
176 - this.cleaerForm() 174 + .catch(() => {
177 - this.$emit("dialogBeforeClose", {close:false,reload:true}); 175 + //取消 取消当前配舱
178 - }).catch(() => {//取消 取消当前配舱
179 this.$message({ 176 this.$message({
180 message: "配舱已取消", 177 message: "配舱已取消",
181 type: "success", 178 type: "success",
182 }); 179 });
183 - this.cleaerForm() 180 + this.cleaerForm();
184 - this.$emit("dialogBeforeClose", {close:false,reload:false}); 181 + this.$emit("dialogBeforeClose", {
182 + close: false,
183 + reload: false,
184 + });
185 }); 185 });
186 - }else{ 186 + } else {
187 this.$message({ 187 this.$message({
188 message: res.msg, 188 message: res.msg,
189 type: "warning", 189 type: "warning",
190 }); 190 });
191 } 191 }
192 - }) 192 + });
193 - }else{ 193 + } else {
194 this.$message({ 194 this.$message({
195 message: "航班号或航班日期不能为空", 195 message: "航班号或航班日期不能为空",
196 type: "warning", 196 type: "warning",
...@@ -198,8 +198,8 @@ export default { ...@@ -198,8 +198,8 @@ export default {
198 } 198 }
199 }, 199 },
200 dialogBeforeClose() { 200 dialogBeforeClose() {
201 - this.cleaerForm() 201 + this.cleaerForm();
202 - this.$emit("dialogBeforeClose", {close:false,reload:false}); 202 + this.$emit("dialogBeforeClose", { close: false, reload: false });
203 }, 203 },
204 }, 204 },
205 computed: { 205 computed: {
......
1 <template> 1 <template>
2 - <div class="app-container"> 2 + <div>
3 <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" size="medium"> 3 <el-form class="form-header" :model="queryParams" ref="queryForm" label-position="right" label-width="auto" size="medium">
4 <el-row> 4 <el-row>
5 <el-col :span="6"> 5 <el-col :span="6">
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
51 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> 51 <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
52 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> 52 <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
53 <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button> 53 <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
54 - <el-button type="primary" icon="el-icon-circle-check" size="mini" @click="handleFlightStatus('flightStatus10')">航班开启</el-button> 54 + <el-button type="primary" icon="el-icon-circle-check" size="mini" @click="handleFlightStatus('flightStatus10')">自动配舱开启</el-button>
55 - <el-button type="primary" icon="el-icon-circle-close" size="mini" @click="handleFlightStatus('flightStatus80')">航班关闭</el-button> 55 + <el-button type="primary" icon="el-icon-circle-close" size="mini" @click="handleFlightStatus('flightStatus80')">自动配舱关闭</el-button>
56 </el-form> 56 </el-form>
57 <!-- <el-row :gutter="10" class="mb8"> 57 <!-- <el-row :gutter="10" class="mb8">
58 <el-col :span="1.5"> 58 <el-col :span="1.5">
...@@ -178,14 +178,14 @@ ...@@ -178,14 +178,14 @@
178 <el-col :span="12"> 178 <el-col :span="12">
179 <el-form-item label="原始重量(KG)" prop="originalWeight"> 179 <el-form-item label="原始重量(KG)" prop="originalWeight">
180 <el-input-number @change="LowHighAvailable" placeholder="请输入原始重量(KG)" style="width:93%" 180 <el-input-number @change="LowHighAvailable" placeholder="请输入原始重量(KG)" style="width:93%"
181 - v-model="form.originalWeight" :precision="2"></el-input-number> 181 + v-model="form.originalWeight"></el-input-number>
182 </el-form-item> 182 </el-form-item>
183 </el-col> 183 </el-col>
184 184
185 <el-col :span="12"> 185 <el-col :span="12">
186 <el-form-item label="额外增重百分比" prop="extraWeightPercent"> 186 <el-form-item label="额外增重百分比" prop="extraWeightPercent">
187 <el-input-number @change="LowHighAvailable" placeholder="请输入额外增重百分比" style="width:93%" 187 <el-input-number @change="LowHighAvailable" placeholder="请输入额外增重百分比" style="width:93%"
188 - v-model="form.extraWeightPercent" :precision="2"></el-input-number> 188 + v-model="form.extraWeightPercent"></el-input-number>
189 </el-form-item> 189 </el-form-item>
190 </el-col> 190 </el-col>
191 191
...@@ -207,14 +207,14 @@ ...@@ -207,14 +207,14 @@
207 <el-col :span="12"> 207 <el-col :span="12">
208 <el-form-item label="高价百分比" prop="highPriceWeightPercent"> 208 <el-form-item label="高价百分比" prop="highPriceWeightPercent">
209 <el-input-number :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%" 209 <el-input-number :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%"
210 - v-model="form.highPriceWeightPercent" :precision="2"></el-input-number> 210 + v-model="form.highPriceWeightPercent"></el-input-number>
211 </el-form-item> 211 </el-form-item>
212 </el-col> 212 </el-col>
213 213
214 <el-col :span="12"> 214 <el-col :span="12">
215 <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> 215 <el-form-item label="低价百分比" prop="lowPriceWeightPercent">
216 <el-input-number :disabled="true" placeholder="请输入低价百分比" style="width:93%" 216 <el-input-number :disabled="true" placeholder="请输入低价百分比" style="width:93%"
217 - v-model="form.lowPriceWeightPercent" :precision="2"></el-input-number> 217 + v-model="form.lowPriceWeightPercent"></el-input-number>
218 </el-form-item> 218 </el-form-item>
219 </el-col> 219 </el-col>
220 220
...@@ -541,7 +541,6 @@ ...@@ -541,7 +541,6 @@
541 }, 541 },
542 //计算高地价可配 542 //计算高地价可配
543 LowHighAvailable() { 543 LowHighAvailable() {
544 -
545 //判断是否开启高地价 544 //判断是否开启高地价
546 if (this.form.highLowPriceFlg) { 545 if (this.form.highLowPriceFlg) {
547 this.ishighPriceWeightPercent=false; 546 this.ishighPriceWeightPercent=false;
...@@ -556,21 +555,33 @@ ...@@ -556,21 +555,33 @@
556 this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form 555 this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form
557 .highPriceWeightPercent / 100)); 556 .highPriceWeightPercent / 100));
558 // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) 557 // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100)
559 - } else { 558 + }else if(this.title == "修改航班信息" && this.form.highPriceWeightPercent > 0){
559 + if(this.form.highAvailableWeight){
560 + this.$set(this.form, 'highAvailableWeight', this.form.highAvailableWeight)
561 + }else{
562 + this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form
563 + .highPriceWeightPercent / 100));
564 + }
565 + }else {
560 this.$set(this.form, "highAvailableWeight", 0); 566 this.$set(this.form, "highAvailableWeight", 0);
561 // this.form.HighAvailableWeight = 0; 567 // this.form.HighAvailableWeight = 0;
562 } 568 }
563 //低价可配 569 //低价可配
564 if (this.form.lowPriceWeightPercent > 0) { 570 if (this.form.lowPriceWeightPercent > 0) {
565 -
566 this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form 571 this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form
567 .highAvailableWeight); 572 .highAvailableWeight);
568 //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; 573 //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
569 - } else { 574 + }else if(this.title == "修改航班信息" && this.form.lowPriceWeightPercent > 0){
575 + if(this.form.lowAvailableWeight){
576 + this.$set(this.form, 'lowAvailableWeight', this.form.lowAvailableWeight)
577 + }else{
578 + this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form
579 + .highAvailableWeight);
580 + }
581 + }else {
570 this.$set(this.form, "lowAvailableWeight", 0); 582 this.$set(this.form, "lowAvailableWeight", 0);
571 // this.form.lowAvailableWeight = 0; 583 // this.form.lowAvailableWeight = 0;
572 } 584 }
573 -
574 }else{ 585 }else{
575 this.ishighPriceWeightPercent=true; 586 this.ishighPriceWeightPercent=true;
576 } 587 }
...@@ -581,7 +592,7 @@ ...@@ -581,7 +592,7 @@
581 let Weight = 0; 592 let Weight = 0;
582 if (this.form.extraWeightPercent > 0) { 593 if (this.form.extraWeightPercent > 0) {
583 Weight = this.form.originalWeight + this.form.originalWeight * (this.form.extraWeightPercent / 100) 594 Weight = this.form.originalWeight + this.form.originalWeight * (this.form.extraWeightPercent / 100)
584 - } else { 595 + }else {
585 Weight = this.form.originalWeight; 596 Weight = this.form.originalWeight;
586 } 597 }
587 return Weight; 598 return Weight;
......