顺序号加0补位

This commit is contained in:
zyn
2023-06-02 16:57:30 +08:00
parent 697f5cdc00
commit 77e193ab8c
@@ -1219,6 +1219,8 @@
} }
} }
this.form.standNum = this.form.standNum.replace(/^0+/,"")
this.form.standNum = this.form.standNum.padStart(3,'0')
this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
}, e => { }, e => {
}) })
@@ -1242,6 +1244,8 @@
this.form.standYear = this.standYear this.form.standYear = this.standYear
} }
} }
this.form.standNum = this.form.standNum.replace(/^0+/,"")
this.form.standNum = this.form.standNum.padStart(3,'0')
this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
} }
// else if(this.form.reviseStatus === '3'){ // else if(this.form.reviseStatus === '3'){
@@ -2983,6 +2987,8 @@
// }else { // }else {
// this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) // this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
// } // }
this.form.standNum = this.form.standNum.replace(/^0+/,"")
this.form.standNum = this.form.standNum.padStart(3,'0')
this.standNum = this.form.standNum // 保存初始顺序号 this.standNum = this.form.standNum // 保存初始顺序号
this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
@@ -3015,6 +3021,9 @@
// this.standSort = noYearStand.slice(0, index2) // 'Q-F' // this.standSort = noYearStand.slice(0, index2) // 'Q-F'
this.standSort = this.form.standSort this.standSort = this.form.standSort
this.standNum = this.standNum.replace(/^0+/,"")
this.standNum = this.standNum.padStart(3,'0')
// this.form.standSort = this.standSort // this.form.standSort = this.standSort
this.form.standNum = this.standNum this.form.standNum = this.standNum
// --- // ---
@@ -3061,6 +3070,9 @@
// }else { // }else {
// this.form.standCode = this.form.standSort + ' ' + standSn + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) // this.form.standCode = this.form.standSort + ' ' + standSn + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
// } // }
this.form.standNum = this.form.standNum.replace(/^0+/,"")
this.form.standNum = this.form.standNum.padStart(3,'0')
this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear ) this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
this.standSort = this.form.standSort this.standSort = this.form.standSort
this.standCode = this.form.standCode this.standCode = this.form.standCode