当前采购数量丢失

master
Harry Yang 2023-01-04 18:56:13 +08:00
parent 088f6fb616
commit f43207a44a
3 changed files with 12 additions and 4 deletions

View File

@ -287,6 +287,10 @@
return response.json()
}
function isImage(path) {
return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(path);
}
const data = () => {
return {
process: {},
@ -339,7 +343,9 @@
const mapAttachment = attachment => {
if (hasText(attachment)) {
try {
return JSON.parse(attachment)
return JSON.parse(attachment).map(item => ({
...item, isImage: isImage(item.name)
}))
} catch (e) {
return []
}

View File

@ -1120,10 +1120,11 @@
const { row } = scope
const { children } = row
const newRow = {
...row,
// ...row,
rowKey: this.rowKeyCounter++,
newRow: true,
parent: row // 记录上一级元素,在删除的时候使用
parent: row, // 记录上一级元素,在删除的时候使用
amountCurrent: row.amountCurrent
}
delete newRow['children']

View File

@ -1311,7 +1311,8 @@
// ...row, // 不显示数据相同的部分
rowKey: this.rowKeyCounter++,
newRow: true,
parent: row // 记录上一级元素,在删除的时候使用
parent: row, // 记录上一级元素,在删除的时候使用
amountCurrent: row.amountCurrent
}
delete newRow['children']