标准法规清单-国家/地区清单中的 每个国家或者地区只能建立一次清单,需做限制
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+112
-15
@@ -1264,27 +1264,38 @@ export default {
|
||||
})
|
||||
sarAccessEO.fileIds = relateFile.join(',')
|
||||
}
|
||||
|
||||
|
||||
if (!sarAccessEO.id) {
|
||||
// 新增
|
||||
sarAccessEO.state = '1'
|
||||
sarAccessEO.version = 0
|
||||
this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
|
||||
_this: this,
|
||||
loading: 'loadData'
|
||||
}, res => {
|
||||
if (this.sarAccessInfoList.length !== 0) {
|
||||
if (this.sarAccessInfoList.length !== 0) {
|
||||
this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
|
||||
_this: this,
|
||||
loading: 'loadData'
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
this.$message.success('新增成功')
|
||||
this.isNext = true
|
||||
this.$router.push({
|
||||
name: 'AccessStandardsAndRegulations'
|
||||
})
|
||||
if (res.data === "数据库为空,添加成功") {
|
||||
this.$message.success('新增成功')
|
||||
this.isNext = true
|
||||
this.$router.push({
|
||||
name: 'AccessStandardsAndRegulations'
|
||||
})
|
||||
} else if (res.data === "其他清单添加成功") {
|
||||
this.$message.success('新增成功')
|
||||
this.isNext = true
|
||||
this.$router.push({
|
||||
name: 'AccessStandardsAndRegulations'
|
||||
})
|
||||
}
|
||||
}
|
||||
}else {
|
||||
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}, e => {
|
||||
console.log(e)
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
||||
}
|
||||
} else {
|
||||
// 编辑
|
||||
this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
|
||||
@@ -1305,6 +1316,92 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交按钮 事件
|
||||
// saveSarAccess () {
|
||||
// this.$refs['sarAccessForm'].validate((valid) => {
|
||||
// if (valid) {
|
||||
// let rowlist = []
|
||||
// let rowlist1 = []
|
||||
// let rowlist2 = []
|
||||
// let rowlist3 = []
|
||||
// for (let i = 0; i < this.sarAccessInfoList.length; i++) {
|
||||
// rowlist.push(this.sarAccessInfoList[i].id)
|
||||
// if (this.sarAccessInfoList[i].ssrq === null) {
|
||||
// rowlist1.push(this.sarAccessInfoList[i].ssrq = '-')
|
||||
// }else {
|
||||
// rowlist1.push(this.sarAccessInfoList[i].ssrq.toString())
|
||||
// }
|
||||
// if (this.sarAccessInfoList[i].xcxssrqgj === null) {
|
||||
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
|
||||
// }else {
|
||||
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
|
||||
// }
|
||||
// if (this.sarAccessInfoList[i].zccssrqgj === null) {
|
||||
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
|
||||
// }else {
|
||||
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
|
||||
// }
|
||||
// }
|
||||
// rowlist = rowlist.join(',')
|
||||
// rowlist1 = rowlist1.join(',')
|
||||
// rowlist2 = rowlist2.join(',')
|
||||
// rowlist3 = rowlist3.join(',')
|
||||
// let sarAccessEO = JSON.parse(JSON.stringify(this.sarAccessEO))
|
||||
// sarAccessEO.inforlist = rowlist
|
||||
// sarAccessEO.inforlist1 = rowlist1
|
||||
// sarAccessEO.inforlist2 = rowlist2
|
||||
// sarAccessEO.inforlist3 = rowlist3
|
||||
// // sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
|
||||
// // sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')
|
||||
// // 判断是否有附件
|
||||
// if (this.fileInfoList.length > 0) {
|
||||
// let relateFile = []
|
||||
// this.fileInfoList.map(item => {
|
||||
// relateFile.push(item.id)
|
||||
// })
|
||||
// sarAccessEO.fileIds = relateFile.join(',')
|
||||
// }
|
||||
// if (!sarAccessEO.id) {
|
||||
// // 新增
|
||||
// sarAccessEO.state = '1'
|
||||
// sarAccessEO.version = 0
|
||||
// this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
|
||||
// _this: this,
|
||||
// loading: 'loadData'
|
||||
// }, res => {
|
||||
// if (this.sarAccessInfoList.length !== 0) {
|
||||
// if (res.ok) {
|
||||
// this.$message.success('新增成功')
|
||||
// this.isNext = true
|
||||
// this.$router.push({
|
||||
// name: 'AccessStandardsAndRegulations'
|
||||
// })
|
||||
// }
|
||||
// }else {
|
||||
// this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
||||
// }
|
||||
// }, e => {
|
||||
// })
|
||||
// } else {
|
||||
// // 编辑
|
||||
// this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
|
||||
// _this: this,
|
||||
// loading: 'loadData'
|
||||
// }, res => {
|
||||
// if (res.ok) {
|
||||
// this.isNext = true
|
||||
// this.$router.push({
|
||||
// name: 'AccessStandardsAndRegulations'
|
||||
// })
|
||||
// }
|
||||
// }, e => {
|
||||
// })
|
||||
// }
|
||||
// }else {
|
||||
// this.$message.error('请检查表单是否填写正确')
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
pageInfo() {
|
||||
StandardsInfoPage(this.sarAccessInfoSearch).then(res =>{
|
||||
this.sarAccessInfoSearchList = res.data.list
|
||||
|
||||
+116
-12
@@ -1246,27 +1246,42 @@ export default {
|
||||
// 新增
|
||||
sarAccessEO.state = '1'
|
||||
sarAccessEO.version = 0
|
||||
this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
|
||||
_this: this,
|
||||
loading: 'loadData'
|
||||
}, res => {
|
||||
if (this.sarAccessInfoList.length !== 0) {
|
||||
if (this.sarAccessInfoList.length !== 0) {
|
||||
this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
|
||||
_this: this,
|
||||
loading: 'loadData'
|
||||
}, res => {
|
||||
if (res.ok) {
|
||||
if (res.data === "车型类别清单添加成功") {
|
||||
if (res.data === "数据库为空,添加成功") {
|
||||
this.$message.success('新增成功')
|
||||
this.isNext = true
|
||||
this.$router.push({
|
||||
name: 'AccessStandardsAndRegulations'
|
||||
})
|
||||
}else{
|
||||
} else if (res.data === "车型类别清单添加成功") {
|
||||
this.$message.success('新增成功')
|
||||
this.isNext = true
|
||||
this.$router.push({
|
||||
name: 'AccessStandardsAndRegulations'
|
||||
})
|
||||
} else if (res.data === "车型类别清单添加失败") {
|
||||
this.$message.error('已存在此车型类别清单,新增失败')
|
||||
} else if (res.data === "国家/地区清单添加成功") {
|
||||
this.$message.success('新增成功')
|
||||
this.isNext = true
|
||||
this.$router.push({
|
||||
name: 'AccessStandardsAndRegulations'
|
||||
})
|
||||
} else if (res.data === "国家/地区清单添加失败") {
|
||||
this.$message.error('已存在此国家/地区清单,新增失败')
|
||||
}
|
||||
}
|
||||
}else {
|
||||
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
||||
}
|
||||
}, e => {
|
||||
})
|
||||
}, e => {
|
||||
console.log(e)
|
||||
})
|
||||
} else {
|
||||
this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
||||
}
|
||||
} else {
|
||||
// 编辑
|
||||
this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
|
||||
@@ -1287,6 +1302,95 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// saveSarAccess () {
|
||||
// this.$refs['sarAccessForm'].validate((valid) => {
|
||||
// if (valid) {
|
||||
// let rowlist = []
|
||||
// let rowlist1 = []
|
||||
// let rowlist2 = []
|
||||
// let rowlist3 = []
|
||||
// for (let i = 0; i < this.sarAccessInfoList.length; i++) {
|
||||
// rowlist.push(this.sarAccessInfoList[i].id)
|
||||
// if (this.sarAccessInfoList[i].ssrq === null) {
|
||||
// rowlist1.push(this.sarAccessInfoList[i].ssrq = '-')
|
||||
// }else {
|
||||
// rowlist1.push(this.sarAccessInfoList[i].ssrq.toString())
|
||||
// }
|
||||
// if (this.sarAccessInfoList[i].xcxssrqgj === null) {
|
||||
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj = '-')
|
||||
// }else {
|
||||
// rowlist3.push(this.sarAccessInfoList[i].xcxssrqgj.toString())
|
||||
// }
|
||||
// if (this.sarAccessInfoList[i].zccssrqgj === null) {
|
||||
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj = '-')
|
||||
// }else {
|
||||
// rowlist2.push(this.sarAccessInfoList[i].zccssrqgj.toString())
|
||||
// }
|
||||
// }
|
||||
// rowlist = rowlist.join(',')
|
||||
// rowlist1 = rowlist1.join(',')
|
||||
// rowlist2 = rowlist2.join(',')
|
||||
// rowlist3 = rowlist3.join(',')
|
||||
// let sarAccessEO = JSON.parse(JSON.stringify(this.sarAccessEO))
|
||||
// sarAccessEO.inforlist = rowlist
|
||||
// sarAccessEO.inforlist1 = rowlist1
|
||||
// sarAccessEO.inforlist2 = rowlist2
|
||||
// sarAccessEO.inforlist3 = rowlist3
|
||||
// // sarAccessEO.countryArea = sarAccessEO.countryArea.join(',')
|
||||
// // sarAccessEO.applicationScope = sarAccessEO.applicationScope.join(',')
|
||||
// // 判断是否有附件
|
||||
// if (this.fileInfoList.length > 0) {
|
||||
// let relateFile = []
|
||||
// this.fileInfoList.map(item => {
|
||||
// relateFile.push(item.id)
|
||||
// })
|
||||
// sarAccessEO.fileIds = relateFile.join(',')
|
||||
// }
|
||||
// if (!sarAccessEO.id) {
|
||||
// // 新增
|
||||
// sarAccessEO.state = '1'
|
||||
// sarAccessEO.version = 0
|
||||
// this.$http.post('sarLawsDetailedList/sar-laws-detailed-list/insertList', sarAccessEO, {
|
||||
// _this: this,
|
||||
// loading: 'loadData'
|
||||
// }, res => {
|
||||
// if (this.sarAccessInfoList.length !== 0) {
|
||||
// if (res.ok) {
|
||||
// if (res.data === "车型类别清单添加成功") {
|
||||
// this.$message.success('新增成功')
|
||||
// this.isNext = true
|
||||
// this.$router.push({
|
||||
// name: 'AccessStandardsAndRegulations'
|
||||
// })
|
||||
// }else{
|
||||
// this.$message.error('已存在此车型类别清单,新增失败')
|
||||
// }
|
||||
// }
|
||||
// }else {
|
||||
// this.$message.error('请选中需要添加到 清单条目 的(标准号/政策编号)')
|
||||
// }
|
||||
// }, e => {
|
||||
// })
|
||||
// } else {
|
||||
// // 编辑
|
||||
// this.$http.putData('sarLawsDetailedList/sar-laws-detailed-list/updateList', sarAccessEO, {
|
||||
// _this: this,
|
||||
// loading: 'loadData'
|
||||
// }, res => {
|
||||
// if (res.ok) {
|
||||
// this.isNext = true
|
||||
// this.$router.push({
|
||||
// name: 'AccessStandardsAndRegulations'
|
||||
// })
|
||||
// }
|
||||
// }, e => {
|
||||
// })
|
||||
// }
|
||||
// }else {
|
||||
// this.$message.error('请检查表单是否填写正确')
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// 字段转化
|
||||
changeText(val) {
|
||||
val.forEach(item => {
|
||||
|
||||
Reference in New Issue
Block a user