This commit is contained in:
zds
2022-12-15 16:29:01 +08:00
parent 3fca2fc149
commit b6f7e921bd
9 changed files with 2166 additions and 111 deletions

View File

@@ -43,7 +43,7 @@
:controls="false"
:precision="3"
:min="1"
disabled
:disabled="type3"
style="width: 210px"
/>
</el-form-item>
@@ -432,6 +432,7 @@ export default {
structshow5: false,
struct2type: '',
button1: true,
type3: true,
button2: true,
button3: true,
tableDtl: [],
@@ -647,6 +648,11 @@ export default {
} else {
this.button3 = true
}
if (row === '03') {
this.type3 = false
} else {
this.type3 = true
}
},
storChange2(row) {
if (this.form.is_again_put === '1' && this.form.formula_type === '00') {

View File

@@ -42,8 +42,11 @@
<el-table
ref="table"
:data="tableDtl"
style="width: 100%;"
style="width: 100%;background: transparent;overflow:auto;"
:max-height="590"
border
show-summary
:summary-method="getSummaries"
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
@@ -104,6 +107,7 @@ export default {
report.query4().then(res => {
this.XLList = res
})
this.MyQuery2()
},
/**
* 接受父组件传值
@@ -136,6 +140,43 @@ export default {
this.fullscreenLoading = false
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'receive_qty') {
const total = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = parseFloat(total).toFixed(3)
sums[index]
}
if (column.property === 'noin_qty') {
const total = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = parseFloat(total).toFixed(3)
sums[index]
}
})
return sums
},
MyQuery2() {
this.fullscreenLoading = true
report.query2(this.queryrow).then(res => {

View File

@@ -42,8 +42,11 @@
<el-table
ref="table"
:data="tableDtl"
style="width: 100%;"
style="width: 100%;background: transparent;overflow:auto;"
:max-height="590"
border
show-summary
:summary-method="getSummaries"
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
@@ -103,6 +106,7 @@ export default {
report.query4().then(res => {
this.XLList = res
})
this.MyQuery2()
},
/**
* 接受父组件传值
@@ -135,6 +139,43 @@ export default {
this.fullscreenLoading = false
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'sumqty') {
const total = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = parseFloat(total).toFixed(3)
sums[index]
}
if (column.property === 'notqty') {
const total = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = parseFloat(total).toFixed(3)
sums[index]
}
})
return sums
},
MyQuery2() {
this.fullscreenLoading = true
report.query3(this.queryrow).then(res => {

View File

@@ -42,8 +42,11 @@
<el-table
ref="dragTable"
:data="tableDtl"
style="width: 100%;"
style="width: 100%;background: transparent;overflow:auto;"
:max-height="590"
border
show-summary
:summary-method="getSummaries"
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
>
@@ -100,6 +103,7 @@ export default {
report.query4().then(res => {
this.XLList = res
})
this.MyQuery2()
},
/**
* 接受父组件传值
@@ -132,6 +136,30 @@ export default {
this.fullscreenLoading = false
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
}
const values = data.map(item => Number(item[column.property]))
if (column.property === 'qty') {
const total = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = parseFloat(total).toFixed(3)
sums[index]
}
})
return sums
},
MyQuery2() {
this.fullscreenLoading = true
report.query1(this.queryrow).then(res => {