Commit 961cb2ae authored by liming's avatar liming

成本表

parent 1d034654
<template> <template>
<a-card class="cust-list-cart"> <a-card class="cust-list-cart">
<!-- <div> <div>
<a-form layout="horizontal" class="ant-advanced-search-form"> <a-form layout="horizontal" class="ant-advanced-search-form">
<div> <div>
<a-row> <a-row>
<a-col :span="6"> <a-col :span="12">
<a-form-item <a-form-item
label="用户名" label="登记日期"
:labelCol="{ span: 8 }" :labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }" :wrapperCol="{ span: 16 }"
> >
<a-input <a-range-picker @change="onChange" />
@pressEnter="search"
style="width: 100%"
v-model="query.realname"
placeholder="请输入"
/>
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
</div> </div>
</a-form> </a-form>
</div> --> </div>
<div> <div>
<a-table <a-table
size="middle" size="middle"
...@@ -37,10 +32,9 @@ ...@@ -37,10 +32,9 @@
<a-icon type="hdd" />项目工时成本表{{ data.none }} <a-icon type="hdd" />项目工时成本表{{ data.none }}
</span> </span>
<div class="cust-table-operator"> <div class="cust-table-operator">
<!-- <a-button-group> <a-button-group>
<a-button type="primary" @click="search">查询</a-button> <a-button type="primary" @click="search">查询</a-button>
<a-button @click="reset">重置</a-button> </a-button-group>
</a-button-group> -->
</div> </div>
</div> </div>
</a-table> </a-table>
...@@ -50,17 +44,32 @@ ...@@ -50,17 +44,32 @@
<script> <script>
import { getProjectCostReport } from "@/api/report/report"; import { getProjectCostReport } from "@/api/report/report";
import moment from "moment";
import { formatDate } from "@/util/util";
const dataSource = []; const dataSource = [];
const columns = [ const columns = [
{ title: "名称", width: 300, dataIndex: "name", align: "left" }, { title: "名称", dataIndex: "name", align: "left" },
{
title: "最早登记时间",
width: 130,
dataIndex: "beginDate",
align: "right",
customRender: (text) => formatDate(new Date(text), "yyyy-MM-dd"),
},
{
title: "最近登记时间",
width: 130,
dataIndex: "endDate",
align: "right",
customRender: (text) => formatDate(new Date(text), "yyyy-MM-dd"),
},
{ title: "工时", width: 100, dataIndex: "hours", align: "right" }, { title: "工时", width: 100, dataIndex: "hours", align: "right" },
{ {
title: "标准工时成本", title: "标准工时成本",
width: 100, width: 130,
dataIndex: "baseHoursCost", dataIndex: "baseHoursCost",
align: "right", align: "right",
} },
]; ];
export default { export default {
...@@ -69,16 +78,24 @@ export default { ...@@ -69,16 +78,24 @@ export default {
return { return {
isFirstLoad: true, isFirstLoad: true,
query: { query: {
name: "" name: "",
beginDate: null,
endDate: null,
}, },
rowKey: "key", rowKey: "key",
index: -1, index: -1,
loading: false, loading: false,
columns: columns, columns: columns,
dataSource: dataSource dataSource: dataSource,
}; };
}, },
methods: { methods: {
onChange(date, dateString) {
if (dateString.length === 2) {
this.query.beginDate = dateString[0];
this.query.endDate = dateString[1];
}
},
search() { search() {
this.loadData(); this.loadData();
}, },
...@@ -104,7 +121,6 @@ export default { ...@@ -104,7 +121,6 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
}, },
mounted() {}, mounted() {},
activated() { activated() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment