空格
This commit is contained in:
@@ -1124,6 +1124,11 @@ export default {
|
||||
// this.$emit('reveseStatusChange',val)
|
||||
// }
|
||||
// }
|
||||
'form.standNum': {
|
||||
handler: function(val){
|
||||
this.$emit('standNumChange',val)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
@formChoiceZRR5 = "formChoiceZRR5"
|
||||
@standSortChange = "standSortChange"
|
||||
@reveseStatusChange = 'reveseStatusChange'
|
||||
@standNumChange="standNumChange"
|
||||
/>
|
||||
<div>
|
||||
<el-collapse accordion v-model="activeName">
|
||||
@@ -1195,60 +1196,67 @@
|
||||
this.form.standSn = standSn
|
||||
this.form.standNumber = standSn
|
||||
this.form.standNum = standSn
|
||||
|
||||
// this.form.standYear = this.standYear.slice(0,4)
|
||||
let year = new Date().getFullYear()
|
||||
if(this.standYear !== year){
|
||||
// if(this.standYear.slice(0,4) == this.form.standYear){
|
||||
// this.form.standYear = year + ' X'
|
||||
// }else{
|
||||
this.form.standYear = year
|
||||
// }
|
||||
}else{
|
||||
if(this.standYear.slice(0,4) == this.form.standYear){
|
||||
this.form.standYear = this.standYear + ' X'
|
||||
}else{
|
||||
this.form.standYear = this.standYear
|
||||
}
|
||||
}
|
||||
|
||||
this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
}, e => {
|
||||
})
|
||||
|
||||
// this.form.standYear = this.standYear.slice(0,4)
|
||||
let year = new Date().getFullYear()
|
||||
if(this.standYear !== year){
|
||||
// if(this.standYear.slice(0,4) == this.form.standYear){
|
||||
// this.form.standYear = year + ' X'
|
||||
// }else{
|
||||
this.form.standYear = year
|
||||
// }
|
||||
}else{
|
||||
if(this.standYear.slice(0,4) == this.form.standYear){
|
||||
this.form.standYear = this.standYear + ' X'
|
||||
}else{
|
||||
this.form.standYear = this.standYear
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}else if(this.form.reviseStatus === '2'){
|
||||
this.form.standNum = this.standNum === undefined ? '' : this.standNum
|
||||
|
||||
let year = new Date().getFullYear()
|
||||
if(this.standYear.slice(0,4) != year){
|
||||
if((this.standYear+'').slice(0,4) != year){
|
||||
if((this.form.standYear+'').slice(0,4) === year){
|
||||
this.form.standYear = year + ' X'
|
||||
}else{
|
||||
this.form.standYear = year
|
||||
}
|
||||
}else{
|
||||
if(this.standYear.slice(0,4) == (this.form.standYear + '').slice(0,4)){
|
||||
if((this.standYear+'').slice(0,4) == (this.form.standYear + '').slice(0,4)){
|
||||
this.form.standYear = this.standYear + ' X'
|
||||
}else{
|
||||
this.form.standYear = this.standYear
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}else if(this.form.reviseStatus === '3'){
|
||||
// this.form.standSort = this.standSort
|
||||
this.form.standCode = this.standCode
|
||||
this.form.standNum = this.standNum
|
||||
if(this.standYear.slice(0,4) == this.form.standYear){
|
||||
this.form.standYear = this.standYear + ' X'
|
||||
}else{
|
||||
this.form.standYear = this.standYear
|
||||
}
|
||||
this.form.standSort = this.standSort
|
||||
this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
}
|
||||
// else if(this.form.reviseStatus === '3'){
|
||||
// // this.form.standSort = this.standSort
|
||||
// this.form.standCode = this.standCode
|
||||
// this.form.standNum = this.standNum
|
||||
// if(this.standYear.slice(0,4) == this.form.standYear){
|
||||
// this.form.standYear = this.standYear + ' X'
|
||||
// }else{
|
||||
// this.form.standYear = this.standYear
|
||||
// }
|
||||
// this.form.standSort = this.standSort
|
||||
// }
|
||||
},
|
||||
standSortChange(val){
|
||||
this.reveseStatusChange();
|
||||
// this.form.standCode = val + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
},
|
||||
standNumChange(val){
|
||||
this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
},
|
||||
checkedRoleTransfer (data) {
|
||||
this.isSubmit = true
|
||||
this.saveLoading = true
|
||||
@@ -1349,9 +1357,9 @@
|
||||
this.fileType = fileType
|
||||
this.fileUpload(fileType)
|
||||
}
|
||||
if(form.reviseStatus !== '3'){
|
||||
this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
}
|
||||
// if(form.reviseStatus !== '3'){
|
||||
// this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
// }
|
||||
},
|
||||
modelProp(row,index){
|
||||
console.log(row)
|
||||
@@ -2890,12 +2898,14 @@
|
||||
// 截取企标号中的日期
|
||||
// 'Q-F 101-2023 X'
|
||||
// ---
|
||||
if(this.form.standCode == ''){
|
||||
this.form.standCode = this.form.DTQBBHBUSS
|
||||
// this.form.standCode = 'Q/FT A033-2023'
|
||||
}
|
||||
let index1 = this.form.standCode.lastIndexOf('-') // 7
|
||||
this.standYear = this.form.standCode.slice(index1 + 1) // 2023 x
|
||||
// if(this.form.standCode == ''){
|
||||
// this.form.standCode = this.form.DTQBBHBUSS
|
||||
// this.form.standCode = 'Q/FTA033-2023'
|
||||
// }
|
||||
// console.log(this.form.DTQBBHBUSS.split(',')[0])
|
||||
// 被代替企标编号年份
|
||||
let index1 = this.form.DTQBBHBUSS.split(',')[0].lastIndexOf('-') // 7
|
||||
this.standYear = this.form.DTQBBHBUSS.split(',')[0].slice(index1 + 1) // 2023 x
|
||||
if(this.standYear.indexOf(' ')>0){
|
||||
const _index = this.standYear.indexOf(' ')
|
||||
this.standYear = this.standYear.slice(0,_index)
|
||||
@@ -2904,36 +2914,55 @@
|
||||
this.standYear = this.standYear.slice(0,_index) // 2023
|
||||
}
|
||||
|
||||
let noYearStand = this.form.standCode.slice(0, index1) // 'Q-F 101'
|
||||
let index2 = noYearStand.lastIndexOf(' ') // 3
|
||||
this.standNum = noYearStand.slice(index2 + 1) // '101'
|
||||
// let noYearStand = this.form.standCode.slice(0, index1) // 'Q-F 101'
|
||||
// let index2 = noYearStand.lastIndexOf(' ') // 3
|
||||
// this.standNum = noYearStand.slice(index2 + 1) // '101'
|
||||
// this.standNum = noYearStand.replace(this.form.standSort,'').trim()
|
||||
|
||||
this.standSort = noYearStand.slice(0, index2) // 'Q-F'
|
||||
// this.standSort = noYearStand.slice(0, index2) // 'Q-F'
|
||||
// this.standSort = this.form.standSort
|
||||
|
||||
this.form.standSort = this.standSort
|
||||
this.form.standNum = this.standNum
|
||||
// this.form.standSort = this.standSort
|
||||
// this.form.standNum = this.standNum
|
||||
// ---
|
||||
|
||||
this.form.standSn = this.form.standNum
|
||||
this.form.standNumber = this.form.standNum
|
||||
// this.form.standSn = this.form.standNum
|
||||
// this.form.standNumber = this.form.standNum
|
||||
// this.form.standYear = this.regDate(year)
|
||||
|
||||
this.standSort = this.form.standSort
|
||||
this.form.standYear = year
|
||||
if((this.standYear+'').slice(0,4) != year){
|
||||
// if((this.form.standYear+'').slice(0,4) === year){
|
||||
// this.form.standYear = year + ' X'
|
||||
// }else{
|
||||
this.form.standYear = year
|
||||
// }
|
||||
}else{
|
||||
if((this.standYear+'').slice(0,4) == (this.form.standYear + '').slice(0,4)){
|
||||
this.form.standYear = this.standYear + ' X'
|
||||
}else{
|
||||
this.form.standYear = this.standYear
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(this.form.standYear == this.standYear){
|
||||
this.form.standYear = this.form.standYear + ' X'
|
||||
}
|
||||
|
||||
// 此处因企标编号中带有空格所以此处不再补充添加空格,如果企标编码中没有空格则补充空格 但是产品标准除外
|
||||
let judgeFn = new RegExp(/\s+/g);
|
||||
console.log(judgeFn.test(this.form.standSort))
|
||||
if(judgeFn.test(this.form.standSort)){
|
||||
this.form.standCode = this.form.standSort + '' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
}else if(this.form.standSort === 'Q/QCBFC'){
|
||||
this.form.standCode = this.form.standSort + '' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
}else {
|
||||
this.form.standCode = this.form.standSort + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
}
|
||||
// let judgeFn = new RegExp(/\s+/g);
|
||||
// console.log(judgeFn.test(this.form.standSort))
|
||||
// if(judgeFn.test(this.form.standSort)){
|
||||
// this.form.standCode = this.form.standSort + '' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
// }else if(this.form.standSort === 'Q/QCBFC'){
|
||||
// this.form.standCode = this.form.standSort + '' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
// }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.standCode = this.form.standCode
|
||||
// this.standSort = this.form.standSort
|
||||
@@ -2954,19 +2983,22 @@
|
||||
const _index = this.standYear.indexOf(' X') // 4
|
||||
this.standYear = this.standYear.slice(0,_index) // 2023
|
||||
}
|
||||
console.log(this.standYear)
|
||||
|
||||
let noYearStand = this.form.standCode.slice(0, index1) // 'Q-F 101'
|
||||
let index2 = noYearStand.lastIndexOf(' ') // 3
|
||||
this.standNum = noYearStand.slice(index2 + 1) // '101'
|
||||
// let index2 = noYearStand.lastIndexOf(' ') // 3
|
||||
// this.standNum = noYearStand.slice(index2 + 1) // '101'
|
||||
this.standNum = noYearStand.replace(this.form.standSort,'').trim() // '101'
|
||||
|
||||
this.standSort = noYearStand.slice(0, index2) // 'Q-F'
|
||||
// this.standSort = noYearStand.slice(0, index2) // 'Q-F'
|
||||
this.standSort = this.form.standSort
|
||||
|
||||
this.form.standSort = this.standSort
|
||||
// this.form.standSort = this.standSort
|
||||
this.form.standNum = this.standNum
|
||||
// ---
|
||||
|
||||
this.form.standYear = year
|
||||
|
||||
this.form.standCode = this.form.standSort + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
// if(this.form.standYear == this.standYear){
|
||||
// this.form.standYear = this.form.standYear + ' X'
|
||||
// }
|
||||
@@ -2998,14 +3030,15 @@
|
||||
this.form.standNum = standSn
|
||||
// this.form.standYear = this.regDate(year) // 待带入立项标准
|
||||
//此处因企标编号中带有空格所以此处不再补充添加空格,如果企标编码中没有空格则补充空格 但是产品标准除外
|
||||
let judgeFn = new RegExp(/\s+/g);
|
||||
if(judgeFn.test(this.form.standSort)){
|
||||
this.form.standCode = this.form.standSort + '' + standSn + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
}else if(this.form.standSort === 'Q/QCBFC'){
|
||||
this.form.standCode = this.form.standSort + '' + standSn + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
}else {
|
||||
this.form.standCode = this.form.standSort + ' ' + standSn + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
}
|
||||
// let judgeFn = new RegExp(/\s+/g);
|
||||
// if(judgeFn.test(this.form.standSort)){
|
||||
// this.form.standCode = this.form.standSort + '' + standSn + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
// }else if(this.form.standSort === 'Q/QCBFC'){
|
||||
// this.form.standCode = this.form.standSort + '' + standSn + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
|
||||
// }else {
|
||||
// this.form.standCode = this.form.standSort + ' ' + standSn + ( 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.standCode = this.form.standCode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user