jinhui.wang

version:0.5.7,件数重量输入限制,页面缓存,数值精度修改,代码优化,bug修复

...@@ -15,13 +15,18 @@ ...@@ -15,13 +15,18 @@
15 :lazy="lazy" 15 :lazy="lazy"
16 :downShiftKey="shiftKey" 16 :downShiftKey="shiftKey"
17 :limitStart="limitStart" 17 :limitStart="limitStart"
18 + :row-key="rowKey"
19 + :default-expand-all="defaultExpandAll"
20 + :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
18 v-loading="loading" 21 v-loading="loading"
22 + @sort-change="sortChange"
19 @select="tableSelect" 23 @select="tableSelect"
20 @select-all="tableSelectAll" 24 @select-all="tableSelectAll"
21 @select-change="SelectChange" 25 @select-change="SelectChange"
22 > 26 >
23 <el-table-column 27 <el-table-column
24 - v-for="(item, index) in newHeader" 28 + v-for="(item, index) in headerData"
29 + :column-key="item.value"
25 :type="item.type" 30 :type="item.type"
26 :prop="item.value" 31 :prop="item.value"
27 :label="item.name" 32 :label="item.name"
...@@ -32,12 +37,13 @@ ...@@ -32,12 +37,13 @@
32 :sortable="item.sorTable" 37 :sortable="item.sorTable"
33 :formatter="formatter" 38 :formatter="formatter"
34 header-align="center" 39 header-align="center"
40 + :sort-orders="['descending', 'ascending', null]"
35 :slotHeader="slotHeader" 41 :slotHeader="slotHeader"
36 :key="index" 42 :key="index"
37 > 43 >
38 - <template v-if="item.slot" slot-scope=""> 44 + <!-- <template v-if="item.slot" slot-scope="">
39 <Item :dom="item.slot" @change="itemChange"></Item> 45 <Item :dom="item.slot" @change="itemChange"></Item>
40 - </template> 46 + </template> -->
41 </el-table-column> 47 </el-table-column>
42 <slot></slot> 48 <slot></slot>
43 </el-table> 49 </el-table>
...@@ -64,8 +70,8 @@ ...@@ -64,8 +70,8 @@
64 <script> 70 <script>
65 // import infoTable from "./info.vue"; 71 // import infoTable from "./info.vue";
66 import Item from "./item.vue"; 72 import Item from "./item.vue";
67 -import dictLabels from "../../assets/languages/dictLabels.js" 73 +import dictLabels from "../../assets/languages/dictLabels.js";
68 -import { scrollTo } from '@/utils/scroll-to' 74 +import { scrollTo } from "@/utils/scroll-to";
69 export default { 75 export default {
70 name: "Table", 76 name: "Table",
71 components: { 77 components: {
...@@ -136,9 +142,9 @@ export default { ...@@ -136,9 +142,9 @@ export default {
136 type: Boolean, 142 type: Boolean,
137 default: true, 143 default: true,
138 }, 144 },
139 - shiftKey:{ 145 + shiftKey: {
140 - type:Boolean, 146 + type: Boolean,
141 - default:false, 147 + default: false,
142 }, 148 },
143 page: { 149 page: {
144 type: Number, 150 type: Number,
...@@ -148,9 +154,9 @@ export default { ...@@ -148,9 +154,9 @@ export default {
148 type: Number, 154 type: Number,
149 default: 20, 155 default: 20,
150 }, 156 },
151 - limitStart:{ 157 + limitStart: {
152 - type:Number, 158 + type: Number,
153 - default:0, 159 + default: 0,
154 }, 160 },
155 paginationBackground: { 161 paginationBackground: {
156 type: Boolean, 162 type: Boolean,
...@@ -164,6 +170,14 @@ export default { ...@@ -164,6 +170,14 @@ export default {
164 type: Number, 170 type: Number,
165 default: 0, 171 default: 0,
166 }, 172 },
173 + rowKey: {
174 + type: String,
175 + default: "",
176 + },
177 + defaultExpandAll: {
178 + type: Boolean,
179 + default: false,
180 + },
167 }, 181 },
168 inheritAttrs: false, 182 inheritAttrs: false,
169 data() { 183 data() {
...@@ -171,7 +185,7 @@ export default { ...@@ -171,7 +185,7 @@ export default {
171 newHeader: [], 185 newHeader: [],
172 selectTable: [], 186 selectTable: [],
173 pageNum: 1, 187 pageNum: 1,
174 - start:-1, 188 + start: -1,
175 // { 189 // {
176 // type: "selection", 190 // type: "selection",
177 // name: "", 191 // name: "",
...@@ -187,20 +201,28 @@ export default { ...@@ -187,20 +201,28 @@ export default {
187 created() { 201 created() {
188 this.newHeader = this.headerData; 202 this.newHeader = this.headerData;
189 }, 203 },
190 - mounted() { 204 + mounted() {},
191 - },
192 methods: { 205 methods: {
193 nextClick() { 206 nextClick() {
194 - this.$emit('currentChange',{page:this.pageNum + 1,start:this.limitStart + this.limitSize}) 207 + this.$emit("currentChange", {
195 - scrollTo(0,800); 208 + page: this.pageNum + 1,
209 + start: this.limitStart + this.limitSize,
210 + });
211 + scrollTo(0, 800);
196 }, 212 },
197 prevClick() { 213 prevClick() {
198 - this.$emit('currentChange',{page:this.pageNum - 1,start:this.limitStart - this.limitSiz}) 214 + this.$emit("currentChange", {
199 - scrollTo(0,800); 215 + page: this.pageNum - 1,
216 + start: this.limitStart - this.limitSiz,
217 + });
218 + scrollTo(0, 800);
200 }, 219 },
201 currentChange(val) { 220 currentChange(val) {
202 - this.$emit('currentChange',{page:val,start: val*this.limitSize+1}); 221 + this.$emit("currentChange", {
203 - scrollTo(0,800); 222 + page: val,
223 + start: val * this.limitSize + 1,
224 + });
225 + scrollTo(0, 800);
204 }, 226 },
205 tableSelect(selection, row) { 227 tableSelect(selection, row) {
206 let end = row.index; 228 let end = row.index;
...@@ -208,20 +230,17 @@ export default { ...@@ -208,20 +230,17 @@ export default {
208 const sum = Math.abs(this.start - end); 230 const sum = Math.abs(this.start - end);
209 const min = Math.min(this.start, end); 231 const min = Math.min(this.start, end);
210 let i; 232 let i;
211 - if ( 233 + if (this.start === -1 && selection.includes(this.data[row.index])) {
212 - this.start === -1 &&
213 - selection.includes(this.data[row.index])
214 - ) {
215 for (i = 0; i < sum; i++) { 234 for (i = 0; i < sum; i++) {
216 this.$refs.tables.toggleRowSelection(this.data[i], true); 235 this.$refs.tables.toggleRowSelection(this.data[i], true);
217 this.selectTable.push(this.data[i]); 236 this.selectTable.push(this.data[i]);
218 } 237 }
219 } else if (selection.includes(this.data[row.index])) { 238 } else if (selection.includes(this.data[row.index])) {
220 - if(!selection.includes(this.data[this.start])){ 239 + if (!selection.includes(this.data[this.start])) {
221 this.$refs.tables.toggleRowSelection(this.data[this.start], true); 240 this.$refs.tables.toggleRowSelection(this.data[this.start], true);
222 this.selectTable.push(this.data[this.start]); 241 this.selectTable.push(this.data[this.start]);
223 } 242 }
224 - for (i = this.start+1; i <= this.start+sum; i++) { 243 + for (i = this.start + 1; i <= this.start + sum; i++) {
225 this.$refs.tables.toggleRowSelection(this.data[i], true); 244 this.$refs.tables.toggleRowSelection(this.data[i], true);
226 this.selectTable.push(this.data[i]); 245 this.selectTable.push(this.data[i]);
227 } 246 }
...@@ -244,7 +263,7 @@ export default { ...@@ -244,7 +263,7 @@ export default {
244 } 263 }
245 } 264 }
246 } 265 }
247 - selection = this.selectTable 266 + selection = this.selectTable;
248 this.$emit("tableSelect", { selection, row }); 267 this.$emit("tableSelect", { selection, row });
249 }, 268 },
250 tableSelectAll(selection) { 269 tableSelectAll(selection) {
...@@ -253,13 +272,13 @@ export default { ...@@ -253,13 +272,13 @@ export default {
253 SelectChange(selection) { 272 SelectChange(selection) {
254 this.$emit("SelectChange", selection); 273 this.$emit("SelectChange", selection);
255 }, 274 },
256 - clearTable(){ 275 + clearTable() {
257 - this.selectTable = [] 276 + this.selectTable = [];
258 - this.$refs.tables.clearSelection() 277 + this.$refs.tables.clearSelection();
259 - },
260 - itemChange(val) {
261 - console.log(val)
262 }, 278 },
279 + // itemChange(val) {
280 + // console.log(val);
281 + // },
263 // checkChange(val) { 282 // checkChange(val) {
264 // console.log(val); 283 // console.log(val);
265 // }, 284 // },
...@@ -269,10 +288,29 @@ export default { ...@@ -269,10 +288,29 @@ export default {
269 // bottom(val) { 288 // bottom(val) {
270 // console.log(val); 289 // console.log(val);
271 // }, 290 // },
291 + sortChange({ column, prop, order }) {
292 + this.$emit("sortChange",{prop:prop, order:order})
293 + },
294 + compare(propertyName, sort) {
295 + return function (obj1, obj2) {
296 + var value1 = obj1[propertyName];
297 + var value2 = obj2[propertyName];
298 + if (typeof value1 === "string" && typeof value2 === "string") {
299 + const res = value1.localeCompare(value2, "zh");
300 + return sort === "ascending" ? res : -res;
301 + } else {
302 + if (value1 <= value2) {
303 + return sort === "ascending" ? -1 : 1;
304 + } else if (value1 > value2) {
305 + return sort === "ascending" ? 1 : -1;
306 + }
307 + }
308 + };
309 + },
272 formatter(row, column, cellValue, index) { 310 formatter(row, column, cellValue, index) {
273 - if(dictLabels[column.property]){ 311 + if (dictLabels[column.property]) {
274 - if(dictLabels[column.property][cellValue]){ 312 + if (dictLabels[column.property][cellValue]) {
275 - return dictLabels[column.property][cellValue]; 313 + return dictLabels[column.property][cellValue];
276 } 314 }
277 } 315 }
278 return cellValue; 316 return cellValue;
......
...@@ -42,5 +42,5 @@ module.exports = { ...@@ -42,5 +42,5 @@ module.exports = {
42 /** 42 /**
43 * 版本号 43 * 版本号
44 */ 44 */
45 - version:'version:0.5.6' 45 + version:'version:0.5.7'
46 } 46 }
......
...@@ -177,6 +177,6 @@ export function handleTree(data, id, parentId, children) { ...@@ -177,6 +177,6 @@ export function handleTree(data, id, parentId, children) {
177 177
178 //字符串英文转大写,;转英文; 178 //字符串英文转大写,;转英文;
179 export function upCase(str){ 179 export function upCase(str){
180 - let newStr = str.replace(/;/g,";").toUpperCase(); 180 + let newStr = str.replace(/;/g,";").toUpperCase().trim();
181 return newStr; 181 return newStr;
182 } 182 }
...\ No newline at end of file ...\ No newline at end of file
......
1 import axios from 'axios' 1 import axios from 'axios'
2 import { Message,MessageBox } from 'element-ui' 2 import { Message,MessageBox } from 'element-ui'
3 import store from '@/store' 3 import store from '@/store'
4 -import { getToken } from '@/utils/auth' 4 +import { getToken,setToken } from '@/utils/auth'
5 import errorCode from '@/utils/errorCode' 5 import errorCode from '@/utils/errorCode'
6 6
7 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' 7 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
...@@ -9,9 +9,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' ...@@ -9,9 +9,9 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
9 const service = axios.create({ 9 const service = axios.create({
10 // axios中请求配置有baseURL选项,表示请求URL公共部分 10 // axios中请求配置有baseURL选项,表示请求URL公共部分
11 //baseURL: process.env.VUE_APP_BASE_API, 11 //baseURL: process.env.VUE_APP_BASE_API,
12 - // baseURL: `http://47.103.140.98:7001/IMAC2`, 12 + // baseURL: `http://47.103.140.98:7001/iMAC`,
13 baseURL: 'https://imacuat.zmd.apac.fedex.com/iMAC', 13 baseURL: 'https://imacuat.zmd.apac.fedex.com/iMAC',
14 - // baseURL: 'http://192.168.1.133:7001/IMAC2', 14 + // baseURL: 'http://192.168.1.133:7001/iMAC',
15 15
16 // 超时 16 // 超时
17 timeout: 30000, 17 timeout: 30000,
...@@ -53,6 +53,9 @@ service.interceptors.request.use(config => { ...@@ -53,6 +53,9 @@ service.interceptors.request.use(config => {
53 53
54 // 响应拦截器 54 // 响应拦截器
55 service.interceptors.response.use(res => { 55 service.interceptors.response.use(res => {
56 + if(res.headers['token']){
57 + setToken(decodeURI(res.headers['token']))
58 + }
56 // 未设置状态码则默认成功状态 59 // 未设置状态码则默认成功状态
57 const code = res.data.code || 200; 60 const code = res.data.code || 200;
58 // 获取错误信息 61 // 获取错误信息
......
...@@ -6,8 +6,8 @@ const mimeMap = { ...@@ -6,8 +6,8 @@ const mimeMap = {
6 zip: 'application/zip' 6 zip: 'application/zip'
7 } 7 }
8 const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器 8 const baseUrl = 'https://imacuat.zmd.apac.fedex.com/iMAC' //uat服务器
9 -// const baseUrl = 'http://47.103.140.98:7001/IMAC2' //阿里云服务器 9 +// const baseUrl = 'http://47.103.140.98:7001/iMAC' //阿里云服务器
10 -// const baseUrl = 'http://192.168.1.133:7001/IMAC2' //测试服务器 10 +// const baseUrl = 'http://192.168.1.133:7001/iMAC' //测试服务器
11 11
12 export function downLoadZip(str, filename) { 12 export function downLoadZip(str, filename) {
13 var url = baseUrl + str 13 var url = baseUrl + str
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
3 <el-form 3 <el-form
4 ref="form" 4 ref="form"
5 v-model="formData" 5 v-model="formData"
6 - v-show="formShow"
7 class="form-header" 6 class="form-header"
8 label-position="right" 7 label-position="right"
9 label-width="auto" 8 label-width="auto"
...@@ -35,6 +34,26 @@ ...@@ -35,6 +34,26 @@
35 </el-form-item> 34 </el-form-item>
36 </el-col> 35 </el-col>
37 <el-col :span="6"> 36 <el-col :span="6">
37 + <el-form-item label="海关回执状态">
38 + <el-select
39 + placeholder="不限"
40 + v-model="formData.customsReceiptStatusId"
41 + class="formItem"
42 + multiple
43 + clearable
44 + >
45 + <el-option
46 + v-for="item in selectData.findConditionData
47 + .cargoCustomsReturnStatus"
48 + :label="item.chineseName"
49 + :value="item.id"
50 + :key="item.id"
51 + >
52 + </el-option>
53 + </el-select>
54 + </el-form-item>
55 + </el-col>
56 + <el-col :span="6">
38 <el-form-item label="货物状态"> 57 <el-form-item label="货物状态">
39 <el-select 58 <el-select
40 placeholder="不限" 59 placeholder="不限"
...@@ -58,7 +77,7 @@ ...@@ -58,7 +77,7 @@
58 class="formItem" 77 class="formItem"
59 type="textarea" 78 type="textarea"
60 placeholder="请输入运单号(回车分割)" 79 placeholder="请输入运单号(回车分割)"
61 - v-model="formData.waybillNo" 80 + v-model.trim="formData.waybillNo"
62 rows="1" 81 rows="1"
63 ></el-input> 82 ></el-input>
64 </el-form-item> 83 </el-form-item>
...@@ -208,26 +227,6 @@ ...@@ -208,26 +227,6 @@
208 ></el-input> 227 ></el-input>
209 </el-form-item> 228 </el-form-item>
210 </el-col> 229 </el-col>
211 - <el-col :span="6">
212 - <el-form-item label="海关回执状态">
213 - <el-select
214 - placeholder="不限"
215 - v-model="formData.customsReceiptStatusId"
216 - class="formItem"
217 - multiple
218 - clearable
219 - >
220 - <el-option
221 - v-for="item in selectData.findConditionData
222 - .cargoCustomsReturnStatus"
223 - :label="item.chineseName"
224 - :value="item.id"
225 - :key="item.id"
226 - >
227 - </el-option>
228 - </el-select>
229 - </el-form-item>
230 - </el-col>
231 <el-col :span="24"> 230 <el-col :span="24">
232 <el-form-item label="Handling Code"> 231 <el-form-item label="Handling Code">
233 <el-empty 232 <el-empty
...@@ -316,6 +315,7 @@ ...@@ -316,6 +315,7 @@
316 @tableSelect="tableSelect" 315 @tableSelect="tableSelect"
317 @tableSelectAll="tableSelectAll" 316 @tableSelectAll="tableSelectAll"
318 @currentChange="currentChange" 317 @currentChange="currentChange"
318 + @sortChange="sortChange"
319 ></Tables> 319 ></Tables>
320 <Dialog 320 <Dialog
321 :tableData="tableSelection" 321 :tableData="tableSelection"
...@@ -334,6 +334,7 @@ import { downLoadXlsx } from "@/utils/zipdownload"; ...@@ -334,6 +334,7 @@ import { downLoadXlsx } from "@/utils/zipdownload";
334 import { upCase } from "@/utils/FedEx"; 334 import { upCase } from "@/utils/FedEx";
335 335
336 export default { 336 export default {
337 + name:"CargoAllocation",
337 components: { 338 components: {
338 Dialog, 339 Dialog,
339 }, 340 },
...@@ -815,7 +816,6 @@ export default { ...@@ -815,7 +816,6 @@ export default {
815 shiftKey: false, 816 shiftKey: false,
816 createDate: null, 817 createDate: null,
817 loading: false, 818 loading: false,
818 - formShow:true,
819 downLoadingTip: { 819 downLoadingTip: {
820 tip: "", 820 tip: "",
821 downloading: false, 821 downloading: false,
...@@ -868,11 +868,6 @@ export default { ...@@ -868,11 +868,6 @@ export default {
868 }); 868 });
869 }, 869 },
870 mounted() { 870 mounted() {
871 - // this.selectData.HandlingCode.forEach((item,index)=>{
872 - // if(item.id === 108093){
873 - // this.selectData.HandlingCode.unshift(this.HandlingCode.splice(index,1)[0])
874 - // }
875 - // })
876 window.addEventListener("keydown", (code) => { 871 window.addEventListener("keydown", (code) => {
877 if (code.keyCode === 16 && code.shiftKey) { 872 if (code.keyCode === 16 && code.shiftKey) {
878 this.shiftKey = true; 873 this.shiftKey = true;
...@@ -885,6 +880,7 @@ export default { ...@@ -885,6 +880,7 @@ export default {
885 }); 880 });
886 }, 881 },
887 methods: { 882 methods: {
883 + //查询
888 select() { 884 select() {
889 this.loading = true; 885 this.loading = true;
890 this.dataInfo(); 886 this.dataInfo();
...@@ -915,6 +911,7 @@ export default { ...@@ -915,6 +911,7 @@ export default {
915 this.loading = false; 911 this.loading = false;
916 }); 912 });
917 }, 913 },
914 + //总和
918 cargoTotal() { 915 cargoTotal() {
919 this.allWeight = 0; 916 this.allWeight = 0;
920 this.allQty = 0; 917 this.allQty = 0;
...@@ -923,10 +920,11 @@ export default { ...@@ -923,10 +920,11 @@ export default {
923 this.allWeight = this.allWeight + item.actualWeight; 920 this.allWeight = this.allWeight + item.actualWeight;
924 this.allQty = this.allQty + item.qty; 921 this.allQty = this.allQty + item.qty;
925 }); 922 });
926 - this.allWeight = this.allWeight.toFixed(); 923 + this.allWeight = this.allWeight.toFixed(2);
927 this.allQty = this.allQty.toFixed(); 924 this.allQty = this.allQty.toFixed();
928 } 925 }
929 }, 926 },
927 + //数据初始化
930 dataInfo() { 928 dataInfo() {
931 this.formData.ursaList = null; 929 this.formData.ursaList = null;
932 this.formData.siteNameList = null; 930 this.formData.siteNameList = null;
...@@ -972,6 +970,7 @@ export default { ...@@ -972,6 +970,7 @@ export default {
972 this.formData.page = this.page; 970 this.formData.page = this.page;
973 this.formData.size = this.size; 971 this.formData.size = this.size;
974 }, 972 },
973 + //导出表格
975 xlsx(val) { 974 xlsx(val) {
976 this.downLoadingTip.downloading = true; 975 this.downLoadingTip.downloading = true;
977 this.dataInfo(); 976 this.dataInfo();
...@@ -999,19 +998,27 @@ export default { ...@@ -999,19 +998,27 @@ export default {
999 }); 998 });
1000 } 999 }
1001 }, 1000 },
1001 + //表格选择
1002 tableSelect(val) { 1002 tableSelect(val) {
1003 this.tableSelection = val.selection; 1003 this.tableSelection = val.selection;
1004 this.cargoTotal(); 1004 this.cargoTotal();
1005 }, 1005 },
1006 + //表格全选
1006 tableSelectAll(val) { 1007 tableSelectAll(val) {
1007 this.tableSelection = val; 1008 this.tableSelection = val;
1008 this.cargoTotal(); 1009 this.cargoTotal();
1009 }, 1010 },
1011 + //分页
1010 currentChange(val) { 1012 currentChange(val) {
1011 this.formData.limitStart = val.start; 1013 this.formData.limitStart = val.start;
1012 this.page = val.page; 1014 this.page = val.page;
1013 this.select(); 1015 this.select();
1014 }, 1016 },
1017 + //排序
1018 + sortChange(val){
1019 + this.tableData.sort(this.$refs.newTables.compare(val.prop,val.order));
1020 + },
1021 + //添加到航班
1015 addFit() { 1022 addFit() {
1016 let open = true; 1023 let open = true;
1017 this.tableSelection.forEach((item) => { 1024 this.tableSelection.forEach((item) => {
...@@ -1031,6 +1038,7 @@ export default { ...@@ -1031,6 +1038,7 @@ export default {
1031 this.$refs.newTables.clearTable(); 1038 this.$refs.newTables.clearTable();
1032 } 1039 }
1033 }, 1040 },
1041 + //关闭弹框
1034 dialogBeforeClose(val) { 1042 dialogBeforeClose(val) {
1035 this.dialogVisible = val.close; 1043 this.dialogVisible = val.close;
1036 if (val.reload) { 1044 if (val.reload) {
......
...@@ -127,6 +127,7 @@ import { ...@@ -127,6 +127,7 @@ import {
127 import { parseTime } from "@/utils/FedEx"; 127 import { parseTime } from "@/utils/FedEx";
128 128
129 export default { 129 export default {
130 + name:"FlightAllocConfig",
130 data() { 131 data() {
131 return { 132 return {
132 queryParams: { 133 queryParams: {
......
...@@ -110,23 +110,24 @@ ...@@ -110,23 +110,24 @@
110 110
111 <el-form-item label="件数"> 111 <el-form-item label="件数">
112 <el-col :span="3"> 112 <el-col :span="3">
113 - <!-- <el-input v-model="form.minNumOfPieces"></el-input> --> 113 + <el-input
114 - <el-input-number 114 + class="numberInput"
115 - v-model=" 115 + v-model.trim="minNumOfPieces"
116 - form.minNumOfPieces == 0 116 + ></el-input>
117 - ? (form.minNumOfPieces = undefined) 117 + <!-- <el-input-number
118 - : form.minNumOfPieces 118 + v-model="minNumOfPieces"
119 - "
120 :precision="0" 119 :precision="0"
121 :controls="false" 120 :controls="false"
122 style="width: 100%" 121 style="width: 100%"
123 - :min="1" 122 + ></el-input-number> -->
124 - ></el-input-number>
125 </el-col> 123 </el-col>
126 <el-col style="text-align: center" :span="1">-</el-col> 124 <el-col style="text-align: center" :span="1">-</el-col>
127 <el-col :span="3"> 125 <el-col :span="3">
128 - <!-- <el-input v-model="form.maxNumOfPieces"></el-input> --> 126 + <el-input
129 - <el-input-number 127 + class="numberInput"
128 + v-model.trim="maxNumOfPieces"
129 + ></el-input>
130 + <!-- <el-input-number
130 v-model=" 131 v-model="
131 form.maxNumOfPieces == 0 132 form.maxNumOfPieces == 0
132 ? (form.maxNumOfPieces = undefined) 133 ? (form.maxNumOfPieces = undefined)
...@@ -135,15 +136,14 @@ ...@@ -135,15 +136,14 @@
135 :precision="0" 136 :precision="0"
136 :controls="false" 137 :controls="false"
137 style="width: 100%" 138 style="width: 100%"
138 - :min="form.minNumOfPieces" 139 + ></el-input-number> -->
139 - ></el-input-number>
140 </el-col> 140 </el-col>
141 </el-form-item> 141 </el-form-item>
142 142
143 <el-form-item label="重量"> 143 <el-form-item label="重量">
144 <el-col :span="3"> 144 <el-col :span="3">
145 - <!-- <el-input v-model="form.minWeight"></el-input> --> 145 + <el-input class="numberInput" v-model.trim="minWeight"></el-input>
146 - <el-input-number 146 + <!-- <el-input-number
147 v-model=" 147 v-model="
148 form.minWeight == 0 148 form.minWeight == 0
149 ? (form.minWeight = undefined) 149 ? (form.minWeight = undefined)
...@@ -152,14 +152,13 @@ ...@@ -152,14 +152,13 @@
152 :precision="2" 152 :precision="2"
153 :controls="false" 153 :controls="false"
154 style="width: 100%" 154 style="width: 100%"
155 - :min="0.01" 155 + ></el-input-number> -->
156 - ></el-input-number>
157 </el-col> 156 </el-col>
158 <el-col :span="1" style="text-align: center"><span>Kg</span></el-col> 157 <el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
159 <el-col style="text-align: center" :span="1">-</el-col> 158 <el-col style="text-align: center" :span="1">-</el-col>
160 <el-col :span="3"> 159 <el-col :span="3">
161 - <!-- <el-input v-model="form.maxWeight"></el-input> --> 160 + <el-input class="numberInput" v-model.trim="maxWeight"></el-input>
162 - <el-input-number 161 + <!-- <el-input-number
163 v-model=" 162 v-model="
164 form.maxWeight == 0 163 form.maxWeight == 0
165 ? (form.maxWeight = undefined) 164 ? (form.maxWeight = undefined)
...@@ -168,8 +167,7 @@ ...@@ -168,8 +167,7 @@
168 :precision="2" 167 :precision="2"
169 :controls="false" 168 :controls="false"
170 style="width: 100%" 169 style="width: 100%"
171 - :min="form.minWeight" 170 + ></el-input-number> -->
172 - ></el-input-number>
173 </el-col> 171 </el-col>
174 <el-col :span="1" style="text-align: center"><span>Kg</span></el-col> 172 <el-col :span="1" style="text-align: center"><span>Kg</span></el-col>
175 </el-form-item> 173 </el-form-item>
...@@ -282,6 +280,10 @@ export default { ...@@ -282,6 +280,10 @@ export default {
282 data() { 280 data() {
283 return { 281 return {
284 form: { 282 form: {
283 + minNumOfPieces: undefined,
284 + maxNumOfPieces: undefined,
285 + minWeight: undefined,
286 + maxWeight: undefined,
285 typeOfGoods: [], 287 typeOfGoods: [],
286 declarationCategory: [], 288 declarationCategory: [],
287 serviceCode: [], 289 serviceCode: [],
...@@ -497,10 +499,10 @@ export default { ...@@ -497,10 +499,10 @@ export default {
497 ? info.subCategory.split(";") 499 ? info.subCategory.split(";")
498 : []; 500 : [];
499 this.form = info; 501 this.form = info;
500 - if (info.location != null || info.location == "") { 502 + if (info.notLocation != null || info.notLocation == "") {
501 - this.isLocation = "1";
502 - } else {
503 this.isLocation = "2"; 503 this.isLocation = "2";
504 + } else {
505 + this.isLocation = "1";
504 } 506 }
505 this.isNeedRequired = info.isNeedRequired; 507 this.isNeedRequired = info.isNeedRequired;
506 } 508 }
...@@ -534,10 +536,10 @@ export default { ...@@ -534,10 +536,10 @@ export default {
534 ? info.subCategory.split(";") 536 ? info.subCategory.split(";")
535 : []; 537 : [];
536 this.form = info; 538 this.form = info;
537 - if (info.location != null || info.location == "") { 539 + if (info.notLocation != null || info.notLocation == "") {
538 - this.isLocation = "1";
539 - } else {
540 this.isLocation = "2"; 540 this.isLocation = "2";
541 + } else {
542 + this.isLocation = "1";
541 } 543 }
542 let isNeedRequired = response.data.isNeedRequired; 544 let isNeedRequired = response.data.isNeedRequired;
543 this.form.isNeedRequired = isNeedRequired; 545 this.form.isNeedRequired = isNeedRequired;
...@@ -550,6 +552,56 @@ export default { ...@@ -550,6 +552,56 @@ export default {
550 this.loading = false; 552 this.loading = false;
551 } 553 }
552 }, 554 },
555 + computed: {
556 + minNumOfPieces: {
557 + get: function () {
558 + return this.form.minNumOfPieces;
559 + },
560 + set: function (val) {
561 + if (val == 0 || val == null || val == "-") {
562 + this.form.minNumOfPieces = undefined;
563 + } else if (!isNaN(val)) {
564 + this.form.minNumOfPieces = val;
565 + }
566 + },
567 + },
568 + maxNumOfPieces: {
569 + get: function () {
570 + return this.form.maxNumOfPieces;
571 + },
572 + set: function (val) {
573 + if (val == 0 || val == null || val == "-") {
574 + this.form.maxNumOfPieces = undefined;
575 + } else if (!isNaN(val)) {
576 + this.form.maxNumOfPieces = val;
577 + }
578 + },
579 + },
580 + minWeight: {
581 + get: function () {
582 + return this.form.minWeight;
583 + },
584 + set: function (val) {
585 + if (val == 0 || val == null || val == "-") {
586 + this.form.minWeight = undefined;
587 + } else if (!isNaN(val)) {
588 + this.form.minWeight = val;
589 + }
590 + },
591 + },
592 + maxWeight: {
593 + get: function () {
594 + return this.form.maxWeight;
595 + },
596 + set: function (val) {
597 + if (val == 0 || val == null || val == "-") {
598 + this.form.maxWeight = undefined;
599 + } else if (!isNaN(val)) {
600 + this.form.maxWeight = val;
601 + }
602 + },
603 + },
604 + },
553 }; 605 };
554 </script> 606 </script>
555 <style rel="stylesheet/scss" lang="scss"> 607 <style rel="stylesheet/scss" lang="scss">
...@@ -578,4 +630,9 @@ export default { ...@@ -578,4 +630,9 @@ export default {
578 .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner { 630 .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
579 border-color: #606266; 631 border-color: #606266;
580 } 632 }
633 +.numberInput {
634 + input {
635 + text-align: center;
636 + }
637 +}
581 </style> 638 </style>
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
150 findSourceFlightAndFlightDateApi 150 findSourceFlightAndFlightDateApi
151 } from "@/api/sourceFlightRules"; 151 } from "@/api/sourceFlightRules";
152 export default { 152 export default {
153 - name: "SourceFlightRules", 153 + name: "FlightRandConfig",
154 data() { 154 data() {
155 return { 155 return {
156 // data 中设定 156 // data 中设定
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
44 importcaPreReview, 44 importcaPreReview,
45 } from "@/api/caPreReviewImport"; 45 } from "@/api/caPreReviewImport";
46 export default { 46 export default {
47 + name:"CAPreReviewImport",
47 data() { 48 data() {
48 return { 49 return {
49 // 遮罩层 50 // 遮罩层
......
...@@ -73,6 +73,7 @@ import { ...@@ -73,6 +73,7 @@ import {
73 importFlight, 73 importFlight,
74 } from "@/api/flightInfoImport"; 74 } from "@/api/flightInfoImport";
75 export default { 75 export default {
76 + name:"FlightInformationImport",
76 data() { 77 data() {
77 return { 78 return {
78 flightType: [], 79 flightType: [],
......
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
277 277
278 } from "@/api/findAllFltData"; 278 } from "@/api/findAllFltData";
279 export default { 279 export default {
280 - name: "findAllFltData", 280 + name: "FlightInformationMaintenance",
281 data() { 281 data() {
282 return { 282 return {
283 //高价百分比是否打开 283 //高价百分比是否打开
......
...@@ -35,7 +35,7 @@ module.exports = { ...@@ -35,7 +35,7 @@ module.exports = {
35 // detail: https://cli.vuejs.org/config/#devserver-proxy 35 // detail: https://cli.vuejs.org/config/#devserver-proxy
36 [process.env.VUE_APP_BASE_API]: { 36 [process.env.VUE_APP_BASE_API]: {
37 target: `https://imacuat.zmd.apac.fedex.com/iMAC`, 37 target: `https://imacuat.zmd.apac.fedex.com/iMAC`,
38 - // target: `http://47.103.140.98:7001/IMAC2`, 38 + // target: `http://47.103.140.98:7001/iMAC`,
39 // target: `http://192.168.1.134:18080`, 39 // target: `http://192.168.1.134:18080`,
40 changeOrigin: true, 40 changeOrigin: true,
41 pathRewrite: { 41 pathRewrite: {
......