正在显示
1 个修改的文件
包含
67 行增加
和
18 行删除
@@ -12,12 +12,15 @@ | @@ -12,12 +12,15 @@ | ||
12 | <el-row> | 12 | <el-row> |
13 | <el-col :span="4"> | 13 | <el-col :span="4"> |
14 | <el-form-item label-width="30px" label=" " prop="bill.waybillNum"> | 14 | <el-form-item label-width="30px" label=" " prop="bill.waybillNum"> |
15 | - <el-input v-model="form.bill.waybillNum" auto-complete="off" placeholder="主运单号(必填)"></el-input> | 15 | + <el-input v-model="form.bill.waybillNum" auto-complete="off" placeholder="主运单号(必填)" @input="handleInput"></el-input> |
16 | </el-form-item> | 16 | </el-form-item> |
17 | </el-col> | 17 | </el-col> |
18 | <el-col style="margin-left: 30px" :span="2"> | 18 | <el-col style="margin-left: 30px" :span="2"> |
19 | <el-form-item> | 19 | <el-form-item> |
20 | - <el-input v-model="form.bill.origin" auto-complete="off" placeholder="起始站" size="mini"></el-input> | 20 | + <el-input |
21 | + minlength="3" maxlength="3" onkeyup="this.value=this.value.toUpperCase()" | ||
22 | + @keyup.native="form.bill.origin.replace(/[^A-Za-z]/g,'')" | ||
23 | + v-model="form.bill.origin" auto-complete="off" placeholder="起始站" size="mini"></el-input> | ||
21 | </el-form-item> | 24 | </el-form-item> |
22 | </el-col> | 25 | </el-col> |
23 | <el-col style="margin-left: 30px" :span="2"> | 26 | <el-col style="margin-left: 30px" :span="2"> |
@@ -344,8 +347,9 @@ | @@ -344,8 +347,9 @@ | ||
344 | <el-col style="width: 95%"> | 347 | <el-col style="width: 95%"> |
345 | <el-form-item> | 348 | <el-form-item> |
346 | <el-input minlength="3" maxlength="3" onkeyup="this.value=this.value.toUpperCase()" | 349 | <el-input minlength="3" maxlength="3" onkeyup="this.value=this.value.toUpperCase()" |
347 | - @keyup.native="form.bill.destination.replace(/[^A-Za-z]/g,'')" | ||
348 | - v-model="form.bill.destination" auto-complete="off" placeholder="到达站" size="mini"></el-input> | 350 | + @keyup.native="form.rtg.destinationAirport.replace(/[^A-Za-z]/g,'')" |
351 | + @input.native="value => form.rtg.destinationAirport.replace(/[^A-Za-z]/g,'').toUpperCase()" | ||
352 | + v-model="form.rtg.destinationAirport" auto-complete="off" placeholder="到达站" size="mini"></el-input> | ||
349 | </el-form-item> | 353 | </el-form-item> |
350 | </el-col> | 354 | </el-col> |
351 | </el-row> | 355 | </el-row> |
@@ -445,7 +449,11 @@ | @@ -445,7 +449,11 @@ | ||
445 | <el-row style="margin-bottom: -5px"> | 449 | <el-row style="margin-bottom: -5px"> |
446 | <el-col style="width: 95%"> | 450 | <el-col style="width: 95%"> |
447 | <el-form-item> | 451 | <el-form-item> |
448 | - <el-input auto-complete="off" placeholder="目的地机场" size="mini"></el-input> | 452 | + <el-input minlength="3" maxlength="3" onkeyup="this.value=this.value.toUpperCase()" |
453 | + @keyup.native="form.bill.destination.replace(/[^A-Za-z]/g,'')" | ||
454 | + v-model="form.bill.destination" auto-complete="off" placeholder="目的地机场" size="mini"> | ||
455 | + | ||
456 | + </el-input> | ||
449 | </el-form-item> | 457 | </el-form-item> |
450 | </el-col> | 458 | </el-col> |
451 | </el-row> | 459 | </el-row> |
@@ -1210,8 +1218,8 @@ Handling Information | @@ -1210,8 +1218,8 @@ Handling Information | ||
1210 | <el-row style="margin-bottom: -5px"> | 1218 | <el-row style="margin-bottom: -5px"> |
1211 | <el-col style="width: 95%"> | 1219 | <el-col style="width: 95%"> |
1212 | <el-form-item> | 1220 | <el-form-item> |
1213 | - <el-input minlength="3" maxlength="3" onkeyup="this.value=this.value.toUpperCase()" | ||
1214 | - @keyup.native="addForm.cvd.cvd_currency_code.replace(/[^A-Za-z]/g,'')" | 1221 | + <el-input minlength="3" maxlength="3" |
1222 | + @input.native="value => addForm.cvd.cvd_currency_code.replace(/[^A-Za-z]/g,'').toUpperCase()" | ||
1215 | v-model="addForm.cvd.cvd_currency_code" auto-complete="off" placeholder="货币单位" size="mini"></el-input> | 1223 | v-model="addForm.cvd.cvd_currency_code" auto-complete="off" placeholder="货币单位" size="mini"></el-input> |
1216 | </el-form-item> | 1224 | </el-form-item> |
1217 | </el-col> | 1225 | </el-col> |
@@ -1272,8 +1280,8 @@ Handling Information | @@ -1272,8 +1280,8 @@ Handling Information | ||
1272 | <el-row> | 1280 | <el-row> |
1273 | <el-col style="width: 95%"> | 1281 | <el-col style="width: 95%"> |
1274 | <el-form-item> | 1282 | <el-form-item> |
1275 | - <el-input minlength="3" maxlength="3" onkeyup="this.value=this.value.toUpperCase()" | ||
1276 | - @keyup.native="addForm.hbs.hbs_destination.replace(/[^A-Za-z]/g,'')" | 1283 | + <el-input minlength="3" maxlength="3" |
1284 | + @input.native="value => addForm.hbs.hbs_destination = value.replace(/[^A-Za-z]/g, '').toUpperCase()" | ||
1277 | v-model="addForm.hbs.hbs_destination" auto-complete="off" placeholder="到达站" size="mini"></el-input> | 1285 | v-model="addForm.hbs.hbs_destination" auto-complete="off" placeholder="到达站" size="mini"></el-input> |
1278 | </el-form-item> | 1286 | </el-form-item> |
1279 | </el-col> | 1287 | </el-col> |
@@ -1898,12 +1906,23 @@ Handling Information | @@ -1898,12 +1906,23 @@ Handling Information | ||
1898 | </div> | 1906 | </div> |
1899 | </el-col> | 1907 | </el-col> |
1900 | <el-col :span="6"> | 1908 | <el-col :span="6"> |
1901 | - <el-tooltip class="item" effect="dark" content="可以将整体的尺寸信息复制进来,一行一个尺寸信息,系统会自动识别" placement="top-start"> | 1909 | + <el-tooltip class="item" effect="dark" placement="top-start"> |
1910 | + <div slot="content">可以将整体的尺寸信息复制进来,一行一个尺寸信息,系统会自动识别,如: | ||
1911 | + <br/> | ||
1912 | + 10x20x30x40 | ||
1913 | + <br/> | ||
1914 | + 10X20X30X40 | ||
1915 | + <br/> | ||
1916 | + 10x20x30/40 | ||
1917 | + <br/> | ||
1918 | + 10*20*30*40 | ||
1919 | + </div> | ||
1920 | + | ||
1902 | <el-input | 1921 | <el-input |
1903 | :autosize="{ minRows: 7, maxRows: 20}" | 1922 | :autosize="{ minRows: 7, maxRows: 20}" |
1904 | resize = "vertical" | 1923 | resize = "vertical" |
1905 | type="textarea" | 1924 | type="textarea" |
1906 | - placeholder="快速尺寸信息录入生成" | 1925 | + placeholder="快速尺寸信息录入生成,每行一条如:10x20x30x40或10x20x30/40或10*20*30*40" |
1907 | v-model="dimension_textarea" | 1926 | v-model="dimension_textarea" |
1908 | @change="convertAndCalculateVolume" | 1927 | @change="convertAndCalculateVolume" |
1909 | > | 1928 | > |
@@ -1962,7 +1981,7 @@ Handling Information | @@ -1962,7 +1981,7 @@ Handling Information | ||
1962 | }, | 1981 | }, |
1963 | bill:{ | 1982 | bill:{ |
1964 | destination:'', | 1983 | destination:'', |
1965 | - origin:'', | 1984 | + origin:'CGO', |
1966 | quantity_density:'', | 1985 | quantity_density:'', |
1967 | quantity_picecs:'', | 1986 | quantity_picecs:'', |
1968 | //体积 | 1987 | //体积 |
@@ -2035,7 +2054,7 @@ Handling Information | @@ -2035,7 +2054,7 @@ Handling Information | ||
2035 | ppd_weight_amount:'', | 2054 | ppd_weight_amount:'', |
2036 | }, | 2055 | }, |
2037 | ref:{ | 2056 | ref:{ |
2038 | - ref_address:'CGOFDEE', | 2057 | + ref_address:'CGOFD1E', |
2039 | ref_file_reference:'', | 2058 | ref_file_reference:'', |
2040 | ref_participant_airport:'', | 2059 | ref_participant_airport:'', |
2041 | ref_participant_code:'', | 2060 | ref_participant_code:'', |
@@ -2107,13 +2126,27 @@ Handling Information | @@ -2107,13 +2126,27 @@ Handling Information | ||
2107 | oci_csrc_info: "" | 2126 | oci_csrc_info: "" |
2108 | }, | 2127 | }, |
2109 | acc_info:{ | 2128 | acc_info:{ |
2110 | - acc_info:'', | 2129 | + acc_info:'FREIGHT PREPAID', |
2111 | acc_info_id:'GEN', | 2130 | acc_info_id:'GEN', |
2112 | }, | 2131 | }, |
2113 | apply_formRules:{ | 2132 | apply_formRules:{ |
2114 | bill:{ | 2133 | bill:{ |
2115 | waybillNum: [ | 2134 | waybillNum: [ |
2116 | { required: true, message: '请输入主运单号', trigger: 'blur' }, | 2135 | { required: true, message: '请输入主运单号', trigger: 'blur' }, |
2136 | + // 新增的格式校验规则 | ||
2137 | + { | ||
2138 | + validator: (rule, value, callback) => { | ||
2139 | + const reg = /^\d{3}-\d{8}$/; // 定义正则表达式 | ||
2140 | + | ||
2141 | + | ||
2142 | + if (value && !reg.test(value)) { | ||
2143 | + callback(new Error('主运单号格式不正确,应为3位数字-后跟8位数字')); // 如果格式不正确,则返回错误信息 | ||
2144 | + } else { | ||
2145 | + callback(); // 如果格式正确或值为空,则通过校验 | ||
2146 | + } | ||
2147 | + }, | ||
2148 | + trigger: 'blur' | ||
2149 | + } | ||
2117 | ], | 2150 | ], |
2118 | }, | 2151 | }, |
2119 | }, | 2152 | }, |
@@ -2208,6 +2241,10 @@ Handling Information | @@ -2208,6 +2241,10 @@ Handling Information | ||
2208 | } | 2241 | } |
2209 | }, | 2242 | }, |
2210 | methods:{ | 2243 | methods:{ |
2244 | + handleInput(value) { | ||
2245 | + // 这里可以进一步处理输入值,例如去空格等 | ||
2246 | + this.form.bill.waybillNum = value.trim(); | ||
2247 | + }, | ||
2211 | //标签页 | 2248 | //标签页 |
2212 | handleClick(tab, event) { | 2249 | handleClick(tab, event) { |
2213 | console.log(tab, event); | 2250 | console.log(tab, event); |
@@ -2463,7 +2500,8 @@ Handling Information | @@ -2463,7 +2500,8 @@ Handling Information | ||
2463 | //新增主运单 | 2500 | //新增主运单 |
2464 | addFwb() { | 2501 | addFwb() { |
2465 | this.form.rtg.destinationCarrier=this.form.flt.cariier; | 2502 | this.form.rtg.destinationCarrier=this.form.flt.cariier; |
2466 | - this.form.rtg.destinationAirport=this.form.bill.destination; | 2503 | + alert(this.form.rtd.dimensions) |
2504 | + // this.form.rtg.destinationAirport=this.form.bill.destinationAirport; | ||
2467 | this.form.rtd.rtd_gross_weight=this.form.bill.quantity_weight; | 2505 | this.form.rtd.rtd_gross_weight=this.form.bill.quantity_weight; |
2468 | this.form.rtd.rtd_number_pieces=this.form.bill.quantity_picecs; | 2506 | this.form.rtd.rtd_number_pieces=this.form.bill.quantity_picecs; |
2469 | this.form.rtd.rtd_volume=this.form.bill.quantity_volume; | 2507 | this.form.rtd.rtd_volume=this.form.bill.quantity_volume; |
@@ -2617,6 +2655,7 @@ Handling Information | @@ -2617,6 +2655,7 @@ Handling Information | ||
2617 | text = text.replaceAll("cm",""); | 2655 | text = text.replaceAll("cm",""); |
2618 | text = text.replaceAll("X","x"); | 2656 | text = text.replaceAll("X","x"); |
2619 | text = text.replaceAll("-","x"); | 2657 | text = text.replaceAll("-","x"); |
2658 | + text = text.replace(/\//g, 'x'); | ||
2620 | //去掉空白字符 | 2659 | //去掉空白字符 |
2621 | text = text.replaceAll("/\s/g",""); | 2660 | text = text.replaceAll("/\s/g",""); |
2622 | const lines = text.split('\n'); | 2661 | const lines = text.split('\n'); |
@@ -2645,6 +2684,16 @@ Handling Information | @@ -2645,6 +2684,16 @@ Handling Information | ||
2645 | 2684 | ||
2646 | dim_form.vol = dim_form.long * dim_form.wide * dim_form.height * dim_form.pic / 1000000; | 2685 | dim_form.vol = dim_form.long * dim_form.wide * dim_form.height * dim_form.pic / 1000000; |
2647 | 2686 | ||
2687 | + let measurement_info = { | ||
2688 | + dim_measurement_code:'CMT', | ||
2689 | + //尺寸信息 | ||
2690 | + dim_measurement_info:"" + dim_form.long + "-" + dim_form.wide + "-" + dim_form.height + "/" + dim_form.pic, | ||
2691 | + dim_weight:'', | ||
2692 | + dim_weightcode:'', | ||
2693 | + }; | ||
2694 | + | ||
2695 | + _this.form.rtd.dimensions.push(measurement_info) | ||
2696 | + | ||
2648 | _this.gridData.push(dim_form) | 2697 | _this.gridData.push(dim_form) |
2649 | totalVolume += dim_form.vol; | 2698 | totalVolume += dim_form.vol; |
2650 | 2699 | ||
@@ -2667,10 +2716,10 @@ Handling Information | @@ -2667,10 +2716,10 @@ Handling Information | ||
2667 | converted: output.trim(), | 2716 | converted: output.trim(), |
2668 | totalVolume: totalVolume | 2717 | totalVolume: totalVolume |
2669 | }; | 2718 | }; |
2670 | - }).catch(() => { | 2719 | + }).catch((e) => { |
2671 | this.$message({ | 2720 | this.$message({ |
2672 | - type: 'info', | ||
2673 | - message: '已取消' | 2721 | + type: 'error', |
2722 | + message: '已取消'+e.message | ||
2674 | }); | 2723 | }); |
2675 | }); | 2724 | }); |
2676 | }, | 2725 | }, |
-
请 注册 或 登录 后发表评论