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',
yellow: 'yellow',
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:'蓝',
yellow:'黄',
resultReported:'结果报告',
TheDoesNotContainData:'该虚拟清单的维护清单中没有数据,是否需要添加',
}
@@ -161,7 +161,8 @@
this.confirmLoading = true
postAction('sys/user/queryDepartUserTreeList', {
departId: this.departId,
json: gData
json: gData,
flag:'1',
}).then((res) => {
this.confirmLoading = false
if (res.success) {
@@ -53,7 +53,7 @@
<div class="drawer-bootom-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>
</a-drawer>
</template>
@@ -159,13 +159,14 @@
handleCancel() {
this.visible = false
},
handleSubmit() {
handleSubmit(flag) {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.confirmLoading = true
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
postAction(this.url.addModel, {
dummyInventoryBaseId: selectedRowKeys.join(','),
projectLibraryId: this.$route.query.id
projectLibraryId: this.$route.query.id,
flag: flag
}).then((res) => {
if (res.success) {
this.confirmLoading = false
@@ -174,14 +175,27 @@
this.selectedRowKeys = []
this.$emit('transferListForm')
} else {
if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') {
this.confirmLoading = false
this.getAdd()
return
}
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
this.visible = false
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
getAdd() {
let _this = this
this.$confirm({
content: _this.$t('TheDoesNotContainData'),
onOk() {
_this.handleSubmit('1')
}
})
}
}
}