合并分支 'dev_20230216' 到 'master'

Dev 20230216

查看合并请求 laws-foton-slrs/foton-laws-system-front!35
This commit is contained in:
高嵩
2023-04-05 23:43:34 +08:00
3 changed files with 184 additions and 32 deletions
@@ -7,7 +7,7 @@
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="企标类别" prop="standSort" class="add-form-item form-item-disabled">
<el-select v-model="form.standSort" filterable clearable @change="standSortChange">
<el-select v-model="form.standSort" filterable clearable @change="standSortChange" :disabled="form.reviseStatus === '3'">
<el-option
v-for="item in standSortOptions"
placeholder="请选择企标类别"
@@ -18,12 +18,14 @@
</el-select>
</el-form-item>
<el-form-item label="制修订类型" prop="reviseStatus" class="add-form-item form-item-disabled" >
<el-select v-model="form.reviseStatus" filterable @change="reveseStatusChange">
<el-select v-model="form.reviseStatus" filterable @change="reveseStatusChange"
:disabled="form.reviseStatus === '3'">
<el-option
v-for="item in opinionsStand"
:key="item.value"
:value="item.value"
:label="item.label"
:disabled="item.value ==='3'"
></el-option>
</el-select>
<!--<template>-->
@@ -2395,31 +2395,31 @@
//拼接文件名和id 提交到流程Activity
// this.form.FBGBUSS=this.FBGBUSSFileList.map(item => item.id).join(",")
// 修复将文件删除为一个后提交不显示的bug
this.form.FBGBUSS=this.FBGBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",")
this.form.FBGBUSS=this.FBGBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",")
this.form.FBGBUSSName=this.FBGBUSSFileList.map(item => item.name).join(",")
// this.form.BZSMBUSS=this.BZSMBUSSFileList.map(item => item.id).join(",")
this.form.BZSMBUSS=this.BZSMBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",")
this.form.BZSMBUSS=this.BZSMBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",")
this.form.BZSMBUSSName=this.BZSMBUSSFileList.map(item => item.name).join(",")
// this.form.LSBBBUSS=this.LSBBBUSSFileList.map(item => item.id).join(",")
this.form.LSBBBUSS=this.LSBBBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",")
this.form.LSBBBUSS=this.LSBBBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",")
this.form.LSBBBUSSName=this.LSBBBUSSFileList.map(item => item.name).join(",")
// this.form.QTWJBUSS=this.QTWJBUSSFileList.map(item => item.id).join(",")
this.form.QTWJBUSS=this.QTWJBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",")
this.form.QTWJBUSS=this.QTWJBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",")
this.form.QTWJBUSSName=this.QTWJBUSSFileList.map(item => item.name).join(",")
// this.form.GLWJBUSS=this.GLWJBUSSFileList.map(item => item.id).join(",")
this.form.GLWJBUSS=this.GLWJBUSSFileList.map(item => item.id ? item.id : item.response.data.id).join(",")
this.form.GLWJBUSS=this.GLWJBUSSFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",")
this.form.GLWJBUSSName=this.GLWJBUSSFileList.map(item => item.name).join(",")
// this.form.summaryFile=this.summaryFileList.map(item => item.id).join(",")
this.form.summaryFile=this.summaryFileList.map(item => item.id ? item.id : item.response.data.id).join(",")
this.form.summaryFile=this.summaryFileList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",")
this.form.summaryFileName=this.summaryFileList.map(item => item.name).join(",")
// this.form.madelSub=this.madelSubList.map(item => item.id).join(",")
this.form.madelSub=this.madelSubList.map(item => item.id ? item.id : item.response.data.id).join(",")
this.form.madelSub=this.madelSubList.map(item => item.id !== undefined ? item.id : item.response.data.id).join(",")
this.form.madelSubName=this.madelSubList.map(item => item.name).join(",")
},
@@ -1121,6 +1121,10 @@
data: [], // 标准列表数据
ListForm: {}, // 新增数据
maxStandnSn:"", // 最大順序號
standSort:"",
standCode:"",
reviseStatus:"",
standNum:""
}
},
watch:{
@@ -1170,14 +1174,68 @@
},
methods: {
reveseStatusChange(val){
if(val === '1'){
this.form.standNum = this.maxStandnSn
}else{
this.form.standNum = this.form.standSn
if(this.form.reviseStatus === '1'){
this.$http.get('lawss/sarBussionessStand/getStandInfoByReviseStatus',{reviseStatus:'buss1_'+this.form.reviseStatus,standSort:this.form.standSort,taskId: this.taskIds}, {
_this: this
}, res => {
const obj = res.data
let standSn = obj.newStandSn + 1
this.form.standSn = standSn
this.form.standNumber = standSn
this.form.standNum = standSn
}, 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.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
}
}
}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.form.standCode = val + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
this.reveseStatusChange();
// this.form.standCode = val + ' ' + this.form.standNum + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
},
checkedRoleTransfer (data) {
this.isSubmit = true
@@ -1279,7 +1337,9 @@
this.fileType = fileType
this.fileUpload(fileType)
}
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)
@@ -2812,33 +2872,119 @@
getStandInfoByReviseStatus() {
let date = new Date();
let year = date.getFullYear();
this.reviseStatus = this.form.reviseStatus
if(this.form.reviseStatus === '2'){
this.form.standSn = this.form.standNum
this.form.standNumber = this.form.standNum
this.form.standYear = this.regDate(year)
// 此处因企标编号中带有空格所以此处不再补充添加空格,如果企标编码中没有空格则补充空格 但是产品标准除外
let judgeFn = new RegExp(/\s+/g);
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.formKey++
} else if(this.form.reviseStatus === '3'){
this.form.standCode = this.form.standCode
// 截取企标号中的日期
// '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.standYear.indexOf(' ')>0){
const _index = this.standYear.indexOf(' ')
this.standYear = this.standYear.slice(0,_index)
}else if(this.standYear.indexOf(' X')>0){
const _index = this.standYear.indexOf(' X') // 4
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'
this.standSort = noYearStand.slice(0, index2) // 'Q-F'
this.form.standSort = this.standSort
this.form.standNum = this.standNum
// ---
this.form.standSn = this.form.standNum
this.form.standNumber = this.form.standNum
// this.form.standYear = this.regDate(year)
this.form.standYear = year
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 )
}
this.standCode = this.form.standCode
// this.standSort = this.form.standSort
this.formKey++
} else if (this.form.reviseStatus === '3'){
this.form.standCode = this.form.standCode
this.standCode = this.form.standCode
// ---
let index1 = this.form.standCode.lastIndexOf('-') // 7
this.standYear = this.form.standCode.slice(index1 + 1) // 2023 x
if(this.standYear.indexOf(' ')>0){
const _index = this.standYear.indexOf(' ')
this.standYear = this.standYear.slice(0,_index)
}else if(this.standYear.indexOf(' X')>0){
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'
this.standSort = noYearStand.slice(0, index2) // 'Q-F'
this.form.standSort = this.standSort
this.form.standNum = this.standNum
// ---
this.form.standYear = year
// if(this.form.standYear == this.standYear){
// this.form.standYear = this.form.standYear + ' X'
// }
// this.$http.get('lawss/sarBussionessStand/getStandInfoByReviseStatus',{reviseStatus:'buss1_'+this.form.reviseStatus,standSort:this.form.standSort,taskId: this.taskIds}, {
// _this: this
// }, res => {
// const obj = res.data
// let standSn = obj.newStandSn
// this.form.standSn = standSn
// this.form.standNumber = standSn
// this.form.standNum = standSn
// }, e => {
// })
// this.form.standYear = this.regDate(year)
// this.standSort = this.form.standSort
// this.standCode = this.form.standCode
// this.formKey++
} else {
this.form.standYear = year
this.$http.get('lawss/sarBussionessStand/getStandInfoByReviseStatus',{reviseStatus:'buss1_'+this.form.reviseStatus,standSort:this.form.standSort,taskId: this.taskIds}, {
_this: this
}, res => {
const obj = res.data
let standSn = obj.newStandSn
let standSn = obj.newStandSn + 1
this.form.standSn = standSn
this.form.standNumber = standSn
this.form.standNum = standSn
this.form.standYear = this.regDate(year) // 待带入立项标准
// this.form.standYear = this.regDate(year) // 待带入立项标准
//此处因企标编号中带有空格所以此处不再补充添加空格,如果企标编码中没有空格则补充空格 但是产品标准除外
let judgeFn = new RegExp(/\s+/g);
if(judgeFn.test(this.form.standSort)){
@@ -2848,6 +2994,10 @@
}else {
this.form.standCode = this.form.standSort + ' ' + standSn + ( this.form.standYear === '' ? '' : '-' + this.form.standYear )
}
this.standSort = this.form.standSort
this.standCode = this.form.standCode
this.formKey++
}, e => {
})