Merge remote-tracking branch 'origin/dev_20230216' into dev_20230216

This commit is contained in:
gaojiabao
2023-04-23 18:24:17 +08:00
10 changed files with 274 additions and 83 deletions
+7
View File
@@ -0,0 +1,7 @@
import axios from '@/common/axios'
// 根据企标编号查找文件
export function selectByIdAtt(id){
return axios._getData('/lawss/sarBussionessStand/selectByIdAtt', { id })
}
+35 -2
View File
@@ -538,7 +538,7 @@ export default {
})
},
_getData (url, params, config = {}) {
_getData (url, params = {}, config = {}) {
return new Promise((resolve,reject)=>{
// 参数包含this
let _this = config._this || false
@@ -558,7 +558,7 @@ export default {
})
},
_postData (url, param, config = {}) {
_postData (url, param = {}, config = {}) {
return new Promise((resolve,reject) => {
var _formData = formData(param)
// 参数包含this
@@ -585,4 +585,37 @@ export default {
})
},
_downloadFile (url, params = {}, method = 'get', fileName = '导出文件') {
_axios({
method,
url,
data: method !== 'get' ? params : {},
params: method === 'get' ? params : {},
responseType: 'blob'
}).then(
res => {
const data = res.data
// 兼容ie
if (window.navigator.msSaveOrOpenBlob) {
try {
const blobObject = new Blob([data])
window.navigator.msSaveOrOpenBlob(blobObject, fileName)
} catch (e) {
console.log(e)
}
return
}
// a标签实现下载
// type为导出文件格式 例application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 导出为xlsx格式
let url = window.URL.createObjectURL(new Blob([data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }))
let a = document.createElement('a')
a.style.display = 'none'
a.href = url
a.setAttribute('download', fileName)
document.body.appendChild(a)
a.click()
document.body.removeChild(a);
URL.revokeObjectURL(url); // 释放对象URL
})
},
}
@@ -218,7 +218,7 @@
></el-input>
<div style="display: flex;justify-content: space-between">
<div style="width: 80%;margin-top: 13px">
<div v-for="(item,index) in LSBBBUSSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">{{ item.name }}</div>
<div v-for="(item,index) in LSBBBUSSFileList" :key="index" @click="handleFilePreview(item)" style="color: #409eff;cursor:pointer" class="fileClass">{{ item.name }}</div>
</div>
<div style="width: 20%;">
<el-button :disabled="disabledXX"
@@ -1084,6 +1084,7 @@
import TreeSelect from '@/components/treeSelect/treeSelect.vue';
import TreeSelectNew from '@/components/treeSelect/treeSelectNew.vue';
import treeSelectModule from "@/components/treeSelect/treeSelectModule.vue";
import { selectByIdAtt } from "@/api/flow/index.js"
let Base64 = require('js-base64').Base64;
@@ -1523,30 +1524,30 @@
'form.standStatus': {
handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
this.FSRQchange()
}
}
},
'form.issueTime': {
handler: function() {
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
let year = date.getFullYear()+5;
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length == 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
this.FSRQchange()
// if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
// let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// // const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// // this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
// let year = date.getFullYear()+5;
// let month =(date.getMonth() + 1).toString();
// let day = (date.getDate()).toString();
// if (month.length == 1) {
// month = "0" + month;
// }
// if (day.length == 1) {
// day = "0" + day;
// }
// const FSRQBUSS = year + "-" + month + "-" + day;
// this.form["FSRQBUSS"] = FSRQBUSS
//
// }
},
},
'form.country': {
@@ -1567,6 +1568,26 @@
},
},
methods: {
FSRQchange(){
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
let year = date.getFullYear()+5;
if(this.form.standSort === 'Q/QCBFC' || this.form.standSort === 'Q/FT X'){
year = date.getFullYear()+3;
}
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length === 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
},
regDate(data){
if(this.form.standCode !== undefined && this.form.standCode !== null && this.form.standCode.indexOf(data) !== -1){
data = data + ' X'
@@ -2568,6 +2589,48 @@
this.form.byybj = this.form.byybj ? this.form.byybj + ',' +textArr.join(',') : textArr.join(',')
}
// this.$emit('input', textArr.join(','))
// 修订 时 手动查找代替企标编号 发布稿放到历史版本
if(this.replaceLawType === 'DTQBBHBUSS' && this.form.standStatus === '2' && this.selectedListRep.length){
let ids = this.selectedListRep.reduce((init,item,index,arr)=>{
let result
if(index === arr.length - 1){
result = init + item.id
}else{
result = init + item.id + ','
}
return result
},'')
try{
selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data.length && res.data[0].fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbussNmae
}else{
init = init + ',' + item.fbgbussNmae
}
return init
},'')
this.form.LSBBBUSS = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbuss
}else{
init = init + ',' + item.fbgbuss
}
return init
},'')
}else if(res && res.data && res.data.length === 0){
this.form.LSBBBUSS = ''
this.form.LSBBBUSSName = ''
}
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
})
}catch(e){
console.log(e)
}
}
this.$refs.selections.clearSelection()
},
filterSetData(data){
@@ -1101,29 +1101,32 @@
handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
this.getStandInfoByReviseStatus()
this.FSRQchange()
}
}
},
'form.issueTime': {
handler: function() {
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
let year = date.getFullYear()+5;
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length === 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
this.FSRQchange();
// if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
// let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// // const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// // this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
//
// let year = date.getFullYear()+5;
// let month =(date.getMonth() + 1).toString();
// let day = (date.getDate()).toString();
// if (month.length == 1) {
// month = "0" + month;
// }
// if (day.length === 1) {
// day = "0" + day;
// }
// const FSRQBUSS = year + "-" + month + "-" + day;
// this.form["FSRQBUSS"] = FSRQBUSS
// console.log(FSRQBUSS)
//
// }
},
},
'form.country': {
@@ -1149,6 +1152,26 @@
},
},
methods: {
FSRQchange(){
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
let year = date.getFullYear()+5;
if(this.form.standSort === 'Q/QCBFC' || this.form.standSort === 'Q/FT X'){
year = date.getFullYear()+3;
}
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length === 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
},
checkedRoleTransfer (data) {
this.isSubmit = true
this.saveLoading = true
@@ -1078,29 +1078,31 @@
handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
this.getStandInfoByReviseStatus("")
this.FSRQchange()
}
}
},
'form.issueTime': {
handler: function() {
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
let year = date.getFullYear()+5;
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length == 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
this.FSRQchange()
// if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
// let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// // const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// // this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
//
// let year = date.getFullYear()+5;
// let month =(date.getMonth() + 1).toString();
// let day = (date.getDate()).toString();
// if (month.length == 1) {
// month = "0" + month;
// }
// if (day.length == 1) {
// day = "0" + day;
// }
// const FSRQBUSS = year + "-" + month + "-" + day;
// this.form["FSRQBUSS"] = FSRQBUSS
//
// }
},
},
'form.country': {
@@ -1126,6 +1128,26 @@
},
},
methods: {
FSRQchange(){
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
let year = date.getFullYear()+5;
if(this.form.standSort === 'Q/QCBFC' || this.form.standSort === 'Q/FT X'){
year = date.getFullYear()+3;
}
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length === 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
},
regDate(data){
if(this.form.DTQBBHBUSS !== undefined && this.form.DTQBBHBUSS !== null && this.form.DTQBBHBUSS.indexOf(data) !== -1){
data = data + ' X'
@@ -1156,29 +1156,31 @@
handler (val) {
if (val !== '' && val !== null && typeof (val) !== 'undefined') {
this.getStandInfoByReviseStatus()
this.FSRQchange()
}
}
},
'form.issueTime': {
handler: function() {
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
let year = date.getFullYear()+5;
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length === 1) {
month = "0" + month;
}
if (day.length == 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
this.FSRQchange()
// if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
// let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
// // const FSRQBUSS = date.getFullYear()+ 5 + '-' + date.getMonth() + '-' + date.getDate()
// // this.sarBussionessStandEO["FSRQBUSS"] = FSRQBUSS
//
// let year = date.getFullYear()+5;
// let month =(date.getMonth() + 1).toString();
// let day = (date.getDate()).toString();
// if (month.length === 1) {
// month = "0" + month;
// }
// if (day.length == 1) {
// day = "0" + day;
// }
// const FSRQBUSS = year + "-" + month + "-" + day;
// this.form["FSRQBUSS"] = FSRQBUSS
//
// }
},
},
'form.country': {
@@ -1204,6 +1206,26 @@
},
},
methods: {
FSRQchange(){
if(this.form.issueTime !== undefined && this.form.issueTime !== null && this.form.issueTime !== ''){
let date = new Date(this.$moment(this.form.issueTime).format('YYYY-MM-DD'))
let year = date.getFullYear()+5;
if(this.form.standSort === 'Q/QCBFC' || this.form.standSort === 'Q/FT X'){
year = date.getFullYear()+3;
}
let month =(date.getMonth() + 1).toString();
let day = (date.getDate()).toString();
if (month.length == 1) {
month = "0" + month;
}
if (day.length === 1) {
day = "0" + day;
}
const FSRQBUSS = year + "-" + month + "-" + day;
this.form["FSRQBUSS"] = FSRQBUSS
}
},
regDate(data){
if(this.form.DTQBBHBUSS !== undefined && this.form.DTQBBHBUSS !== null && this.form.DTQBBHBUSS.indexOf(data) !== -1){
data = data + ' X'
@@ -2729,6 +2729,9 @@
textArr2 = [...new Set(textArr2)]
this.replaceLawsNumModel = false
})
this.form.rqbJson = this.selectedListRep[0].id
// this.SarLawsInfoEO.replaceLawsNum = textArr.join(',')
// 解决 标准入库流程--圈住的字段,先手动输入,然后再手动查找,点提交就会把手动输入的标准号覆盖
if (this.replaceLawType === 'DTQBBHBUSS') {
@@ -2762,7 +2765,7 @@
},'')
// const id = this.selectedListRep[0].id
this.selectByIdAtt(ids).then(res =>{
if (res && res.data && res.data[0].fbgbuss !== '') {
if (res && res.data && res.data.length && res.data[0].fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbussNmae
@@ -2781,8 +2784,11 @@
},'')
// this.form.LSBBBUSSName = res.data[0].fbgbussNmae
// this.form.LSBBBUSS = res.data[0].fbgbuss
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
}else if(res && res.data && res.data.length === 0){
this.form.LSBBBUSS = ''
this.form.LSBBBUSSName = ''
}
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
})
}
@@ -3523,7 +3529,7 @@
// this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
// }
if (res && res.data && res.data[0].fbgbuss !== '') {
this.form.LSBBBUSSName = res.data.reduce((init,item,index,arr)=>{
const names = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbussNmae
}else{
@@ -3531,7 +3537,7 @@
}
return init
},'')
this.form.LSBBBUSS = res.data.reduce((init,item,index,arr)=>{
const ids = res.data.reduce((init,item,index,arr)=>{
if(index === 0){
init = item.fbgbuss
}else{
@@ -3539,6 +3545,15 @@
}
return init
},'')
if(this.form.LSBBBUSSName === undefined || this.form.LSBBBUSSName.indexOf(names) === -1){
if(this.form.LSBBBUSSName === undefined){
this.form.LSBBBUSSName = names
this.form.LSBBBUSS = ids
}else{
this.form.LSBBBUSSName = names + ',' + this.form.LSBBBUSSName
this.form.LSBBBUSS = ids + ',' + this.form.LSBBBUSS
}
}
this.LSBBBUSSFileList = this.assemble(this.form.LSBBBUSS, this.form.LSBBBUSSName);
}
})
@@ -20,7 +20,7 @@
<div style="flex: auto;" v-show="active === '1'">
<formList
:form = "form"
:isTrue="true"
:isTrue="false"
:FBGBUSSFileList = "FBGBUSSFileList"
:LSBBBUSSFileList = "LSBBBUSSFileList"
:BZSMBUSSFileList = "BZSMBUSSFileList"
@@ -1726,6 +1726,9 @@
zrDeptIdName:this.$store.getters.userInfo.institutionName,
children:[],
};
if(!this.form.modelData){
this.form.modelData = []
}
this.form.modelData.push(list);
this.$message.success("新增成功")
this.showForm.modelNum = ""
@@ -2915,7 +2918,7 @@
if (valid) {
this.$refs['formTongGuo'].validate((valid) => {
if (valid) {
if(this.form.modelData.length === 0){
if(this.form.modelData === undefined || this.form.modelData.length === 0){
this.opinionDialogVisible = true
}else{
this.commentTextHandle();
@@ -254,6 +254,7 @@
</el-form>
</div>
<el-table
v-loading = "loading"
:data="standinfoList"
tooltip-effect="dark"
style="width: 100%"
@@ -359,6 +360,7 @@ export default {
props: ['message'],
data(){
return{
loading:false,
disabledXX:!!this.$route.query.disabledXX,
formLoading:false,
formRules: {
@@ -459,6 +461,7 @@ export default {
pageSize: this.pageSize,
}, {
_this: this,
loading: "loading"
}, res => {
this.standinfoList = res.data.list
//展示的数据只能是未开始的
@@ -467,7 +470,7 @@ export default {
// this.standinfoList.push(item)
// }
// })
this.total = this.standinfoList.length
this.total = res.data.count
this.$nextTick(()=>{
this.$refs.selection.doLayout()
})