修复单据附件上传失败问题

master
toesbieya 6 years ago
parent ac7257be8b
commit 4e0c9636a7
  1. 2
      java/cloud/web/web-modules/record/src/main/java/cn/toesbieya/jxc/record/service/RecordService.java
  2. 2
      java/local/src/main/resources/mapper/RecAttachment.xml
  3. 9
      vue/src/mixins/bizDocDetailMixin.js

@ -95,7 +95,7 @@ public class RecordService implements RecordApi {
return attachmentMapper.selectList(
Wrappers.lambdaQuery(RecAttachment.class)
.eq(RecAttachment::getPid, pid)
.orderByDesc(RecAttachment::getSort)
.orderByAsc(RecAttachment::getSort)
);
}

@ -5,7 +5,7 @@
select *
from rec_attachment
where pid = #{pid}
order by sort desc
order by sort
</select>
<select id="getUrlByPid" resultType="java.lang.String">
select url

@ -34,6 +34,7 @@ export default {
data() {
return {
attachmentSortSeed: 0,
loading: true,
//单据提交历史
history: [],
@ -241,7 +242,13 @@ export default {
//附件操作
uploadSuccess(file, res) {
this.form.uploadImageList.push({url: res.key, name: file.name, order: 0, size: file.size})
this.form.uploadImageList.push({
url: res.key,
name: file.name,
sort: this.attachmentSortSeed,
size: file.size
})
this.attachmentSortSeed++
},
removeUpload(file) {
this.form.deleteImageList.push(file.url)

Loading…
Cancel
Save