更新采购订单、发货、合同查询、盘点、入库和配置文件,新增零改单和文档
This commit is contained in:
@@ -188,7 +188,7 @@
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="small" @click="dialogFormVisible2=false">取消</el-button>
|
||||
<el-button type="distribution" size="small" @click="submit2('form')">确定</el-button>
|
||||
<el-button :loading="uploadSaving" type="distribution" size="small" @click="submit2('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -204,6 +204,10 @@ export default {
|
||||
Data: {},
|
||||
limit: 1000,
|
||||
upload: url,
|
||||
uploadSaving: false,
|
||||
uploadFileTotal: 0,
|
||||
uploadFileFinished: 0,
|
||||
uploadFileFailed: 0,
|
||||
dialogFormVisible1: false,
|
||||
dialogFormVisible2: false,
|
||||
listValue: '',
|
||||
@@ -319,16 +323,36 @@ export default {
|
||||
if (response.data && response.data[0] && response.data[0].result === '1') {
|
||||
console.log('文件保存成功:', savePath)
|
||||
} else {
|
||||
this.uploadFileFailed++
|
||||
console.error('文件保存失败:', response.data)
|
||||
}
|
||||
}).catch(err => {
|
||||
this.uploadFileFailed++
|
||||
console.error('文件保存异常:', err)
|
||||
}).finally(() => {
|
||||
this.uploadFileFinished++
|
||||
if (this.uploadFileFinished >= this.uploadFileTotal) {
|
||||
this.uploadSaving = false
|
||||
if (this.uploadFileFailed === 0) {
|
||||
this.$message.success('图片上传成功')
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs.upload.clearFiles()
|
||||
this.searchTable()
|
||||
} else {
|
||||
this.$message.error('部分图片上传失败,请重新上传失败图片')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
this.dialogFormVisible2 = false
|
||||
this.$refs.upload.clearFiles()
|
||||
},
|
||||
submit2() {
|
||||
if (!this.$refs.upload || this.$refs.upload.uploadFiles.length === 0) {
|
||||
this.$message.warning('请选择图片')
|
||||
return
|
||||
}
|
||||
this.uploadSaving = true
|
||||
this.uploadFileTotal = this.$refs.upload.uploadFiles.length
|
||||
this.uploadFileFinished = 0
|
||||
this.uploadFileFailed = 0
|
||||
var param = []
|
||||
param[0] = ['发货单流水号', this.listValue]
|
||||
param[1] = ['文件名称', '']
|
||||
@@ -337,10 +361,6 @@ export default {
|
||||
var Data1 = this.CreateData('15', '发货管理_发货单_上传图片', param)
|
||||
this.Data.param = Data1
|
||||
this.$refs.upload.submit()
|
||||
this.dialogFormVisible2 = false
|
||||
this.$nextTick(() => {
|
||||
this.searchTable()
|
||||
})
|
||||
},
|
||||
uploadPicture(row) {
|
||||
this.dialogFormVisible2 = true
|
||||
|
||||
Reference in New Issue
Block a user