This commit is contained in:
bb_pan 2025-12-10 17:45:52 +08:00
parent c28493b2ca
commit cc5a56299f
1 changed files with 26 additions and 10 deletions

View File

@ -123,16 +123,11 @@
<el-card class="content-box">
<el-row>
<el-col :span="24" style="text-align: right">
<el-button
type="primary"
size="mini"
@click="equipmentDeployment"
v-show="!isAddVisible"
>
<el-button type="primary" size="mini" @click="equipmentDeployment" v-show="!isAddVisible">
新增装备
</el-button>
<el-button type="primary" size="mini" @click="handleImport" v-show="!isAddVisible"> 批量导入 </el-button>
<el-button type="primary" size="mini" @click="handleImportImg" v-show="!isAddVisible">
<el-button type="primary" size="mini" @click="handleImportImg" v-show="!isAddVisible && tableData.length > 0">
批量导入图片
</el-button>
</el-col>
@ -571,7 +566,7 @@
</el-dialog>
<el-dialog title="批量导入图片" :visible.sync="upload.open2" width="400px" append-to-body>
<el-upload
ref="upload"
ref="upload2"
:limit="1"
accept=".zip"
:headers="upload.headers"
@ -595,6 +590,10 @@
</el-link>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm2"> </el-button>
<el-button @click="upload.open2 = false"> </el-button>
</div>
</el-dialog>
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
<el-upload
@ -782,6 +781,7 @@ export default {
this.upload.open2 = false
this.upload.isUploading = false
this.$refs.upload.clearFiles()
this.$refs.upload2.clearFiles()
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
@ -789,12 +789,24 @@ export default {
'导入结果',
{ dangerouslyUseHTMLString: true },
)
this.getList()
this.$router.replace({
query: {
orderId: response.data,
isAddVisible: this.isAddVisible,
isApprovalVisible: this.isApprovalVisible,
},
})
setTimeout(() => {
this.getList()
}, 200)
},
//
submitFileForm() {
this.$refs.upload.submit()
},
submitFileForm2() {
this.$refs.upload2.submit()
},
//
getManufacturerSelectList() {
getManufacturerSelectApi().then((res) => {
@ -1102,7 +1114,11 @@ export default {
this.download('/material-mall/order/template', {}, `装备信息导入模板_${new Date().getTime()}.xlsx`)
},
importTemplate2() {
this.download(`/material-mall/order/zip?orderId=${this.orderId}`, {}, `装备信息图片导入模板_${new Date().getTime()}.zip`)
this.download(
`/material-mall/order/zip?orderId=${this.orderId}`,
{},
`装备信息图片导入模板_${new Date().getTime()}.zip`,
)
},
async addList() {
try {