顺序号加0补位

This commit is contained in:
zyn
2023-05-31 15:26:50 +08:00
parent 1b1213f580
commit 697f5cdc00
2 changed files with 8 additions and 1 deletions
@@ -91,7 +91,7 @@
></el-input>
</el-form-item>
<!--<el-form-item v-show="form.reviseStatus === '1'" label="企标顺序号" :prop="form.reviseStatus === '1'?standNum : ''" class="add-form-item form-item-disabled">-->
<el-form-item v-show="form.reviseStatus === '1' || form.reviseStatus === '2'" label="企标顺序号" :prop="form.reviseStatus === '1'?standNum : ''" class="add-form-item form-item-disabled">
<el-form-item v-show="form.reviseStatus === '1' || form.reviseStatus === '2'" label="企标顺序号" :prop="form.reviseStatus === '1'? 'standNum' : ''" class="add-form-item form-item-disabled">
<el-input
v-model="form.standNum"
:maxLength="100"
@@ -1179,6 +1179,12 @@
filterText(val) {
this.$refs.tree.filter(val);
},
'form.standNum': {
handler(val) {
this.form.standNum = this.form.standNum.replace(/^0+/,"")
this.form.standNum = this.form.standNum.padStart(3,'0')
}
}
},
computed: {
listNoDataText () {
@@ -2978,6 +2984,7 @@
// this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
// }
this.standNum = this.form.standNum // 保存初始顺序号
this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
this.standCode = this.form.standCode