作者 朱兆平

add:

1. 修复FLT和RTG的多航段的BUG和强制大小写转换的bug修复
... ... @@ -284,8 +284,8 @@
<el-row style="margin-bottom: -5px">
<el-col style="width: 95%">
<el-form-item>
<el-input minlength="3" maxlength="3" oninput="this.value=this.value.toUpperCase()"
@keyup.native="form.cvd.cvd_currency_code.replace(/[^A-Za-z]/g,'')"
<el-input minlength="3" maxlength="3"
oninput="this.value=this.value.replace(/[^A-Za-z]/g,'').toUpperCase();"
v-model="form.cvd.cvd_currency_code" auto-complete="off" placeholder="货币单位" size="mini"></el-input>
</el-form-item>
</el-col>
... ... @@ -341,7 +341,7 @@
<el-row style="padding-top: 10px">
<el-col :span="2" style="border-right: 1px solid #a5a5a5;border-bottom:1px solid #a5a5a5;border-left:1px solid #a5a5a5;padding-left: 5px">
<span style="font-size: 12px">
To
To1
</span>
<el-row>
<el-col style="width: 95%">
... ... @@ -359,9 +359,8 @@
<el-row style="margin-bottom: -5px">
<el-col style="width: 95%">
<el-form-item>
<el-input minlength="2" maxlength="2" oninput="this.value=this.value.toUpperCase()"
@keyup.native="form.flt.cariier.replace(/[^A-Za-z]/g,'')"
v-model="form.flt.cariier" auto-complete="off" placeholder="承运人" size="mini"></el-input>
<el-input minlength="2" maxlength="2" oninput="this.value=this.value.replace(/[^A-Za-z0-9]/g,'').toUpperCase();"
v-model="form.rtg.destinationCarrier" auto-complete="off" placeholder="承运人" size="mini"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -373,7 +372,9 @@
<el-row style="margin-bottom: -5px">
<el-col style="width: 95%">
<el-form-item>
<el-input disabled auto-complete="off" placeholder="到达站" size="mini"></el-input>
<el-input v-model="form.rtg.onwardAirport"
minlength="3" maxlength="3" oninput="this.value=this.value.replace(/[^A-Za-z]/g,'').toUpperCase();"
auto-complete="off" placeholder="到达站1" size="mini"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -385,7 +386,9 @@
<el-row style="margin-bottom: -5px">
<el-col style="width: 95%">
<el-form-item>
<el-input disabled auto-complete="off" placeholder="承运人" size="mini"></el-input>
<el-input v-model="form.rtg.onwardCarrier"
minlength="2" maxlength="2" oninput="this.value=this.value.replace(/[^A-Za-z0-9]/g,'').toUpperCase();"
auto-complete="off" placeholder="承运人1" size="mini"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -397,7 +400,9 @@
<el-row style="margin-bottom: -5px">
<el-col style="width: 95%">
<el-form-item>
<el-input disabled auto-complete="off" placeholder="到达站" size="mini"></el-input>
<el-input v-model="form.rtg.onwardAirport3"
minlength="3" maxlength="3" oninput="this.value=this.value.replace(/[^A-Za-z]/g,'').toUpperCase();"
auto-complete="off" placeholder="到达站2" size="mini"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -409,7 +414,9 @@
<el-row style="margin-bottom: -5px">
<el-col style="width: 95%">
<el-form-item>
<el-input disabled auto-complete="off" placeholder="承运人" size="mini"></el-input>
<el-input v-model="form.rtg.onwardCarrier3"
minlength="2" maxlength="2" oninput="this.value=this.value.replace(/[^A-Za-z0-9]/g,'').toUpperCase();"
auto-complete="off" placeholder="承运人2" size="mini"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -447,9 +454,9 @@
<el-row style="margin-bottom: -5px">
<el-col style="width: 95%">
<el-form-item>
<el-input minlength="3" maxlength="3" oninput="this.value=this.value.toUpperCase()"
@keyup.native="form.bill.destination.replace(/[^A-Za-z]/g,'')"
v-model="form.bill.destination" auto-complete="off" placeholder="目的地机场" size="mini">
<el-input disabled minlength="3" maxlength="3"
oninput="this.value=this.value.replace(/[^A-Za-z]/g,'').toUpperCase();"
auto-complete="off" placeholder="目的地机场" size="mini">
</el-input>
</el-form-item>
... ... @@ -462,8 +469,9 @@
</span>
<el-row>
<el-col style="width: 38%">
<el-form-item>
<el-input v-model="form.flt.flightNumber" auto-complete="off" placeholder="航班号" size="mini"></el-input>
<el-form-item prop="flightNumber">
<el-input v-model="flightNumber"
auto-complete="off" placeholder="航班号"></el-input>
</el-form-item>
</el-col>
<el-col style="width: 58%;margin-left: 5px">
... ... @@ -487,14 +495,16 @@
</span>
<el-row>
<el-col style="width: 38%">
<el-form-item>
<el-input v-model="form.flt.flightNumber" auto-complete="off" placeholder="航班号" size="mini"></el-input>
<el-form-item prop="flightNumber2">
<el-input v-model="flightNumber2"
oninput="this.value=this.value.replace(/[^A-Za-z0-9]/g,'').toUpperCase();"
auto-complete="off" placeholder="航班号" ></el-input>
</el-form-item>
</el-col>
<el-col style="width: 58%;margin-left: 5px">
<el-form-item>
<el-date-picker
v-model="form.flt.day"
v-model="form.flt.day2"
type="date" style="width: auto"
size="mini"
format="dd"
... ... @@ -815,7 +825,7 @@ Handling Information
</el-col>
<el-col :span="14">
<el-form-item>
<el-input v-model="form.cer.cer_signature" style="width: 95%" auto-complete="off" placeholder="托运人或其代理人签字" size="mini"></el-input>
<el-input v-model="form.cer.cer_signature" maxlength="20" style="width: 95%" auto-complete="off" placeholder="托运人或其代理人签字" size="mini"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -892,13 +902,14 @@ Handling Information
</el-col>
<el-col :span="5" style="margin-left: 10px">
<el-form-item>
<el-input minlength="1" maxlength="17" onkeyup="this.value=this.value.toUpperCase()"
<el-input minlength="1" maxlength="17"
oninput="this.value=this.value.toUpperCase();"
v-model="form.isu.isu_place_or_airport_code" auto-complete="off" placeholder="签署地址" size="mini"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" style="margin-left: 10px">
<el-form-item>
<el-input minlength="0" maxlength="20" onkeyup="this.value=this.value.toUpperCase()"
<el-input minlength="0" maxlength="20" oninput="this.value=this.value.toUpperCase()"
v-model="form.isu.isu_signature" auto-complete="off" placeholder="签署人或其代理人签字,盖章" size="mini"></el-input>
</el-form-item>
</el-col>
... ... @@ -2041,9 +2052,15 @@ Handling Information
cvd_value_for_customs:'NCV',
},
flt:{
cariier:'',
cariier:"",
day:'',
flightNumber:'',
cariier2:"",
day2:'',
flightNumber2:'',
cariier3:"",
day3:'',
flightNumber3:'',
},
isu:{
isu_day_mounth_year:'',
... ... @@ -2114,6 +2131,8 @@ Handling Information
destinationCarrier:'',
onwardAirport:'',
onwardCarrier:'',
onwardAirport3:'',
onwardCarrier3:'',
},
shp:{
shp_contacts:[],
... ... @@ -2169,8 +2188,6 @@ Handling Information
{
validator: (rule, value, callback) => {
const reg = /^\d{3}-\d{8}$/; // 定义正则表达式
if (value && !reg.test(value)) {
callback(new Error('主运单号格式不正确,应为3位数字-后跟8位数字')); // 如果格式不正确,则返回错误信息
} else {
... ... @@ -2181,6 +2198,34 @@ Handling Information
}
],
},
flt:{
flightNumber:[
{
validator: (rule, value, callback) => {
const reg = /^[A-Z0-9]{0,2}[0-9]{3}\d?[A-Z0-9]?$/; // 定义正则表达式
if (value && !reg.test(value)) {
callback(new Error('航班格式不正确')); // 如果格式不正确,则返回错误信息
} else {
callback(); // 如果格式正确或值为空,则通过校验
}
},
trigger: 'blur'
}
],
flightNumber2:[
{
validator: (rule, value, callback) => {
const reg = /^[A-Z0-9]{0,2}[0-9]{3}\d?[A-Z0-9]?$/; // 定义正则表达式
if (value && !reg.test(value)) {
callback(new Error('航班格式不正确')); // 如果格式不正确,则返回错误信息
} else {
callback(); // 如果格式正确或值为空,则通过校验
}
},
trigger: 'blur'
}
]
}
},
// 分单
addForm:{
... ... @@ -2531,8 +2576,6 @@ Handling Information
},
//新增主运单
addFwb() {
this.form.rtg.destinationCarrier=this.form.flt.cariier;
// this.form.rtg.destinationAirport=this.form.bill.destinationAirport;
this.form.rtd.rtd_gross_weight=this.form.bill.quantity_weight;
this.form.rtd.rtd_number_pieces=this.form.bill.quantity_picecs;
this.form.rtd.rtd_volume=this.form.bill.quantity_volume;
... ... @@ -2799,6 +2842,32 @@ Handling Information
this.form.ssr.ssr_request_content = lines;
this.ssr_content = value; // 更新视图中的数据
}
},
flightNumber: {
get() {
// 返回拼接后的完整航班号
return this.form.flt.cariier + this.form.flt.flightNumber;
},
set(value) {
// 将输入值转换为大写并去除非法字符
const cleanedValue = value.replace(/[^A-Za-z0-9]/g, '').toUpperCase();
// 拆分航班号
this.form.flt.cariier = cleanedValue.slice(0, 2);
this.form.flt.flightNumber = cleanedValue.slice(2);
}
},
flightNumber2: {
get() {
// 返回拼接后的完整航班号
return this.form.flt.cariier2 + this.form.flt.flightNumber2;
},
set(value) {
// 将输入值转换为大写并去除非法字符
const cleanedValue = value.replace(/[^A-Za-z0-9]/g, '').toUpperCase();
// 拆分航班号
this.form.flt.cariier2 = cleanedValue.slice(0, 2);
this.form.flt.flightNumber2 = cleanedValue.slice(2);
}
}
},
watch:{
... ...