运单录入同行单号导致的单号变化

This commit is contained in:
wuteng 2025-10-24 14:37:41 +08:00
parent ce9680f69a
commit 27d3afcea3

View File

@ -1038,7 +1038,6 @@ data() {
categorySender:null, categorySender:null,
// 收件 // 收件
categoryReciever:null, categoryReciever:null,
hasTBillCode:null,
noTBillCode:null, noTBillCode:null,
// 表单校验 // 表单校验
rules: { rules: {
@ -2565,7 +2564,6 @@ methods: {
let useSiteCode=this.form.sendSiteCode; let useSiteCode=this.form.sendSiteCode;
realMatchWaybill(useSiteCode).then(response => { realMatchWaybill(useSiteCode).then(response => {
this.form.billCode=response.data; this.form.billCode=response.data;
this.hasTBillCode = response.data;
this.initGetTotalAvailablePag(this.form.sendSiteCode); this.initGetTotalAvailablePag(this.form.sendSiteCode);
this.handleGenSubbill(); this.handleGenSubbill();
this.autoAjustBillCode(); this.autoAjustBillCode();
@ -2816,16 +2814,22 @@ methods: {
//根据寄件国家处理单号格式 //根据寄件国家处理单号格式
autoAjustBillCodeSender(code) { autoAjustBillCodeSender(code) {
if (code === '0095' || code === '0855') { if (code === '0095' || code === '0855') {
//单号去掉T //如果单号是否包含7080 去掉首字母的T 否则保持不变
if (this.form.billCode.includes('7080')) {
this.form.billCode = this.form.billCode.replace('T', ''); this.form.billCode = this.form.billCode.replace('T', '');
this.noTBillCode = this.form.billCode; this.noTBillCode = this.form.billCode;
}
} else { } else {
this.form.billCode = this.hasTBillCode; if (this.form.billCode.includes('7080')) {
if (!this.form.billCode.startsWith('T')) {
this.form.billCode = 'T' + this.form.billCode;
}
}
}
}
} }
} }
}
};
</script> </script>
<style lang="scss"> <style lang="scss">