作者 xudada

导入EXCEL货物描述获取HS CODE

... ... @@ -765,9 +765,11 @@ Handling Information
<el-row style="margin-bottom: -5px">
<el-col style="width: 95%">
<el-form-item>
<el-input minlength="1" maxlength="20" onkeyup="this.value=this.value.toUpperCase()"
<el-input type="textarea"
:autosize="{ minRows: 2, maxRows: 4}"
maxlength="80" onkeyup="this.value=this.value.toUpperCase()"
@keyup.native="form.rtd.rtd_goods_DES.replace(/[^A-Za-z0-9\s]/g,'')"
v-model="form.rtd.rtd_goods_DES" auto-complete="off" placeholder="货物品名" size="mini"></el-input>
v-model="form.rtd.rtd_goods_DES" auto-complete="off" placeholder="货物品名,一行一个支持4行.首行必须为货物描述信息" size="mini"></el-input>
</el-form-item>
</el-col>
</el-row>
... ... @@ -2194,17 +2196,17 @@ Handling Information
},
flt:{
cariier:"HQ",
day:'04',
day:'13',
flightNumber:'405',
cariier2:"HQ",
day2:'04',
day2:'13',
flightNumber2:'4055',
cariier3:"",
day3:'',
flightNumber3:'',
},
isu:{
isu_day_mounth_year:'2024-12-03',
isu_day_mounth_year:'2024-12-12',
isu_place_or_airport_code:'ZHENGZHOU',
isu_signature:'CHINA',
},
... ... @@ -2404,9 +2406,9 @@ Handling Information
cvd_value_for_carriage:'NVD',
cvd_value_for_customs:'NCV',
cvd_amount_of_insurance:'XXX',
cvd_charge_prepaid:'CC',
cvd_charge_prepaid:'PP',
cvd_charge_code:'',
cvd_currency_code:'CNY',
cvd_currency_code:'USD',
},
hbs:{
hbs_origin:'CGO',
... ... @@ -3061,7 +3063,7 @@ Handling Information
K22: K22,
P22: P22,
U22: U22,
AF22: cleanString(AF22),
AF22: AF22,
AF23: formattedAF23,
O34: cleanString(O34),
//signatureDate: signatureDate,
... ... @@ -3200,6 +3202,33 @@ Handling Information
this.ssr_content = value; // 更新视图中的数据
}
},
goodDesContent:{
get() {
return this.form.rtd.rtd_goods_DES;
},
set(value) {
// 过滤掉所有非字母数字和中文字符以及换行符
const filteredValue = value.replace(/[^A-Z0-9\n ]/g, ' ').toUpperCase();
const lines = value.split('\n');
if (lines.length > 4) {
this.$message.error('最多只能输入四行文本!');
return;
}
for (let line of lines) {
if (line.length > 20) {
this.$message.error('每行不能超过20个字符!'+ line + "当前字符数:" + line.length);
return;
}
}
// 如果所有校验都通过了,更新 form.ssr.ssr_request_content
this.form.rtd.rtd_goods_DES = filteredValue;
// this.ssr_content = value; // 更新视图中的数据
}
},
flightNumber: {
get() {
// 返回拼接后的完整航班号
... ... @@ -3233,6 +3262,10 @@ Handling Information
this.formattedSsrContent = newVal; // 触发计算属性的setter
},
immediate: true // 立即执行监听器
},
'form.rtd.rtd_goods_DES': function(newVal, oldVal) {
// 这里可以处理变化时的逻辑
this.goodDesContent = newVal; // 触发计算属性的setter
}
}
}
... ...