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