代码更新

This commit is contained in:
2022-10-20 21:14:06 +08:00
parent 910adcfd5b
commit 42e40b2f48
14 changed files with 363 additions and 40 deletions

View File

@@ -38,7 +38,18 @@
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="downdtl"
>
导出Excel
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
ref="table"
@@ -68,6 +79,8 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker'
import {download} from "@/api/data";
import {downloadFile} from "@/utils";
export default {
name: 'Performancemst',
@@ -106,6 +119,22 @@ export default {
// 钩子在获取表格数据之前执行false 则代表不获取数据
[CRUD.HOOK.beforeRefresh]() {
return true
},
downdtl() {
if (this.currentRow !== null) {
crud.downloadLoading = true
const data = {
'begin_time': this.crud.query.createTime[0],
'end_time': this.crud.query.createTime[1],
'assessor_id': this.crud.query.assessor_id
}
download('/api/performancemst/download', data).then(result => {
downloadFile(result, '工作量统计', 'xlsx')
crud.downloadLoading = false
}).catch(() => {
crud.downloadLoading = false
})
}
}
}
}

View File

@@ -345,6 +345,7 @@ export default {
}
},
tableChanged(rows) {
debugger
const tablemap = new Map()
rows.forEach((item) => {
if (this.form.tableData.length !== 0) {

View File

@@ -45,7 +45,7 @@
<el-table-column type="selection" width="55" />
<el-table-column prop="supp_name" label="供应商" min-width="220" show-overflow-tooltip />
<el-table-column show-overflow-tooltip prop="input_time" min-width="140px" label="订单日期" />
<el-table-column show-overflow-tooltip prop="source_bill_code" label="单据编号" min-width="140" />
<el-table-column show-overflow-tooltip prop="vbillcode" label="单据编号" min-width="140" />
<el-table-column show-overflow-tooltip prop="crowno" label="明细行号" />
<el-table-column show-overflow-tooltip prop="material_code" min-width="130" label="物料编号" />
<el-table-column show-overflow-tooltip min-width="130" prop="material_name" label="物料名称" />

View File

@@ -64,7 +64,18 @@
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission" />
<crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-check"
size="mini"
@click="downdtl"
>
导出Excel
</el-button>
</crudOperation>
<!--表格渲染-->
<el-table
ref="table"
@@ -97,6 +108,8 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker'
import {download} from "@/api/data";
import {downloadFile} from "@/utils";
export default {
name: 'Powderorder',
@@ -141,6 +154,24 @@ export default {
},
hand(value) {
this.crud.toQuery()
},
downdtl() {
if (this.currentRow !== null) {
crud.downloadLoading = true
const data = {
'begin_time': this.crud.query.createTime[0],
'end_time': this.crud.query.createTime[1],
'status': this.crud.query.status,
'pcsn': this.crud.query.pcsn,
'material_code': this.crud.query.material_code
}
download('/api/powderOrderQuery/download', data).then(result => {
downloadFile(result, '粉料开单记录', 'xlsx')
crud.downloadLoading = false
}).catch(() => {
crud.downloadLoading = false
})
}
}
}
}