add:日常需求迭代

This commit is contained in:
zhangzhiqiang
2023-03-17 19:08:22 +08:00
parent 4b1ef310fc
commit c36cb73bcf
11 changed files with 209 additions and 71 deletions

View File

@@ -28,6 +28,19 @@
:value="item.material_id"
/>
</el-select>
供应商:<el-input
v-model="queryrow.source_name"
size="mini"
style="width: 200px"
clearable
placeholder="模糊查询"
@change="MyQuery3"
/>
<el-checkbox
v-model="queryrow.hide"
style="color: red"
@change="MyQuery4"
>隐藏在途重量为零</el-checkbox>
</el-col>
<el-col :span="4">
<span>
@@ -42,8 +55,8 @@
size="mini"
@click="downExcel"
>
导出Excel
</el-button>
导出Excel
</el-button>
</span>
</el-col>
</el-row>
@@ -67,6 +80,7 @@
<el-table-column prop="notqty" label="在途重量" min-width="100" :formatter="crud.formatNum2" />
<el-table-column prop="norigtaxprice" label="含税单价" min-width="100" :formatter="crud.formatNum2" />
<el-table-column prop="norigtaxmny" label="金额" min-width="100" :formatter="crud.formatNum2" />
<el-table-column prop="notmny" label="在途金额" min-width="100" :formatter="crud.formatNum2" />
<el-table-column prop="name" label="供应商" min-width="150" />
</el-table>
</el-dialog>
@@ -99,7 +113,7 @@ export default {
cxjList: [],
XLList: [],
fullscreenLoading: false,
queryrow: { material_id: '' },
queryrow: { material_id: '', source_name: '', hide: true },
sortable: null,
rows: []
}
@@ -152,6 +166,8 @@ export default {
},
close() {
this.queryrow.material_id = ''
this.queryrow.source_name = ''
this.queryrow.hide = true
this.tableDtl = []
this.$emit('update:dialogShow', false)
},
@@ -165,6 +181,26 @@ export default {
this.fullscreenLoading = false
})
},
MyQuery3(value) {
this.queryrow.source_name = value
this.fullscreenLoading = true
report.query3(this.queryrow).then(res => {
this.tableDtl = res
this.fullscreenLoading = false
}).catch(() => {
this.fullscreenLoading = false
})
},
MyQuery4(value) {
this.queryrow.hide = value
this.fullscreenLoading = true
report.query3(this.queryrow).then(res => {
this.tableDtl = res
this.fullscreenLoading = false
}).catch(() => {
this.fullscreenLoading = false
})
},
getSummaries(param) {
const { columns, data } = param
const sums = []
@@ -212,6 +248,18 @@ export default {
sums[index] = parseFloat(total).toFixed(3)
sums[index]
}
if (column.property === 'notmny') {
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
},