| | |
| | | </li> |
| | | </ul> |
| | | <div |
| | | v-show="currentTypeObj[type]['upParams'] === 'classifyAttr' && this.type !== 'bulkEdit'" |
| | | v-show="currentTypeObj[type]['upParams'] === 'classifyAttr' && this.type !== 'bulkEdit'&& this.type !== 'groupCode'" |
| | | class="radio_box" |
| | | > |
| | | <span>分类的路径使用的属性:</span> |
| | |
| | | > |
| | | </el-upload> |
| | | <template #footer> |
| | | <el-button |
| | | v-if="type !== 'bulkEdit'" |
| | | :loading="downloadLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="downloadTemplateFun" |
| | | >下载导入模板 |
| | | </el-button> |
| | | <el-button v-if="type === 'bulkEdit'" |
| | | :loading="downloadLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="downloadTemplateFun" |
| | | >下载编辑模板 |
| | | </el-button> |
| | | <el-button size="small" @click="dialogVisible = false">关闭</el-button> |
| | | <div style="display: inline-block" v-if="type != 'groupCode'"> |
| | | <el-button |
| | | v-if="type !== 'bulkEdit' " |
| | | :loading="downloadLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="downloadTemplateFun" |
| | | >下载导入模板 |
| | | </el-button> |
| | | <el-button v-if="type === 'bulkEdit'" |
| | | :loading="downloadLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="downloadTemplateFun" |
| | | >下载编辑模板 |
| | | </el-button> |
| | | </div> |
| | | <div style="display: inline-block"> |
| | | <el-button size="small" @click="dialogVisible = false">关闭</el-button> |
| | | </div> |
| | | |
| | | </template> |
| | | <ShowImportData |
| | | v-if="showVisible" |
| | |
| | | return { |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | }; |
| | | } else if (this.type === 'groupCode') { |
| | | return { |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | }; |
| | | } |
| | | }, |
| | | }, |
| | |
| | | downloadTemplateFun: downloadBatchApplyCodeTemplate, |
| | | upParams: "classifyAttr", |
| | | }, |
| | | groupCode: { |
| | | title: "集团码导入", |
| | | tipList: [ |
| | | "1.标题带五角星的表示关键属性,带星号表示必输项", |
| | | "2.每次仅能最多导入5000条数据(可通过nacos进行配置,推荐5000/次导入),如果出错会返回错误的数据和原因,但是正确数据可以继续保存", |
| | | "3.Excel第一行和第二行依次为企业编码和集团编码(必填)" |
| | | ], |
| | | action: "/api/ubcs-code/mdmEngineController/importGroupCode", |
| | | downloadTemplateFun: null, |
| | | upParams: "classifyAttr", |
| | | } |
| | | }, |
| | | secDTOList: [], |
| | | }; |
| | |
| | | return; |
| | | } |
| | | if (this.type === 'bulkEdit') { |
| | | this.tableHeadFindData.map(item => item.prop) |
| | | .forEach((prop, index) => { |
| | | this.exportArrTwo[`attrIdIndexMap[${index}]`] = prop; |
| | | }); |
| | | downloadExcelBatchEdit({ |
| | | codeClassifyOid: this.codeClassifyOid, |
| | | 'conditionMap[oid]': this.ids, ...this.exportArrTwo, |
| | | limit: -1 |
| | | }).then(res => { |
| | | // console.log('res',res) |
| | | if (res) { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('下载成功,请查看!') |
| | |
| | | } |
| | | }, |
| | | onSuccess(res) { |
| | | console.log(res) |
| | | if (Object.keys(res.data).length === 0) { |
| | | this.$message.success(this.title + "导入成功!"); |
| | | this.resetTable() |