Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangzhijiang
2022-05-10 09:48:15 +08:00
4 changed files with 22 additions and 5 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:'该虚拟清单的维护清单中没有数据,是否需要添加',
} }
@@ -161,7 +161,8 @@
this.confirmLoading = true this.confirmLoading = true
postAction('sys/user/queryDepartUserTreeList', { postAction('sys/user/queryDepartUserTreeList', {
departId: this.departId, departId: this.departId,
json: gData json: gData,
flag:'1',
}).then((res) => { }).then((res) => {
this.confirmLoading = false this.confirmLoading = false
if (res.success) { if (res.success) {
@@ -53,7 +53,7 @@
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button> <a-button @click="handleCancel" type="danger" style="margin-right: 16px">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit(undefined)" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div> </div>
</a-drawer> </a-drawer>
</template> </template>
@@ -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')
}
})
} }
} }
} }