当前采购数量丢失
parent
088f6fb616
commit
f43207a44a
|
@ -287,6 +287,10 @@
|
||||||
return response.json()
|
return response.json()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isImage(path) {
|
||||||
|
return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(path);
|
||||||
|
}
|
||||||
|
|
||||||
const data = () => {
|
const data = () => {
|
||||||
return {
|
return {
|
||||||
process: {},
|
process: {},
|
||||||
|
@ -339,7 +343,9 @@
|
||||||
const mapAttachment = attachment => {
|
const mapAttachment = attachment => {
|
||||||
if (hasText(attachment)) {
|
if (hasText(attachment)) {
|
||||||
try {
|
try {
|
||||||
return JSON.parse(attachment)
|
return JSON.parse(attachment).map(item => ({
|
||||||
|
...item, isImage: isImage(item.name)
|
||||||
|
}))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
|
@ -1120,10 +1120,11 @@
|
||||||
const { row } = scope
|
const { row } = scope
|
||||||
const { children } = row
|
const { children } = row
|
||||||
const newRow = {
|
const newRow = {
|
||||||
...row,
|
// ...row,
|
||||||
rowKey: this.rowKeyCounter++,
|
rowKey: this.rowKeyCounter++,
|
||||||
newRow: true,
|
newRow: true,
|
||||||
parent: row // 记录上一级元素,在删除的时候使用
|
parent: row, // 记录上一级元素,在删除的时候使用
|
||||||
|
amountCurrent: row.amountCurrent
|
||||||
}
|
}
|
||||||
|
|
||||||
delete newRow['children']
|
delete newRow['children']
|
||||||
|
|
|
@ -1311,7 +1311,8 @@
|
||||||
// ...row, // 不显示数据相同的部分
|
// ...row, // 不显示数据相同的部分
|
||||||
rowKey: this.rowKeyCounter++,
|
rowKey: this.rowKeyCounter++,
|
||||||
newRow: true,
|
newRow: true,
|
||||||
parent: row // 记录上一级元素,在删除的时候使用
|
parent: row, // 记录上一级元素,在删除的时候使用
|
||||||
|
amountCurrent: row.amountCurrent
|
||||||
}
|
}
|
||||||
|
|
||||||
delete newRow['children']
|
delete newRow['children']
|
||||||
|
|
Loading…
Reference in New Issue