法规清单的调取

This commit is contained in:
qq787203167
2022-05-10 09:28:03 +08:00
parent 06009db17d
commit c87f916175
3 changed files with 19 additions and 3 deletions
+1
View File
@@ -788,4 +788,5 @@ module.exports = {
blue: 'blue', blue: 'blue',
yellow: 'yellow', yellow: 'yellow',
resultReported:'Result Reported', resultReported:'Result Reported',
TheDoesNotContainData:'The maintenance list of the virtual list does not contain data',
} }
+1
View File
@@ -793,4 +793,5 @@ module.exports = {
blue:'蓝', blue:'蓝',
yellow:'黄', yellow:'黄',
resultReported:'结果报告', resultReported:'结果报告',
TheDoesNotContainData:'该虚拟清单的维护清单中没有数据,是否需要添加',
} }
@@ -159,13 +159,14 @@
handleCancel() { handleCancel() {
this.visible = false this.visible = false
}, },
handleSubmit() { handleSubmit(flag) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
postAction(this.url.addModel, { postAction(this.url.addModel, {
dummyInventoryBaseId: selectedRowKeys.join(','), dummyInventoryBaseId: selectedRowKeys.join(','),
projectLibraryId: this.$route.query.id projectLibraryId: this.$route.query.id,
flag: flag
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
this.confirmLoading = false this.confirmLoading = false
@@ -174,14 +175,27 @@
this.selectedRowKeys = [] this.selectedRowKeys = []
this.$emit('transferListForm') this.$emit('transferListForm')
} else { } else {
if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') {
this.confirmLoading = false
this.getAdd()
return
}
this.$message.warning(this.$t('operationFailed')) this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false this.confirmLoading = false
} }
}) })
this.visible = false
} else { } else {
this.$message.warning(this.$t('selectLeastOne')) this.$message.warning(this.$t('selectLeastOne'))
} }
},
getAdd() {
let _this = this
this.$confirm({
content: _this.$t('TheDoesNotContainData'),
onOk() {
_this.handleSubmit(1)
}
})
} }
} }
} }