diff --git a/src/views/modules/qc/qcItem.vue b/src/views/modules/qc/qcItem.vue index eef0813..798383a 100644 --- a/src/views/modules/qc/qcItem.vue +++ b/src/views/modules/qc/qcItem.vue @@ -1571,8 +1571,7 @@ qcUpload () { let currentData = { flag: 'item', - createBy: this.$store.state.user.name, - site: this.$store.state.user.site, + createBy: this.$store.state.user.name } //打开组件 去做新增业务 this.$nextTick(() => { diff --git a/src/views/modules/qc/qcMethod.vue b/src/views/modules/qc/qcMethod.vue index 1f55f36..67c8068 100644 --- a/src/views/modules/qc/qcMethod.vue +++ b/src/views/modules/qc/qcMethod.vue @@ -719,8 +719,7 @@ qcUpload () { let currentData = { flag: 'method', - createBy: this.$store.state.user.name, - site: this.$store.state.user.site, + createBy: this.$store.state.user.name } this.$nextTick(() => { this.$refs.qcUpload.init(currentData) diff --git a/src/views/modules/qc/qcPartAttribute.vue b/src/views/modules/qc/qcPartAttribute.vue index 2e46079..d6d6ec6 100644 --- a/src/views/modules/qc/qcPartAttribute.vue +++ b/src/views/modules/qc/qcPartAttribute.vue @@ -3358,8 +3358,7 @@ let currentData = { flag: flag, title: title, - createBy: this.$store.state.user.name, - site: this.$store.state.user.site, + createBy: this.$store.state.user.name } this.$nextTick(() => { this.$refs.qcUpload.init(currentData) @@ -3370,8 +3369,7 @@ qcUpload () { let currentData = { flag: 'partAttribute', - createBy: this.$store.state.user.name, - site: this.$store.state.user.site, + createBy: this.$store.state.user.name } //打开组件 去做新增业务 this.$nextTick(() => { diff --git a/src/views/modules/qc/qcTemplate.vue b/src/views/modules/qc/qcTemplate.vue index 7a9dcde..2acf201 100644 --- a/src/views/modules/qc/qcTemplate.vue +++ b/src/views/modules/qc/qcTemplate.vue @@ -1825,7 +1825,6 @@ let currentData = { flag: 'template', createBy: this.$store.state.user.name, - site: this.$store.state.user.site, title: '模板导入' } this.$nextTick(() => { @@ -1838,7 +1837,6 @@ let currentData = { flag: 'templateItem', createBy: this.$store.state.user.name, - site: this.$store.state.user.site, title: '检验项目导入' } this.$nextTick(() => { diff --git a/src/views/modules/qc/qc_upload.vue b/src/views/modules/qc/qc_upload.vue index 6c067f7..1451be4 100644 --- a/src/views/modules/qc/qc_upload.vue +++ b/src/views/modules/qc/qc_upload.vue @@ -2,7 +2,17 @@
- 下载文件模板 +
+ 下载文件模板 + + + + +
{ + this.siteList = (data && data.rows) ? data.rows : [] + if (!this.selectedSite && this.siteList.length) { + this.selectedSite = this.siteList[0].siteID + } + }) + }, + getDefaultSite () { + return (this.siteList && this.siteList.length) ? this.siteList[0].siteID : '' + }, getSiteAndBu () { let tempData = { username: this.$store.state.user.name, @@ -97,8 +122,10 @@ export default { this.titleCon = this.pageData.title || '文件导入' this.fileList = [] this.bu = '' + this.selectedSite = this.getDefaultSite() this.saveLoading = false this.visible = true + this.loadSiteList() this.$nextTick(() => { if (this.$refs.uploadFile) { this.$refs.uploadFile.clearFiles() @@ -122,6 +149,7 @@ export default { closeDialog(){ this.fileList = [] this.bu = '' + this.selectedSite = this.getDefaultSite() this.saveLoading = false this.$emit('refreshPageTables'); this.visible = false; @@ -154,7 +182,7 @@ export default { return false; } if (this.isMasterImport && !this.importSite) { - this.$message.warning("未获取到当前用户工厂"); + this.$message.warning("请选择工厂"); return false; } if (this.fileList == null || this.fileList.length === 0){ @@ -227,7 +255,7 @@ export default { partStandard: '物料检验标准导入模板.xlsx' } if (!this.importSite) { - this.$message.warning("未获取到当前用户工厂") + this.$message.warning("请选择工厂") return } await downloadQcImportTemplate(this.pageData.flag, this.importSite).then(({data}) => { @@ -274,4 +302,12 @@ export default { }