|
@@ -533,7 +533,7 @@ export default {
|
|
|
{
|
|
|
prop: 'flightNO',
|
|
|
label: '航班号',
|
|
|
- hintText: '示例:CA1111',
|
|
|
+ hintText: '示例:CA1234',
|
|
|
hintVisible: false
|
|
|
},
|
|
|
{
|
|
@@ -551,7 +551,7 @@ export default {
|
|
|
{
|
|
|
prop: 'baggageNO',
|
|
|
label: '行李牌号',
|
|
|
- hintText: '示例:1234567890',
|
|
|
+ hintText: '示例:1234567890 或 CA123456',
|
|
|
hintVisible: false
|
|
|
},
|
|
|
{
|
|
@@ -565,7 +565,7 @@ export default {
|
|
|
{
|
|
|
prop: 'U_Device_ID',
|
|
|
label: '容器编号',
|
|
|
- hintText: '示例:AKE25810CA',
|
|
|
+ hintText: '示例:AKE12345CA',
|
|
|
hintVisible: false
|
|
|
},
|
|
|
{
|
|
@@ -589,13 +589,13 @@ export default {
|
|
|
{
|
|
|
prop: 'transferArrival',
|
|
|
label: '中转进航班',
|
|
|
- hintText: '示例:CA1111',
|
|
|
+ hintText: '示例:CA1234',
|
|
|
hintVisible: false
|
|
|
},
|
|
|
{
|
|
|
prop: 'transferDeparture',
|
|
|
label: '中转出航班',
|
|
|
- hintText: '示例:CA1111',
|
|
|
+ hintText: '示例:CA1234',
|
|
|
hintVisible: false
|
|
|
},
|
|
|
{
|
|
@@ -1040,7 +1040,8 @@ export default {
|
|
|
const top2 = /^([a-zA-Z][0-9])|([0-9][a-zA-Z])|([a-zA-Z]{2})/
|
|
|
const bagNum = /^[0-9]{10}$/
|
|
|
const bagNo = /^[a-zA-Z]{2}[0-9]{6}$/
|
|
|
- const bagNumCA = /^CA[0-9]{6}$/
|
|
|
+ // const bagNumCA = /^CA[0-9]{6}$/
|
|
|
+ const bagNumShort = /^[0-9a-zA-Z][a-zA-Z][0-9]{6}$/
|
|
|
// 纯字母则为旅客姓名
|
|
|
if (az.test(val)) {
|
|
|
this.form['passengerName'] = val
|
|
@@ -1049,7 +1050,11 @@ export default {
|
|
|
// 字母加数字且前两位为字母则为航班号
|
|
|
this.form['flightNO'] = val
|
|
|
this.advancedSubmitHandler(true)
|
|
|
- } else if (bagNum.test(val) || bagNo.test(val) || bagNumCA.test(val)) {
|
|
|
+ } else if (
|
|
|
+ bagNum.test(val) ||
|
|
|
+ bagNo.test(val) ||
|
|
|
+ (bagNumShort.test(val) && Object.keys(AIRPORT_ID).includes(val.slice(0, 2).toUpperCase()))
|
|
|
+ ) {
|
|
|
// 纯数字且位数等于10则为行李牌号
|
|
|
this.form['baggageNO'] = val
|
|
|
this.advancedSubmitHandler(true)
|
|
@@ -1079,9 +1084,13 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
function baggageFormat(baggageNO) {
|
|
|
- const bagNumCA = /^CA[0-9]{6}$/
|
|
|
- if (bagNumCA.test(baggageNO)) {
|
|
|
- return Array.from({ length: 10 }, (_, i) => baggageNO.replace('CA', `${i}999`)).join()
|
|
|
+ // const bagNumCA = /^CA[0-9]{6}$/
|
|
|
+ const bagNumShort = /^[0-9a-zA-Z][a-zA-Z][0-9]{6}$/
|
|
|
+ if (bagNumShort.test(baggageNO) && Object.keys(AIRPORT_ID).includes(baggageNO.slice(0, 2).toUpperCase())) {
|
|
|
+ return Array.from(
|
|
|
+ { length: 10 },
|
|
|
+ (_, i) => `${i}${AIRPORT_ID[baggageNO.slice(0, 2).toUpperCase()]}${baggageNO.slice(2)}`
|
|
|
+ ).join()
|
|
|
}
|
|
|
return baggageNO || null
|
|
|
}
|