|
|
|
@ -23,8 +23,8 @@ |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-upload class="customer-upload" drag |
|
|
|
action="javascript:void(0);" ref="uploadFile" :limit="1" |
|
|
|
<el-upload class="customer-upload" drag multiple :file-list="fileList" |
|
|
|
action="javascript:void(0);" ref="uploadFile" |
|
|
|
:before-upload="beforeUploadHandle" :on-change="onChange" |
|
|
|
accept="*" :auto-upload="false" |
|
|
|
style="text-align: left;"> |
|
|
|
@ -37,7 +37,7 @@ |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" @click="saveUploadFile()">保存</el-button> |
|
|
|
<el-button type="primary" @click="saveUploadFile">保存</el-button> |
|
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
@ -88,12 +88,14 @@ export default { |
|
|
|
// this.num++ |
|
|
|
}, |
|
|
|
/* 选择上传文件时 */ |
|
|
|
onChange (file) { |
|
|
|
this.fileList.push(file) |
|
|
|
onChange (file, fileList) { |
|
|
|
this.fileList = fileList |
|
|
|
}, |
|
|
|
/* 关闭modal */ |
|
|
|
closeDialog () { |
|
|
|
this.fileList = [] |
|
|
|
// 清空文件上传记录 |
|
|
|
this.$refs.uploadFile.clearFiles() |
|
|
|
// 刷新报工的页面 |
|
|
|
this.$emit('refreshPageTables') |
|
|
|
// 关闭当前的页面 |
|
|
|
@ -113,7 +115,9 @@ export default { |
|
|
|
} |
|
|
|
const formData = new FormData() |
|
|
|
// 片接文件 |
|
|
|
formData.append("file", this.fileList[0].raw) |
|
|
|
for (let i = 0; i < this.fileList.length; i++) { |
|
|
|
formData.append("file",this.fileList[i].raw) |
|
|
|
} |
|
|
|
formData.append("orderRef1", this.pageData.site) |
|
|
|
formData.append("orderRef2", this.pageData.partNo) |
|
|
|
formData.append("orderRef3", this.pageData.inspectionTypeNo) |
|
|
|
|