This commit is contained in:
liushuai
2019-04-09 19:10:07 +08:00

View File

@@ -1,134 +1,153 @@
<template> <template>
<div class="app-container"> <div class="app-container bold-font">
<el-card> <el-card>
<span>项目名称</span> <div slot="header">
<el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small" @change="searchMachine"> <h3 style="display: inline-block;margin: 0">项目名称:</h3>
<el-option <el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small" @change="searchMachine">
v-for="item in project" <el-option
:key="item.value" v-for="item in project"
:label="item.label" :key="item.value"
:value="item.value"/> :label="item.label"
</el-select> :value="item.value"/>
</el-select>
<span>机床图号</span> <h3 style="display: inline-block;margin: 0 0 0 20px">机床图号:</h3>
<el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small"> <el-select v-model="machineValue" placeholder="请选择机床图号" filterable size="small">
<el-option <el-option
v-for="item in machine" v-for="item in machine"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<!--<span>签订日期:</span>-->
<!--<span>签订日期:</span>--> <!--<el-date-picker-->
<!--<el-date-picker--> <!--v-model="startTime"-->
<!--v-model="startTime"--> <!--value-format="yyyy-MM-dd"-->
<!--value-format="yyyy-MM-dd"--> <!--size="small"-->
<!--size="small"--> <!--style="width: 160px"-->
<!--style="width: 160px"--> <!--type="date"-->
<!--type="date"--> <!--placeholder="选择日期"/>-->
<!--placeholder="选择日期"/>--> <!--<span class="demonstration">~</span>-->
<!--<span class="demonstration">~</span>--> <!--<el-date-picker-->
<!--<el-date-picker--> <!--v-model="endTime"-->
<!--v-model="endTime"--> <!--value-format="yyyy-MM-dd"-->
<!--value-format="yyyy-MM-dd"--> <!--size="small"-->
<!--size="small"--> <!--style="width: 160px"-->
<!--style="width: 160px"--> <!--type="date"-->
<!--type="date"--> <!--placeholder="选择日期"/>-->
<!--placeholder="选择日期"/>--> <!--<span>交货期:</span>-->
<!--<el-date-picker-->
<!--<span>交货期:</span>--> <!--v-model="startTime1"-->
<!--<el-date-picker--> <!--value-format="yyyy-MM-dd"-->
<!--v-model="startTime1"--> <!--size="small"-->
<!--value-format="yyyy-MM-dd"--> <!--style="width: 160px"-->
<!--size="small"--> <!--type="date"-->
<!--style="width: 160px"--> <!--placeholder="选择日期"/>-->
<!--type="date"--> <!--<span class="demonstration">~</span>-->
<!--placeholder="选择日期"/>--> <!--<el-date-picker-->
<!--<span class="demonstration">~</span>--> <!--v-model="endTime1"-->
<!--<el-date-picker--> <!--value-format="yyyy-MM-dd"-->
<!--v-model="endTime1"--> <!--size="small"-->
<!--value-format="yyyy-MM-dd"--> <!--style="width: 160px"-->
<!--size="small"--> <!--type="date"-->
<!--style="width: 160px"--> <!--placeholder="选择日期"/>-->
<!--type="date"--> <!--<span>提前</span>-->
<!--placeholder="选择日期"/>--> <!--<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>-->
<!--<span>提前</span>--> <!--<span>天预警</span>-->
<!--<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>--> <el-button icon="el-icon-search" type="success" size="small" style="margin-left: 20px" @click="searchTable()">查询</el-button>
<!--<span>天预警</span>--> </div>
<el-button icon="el-icon-search" type="success" size="small" style="margin-left: 20px" @click="searchTable()">查询</el-button> <el-table v-loading="loading" :data="tableData" border element-loading-text="拼命加载中">
<el-table v-loading="loading" :data="tableData" size="mini" highlight-current-row style="width: 100%; margin-top: 30px" border element-loading-text="拼命加载中"> <el-table-column label="项目名称" align="center" min-width="120px">
<el-table-column label="项目名称" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.项目名称 }} {{ scope.row.项目名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床型号" align="center"> <el-table-column label="机床型号" align="center" min-width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床图号 }} {{ scope.row.机床图号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="机床名称" align="center"> <el-table-column label="机床名称" align="center" min-width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.机床名称 }} {{ scope.row.机床名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="客户名称" align="center"> <el-table-column label="客户名称" align="center" min-width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.客户名称 }} {{ scope.row.客户名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始时间" align="center"> <el-table-column label="开始时间" align="center" min-width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.合同签订日期 }} {{ scope.row.合同签订日期 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="结束时间" align="center"> <el-table-column label="结束时间" align="center" min-width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.发货节点 }} {{ scope.row.发货节点 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工期" align="center"> <el-table-column label="发图" align="center" min-width="120px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.工期 }} {{ scope.row.机床设计完成时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="采购" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.采购完成时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="备料" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.备料完成时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="制造" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.机床生产完成时间.split(' ')[0] }}
</template>
</el-table-column>
<el-table-column label="装配" align="center" min-width="120px">
<template slot-scope="scope">
{{ scope.row.机床装配完成时间.split(' ')[0] }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card> <el-card>
<div class="word">设计</div> <h1 class="word">设计</h1>
<el-table v-loading="loading1" :data="tableData1" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中"> <el-table v-loading="loading1" :data="tableData1" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center"> <el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务名称" align="center"> <el-table-column label="任务名称" align="center" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务名称 }} {{ scope.row.任务名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始时间" align="center"> <el-table-column label="开始时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务开始时间 }} {{ scope.row.任务开始时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划完成时间" align="center"> <el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.计划完成时间 }} {{ scope.row.计划完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际完成时间" align="center"> <el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.实际完成时间 }} {{ scope.row.实际完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工期" align="center"> <el-table-column label="工期" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.货期 }} {{ scope.row.货期 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
</template> </template>
@@ -136,39 +155,39 @@
</el-table> </el-table>
</el-card> </el-card>
<el-card> <el-card>
<div class="word">采购</div> <h1 class="word">采购</h1>
<el-table v-loading="loading1" :data="tableData2" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中"> <el-table v-loading="loading1" :data="tableData2" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center"> <el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务名称" align="center"> <el-table-column label="任务名称" align="center" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务名称 }} {{ scope.row.任务名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始时间" align="center"> <el-table-column label="开始时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务开始时间 }} {{ scope.row.任务开始时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划完成时间" align="center"> <el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.计划完成时间 }} {{ scope.row.计划完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际完成时间" align="center"> <el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.实际完成时间 }} {{ scope.row.实际完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工期" align="center"> <el-table-column label="工期" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.货期 }} {{ scope.row.货期 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
</template> </template>
@@ -176,39 +195,39 @@
</el-table> </el-table>
</el-card> </el-card>
<el-card> <el-card>
<div class="word">备料</div> <h1 class="word">备料</h1>
<el-table v-loading="loading1" :data="tableData3" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中"> <el-table v-loading="loading1" :data="tableData3" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center"> <el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务名称" align="center"> <el-table-column label="任务名称" align="center" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务名称 }} {{ scope.row.任务名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始时间" align="center"> <el-table-column label="开始时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务开始时间 }} {{ scope.row.任务开始时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划完成时间" align="center"> <el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.计划完成时间 }} {{ scope.row.计划完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际完成时间" align="center"> <el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.实际完成时间 }} {{ scope.row.实际完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工期" align="center"> <el-table-column label="工期" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.货期 }} {{ scope.row.货期 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
</template> </template>
@@ -216,39 +235,39 @@
</el-table> </el-table>
</el-card> </el-card>
<el-card> <el-card>
<div class="word">制造</div> <h1 class="word">制造</h1>
<el-table v-loading="loading1" :data="tableData4" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中"> <el-table v-loading="loading1" :data="tableData4" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center"> <el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务名称" align="center"> <el-table-column label="任务名称" align="center" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务名称 }} {{ scope.row.任务名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始时间" align="center"> <el-table-column label="开始时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务开始时间 }} {{ scope.row.任务开始时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划完成时间" align="center"> <el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.计划完成时间 }} {{ scope.row.计划完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际完成时间" align="center"> <el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.实际完成时间 }} {{ scope.row.实际完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工期" align="center"> <el-table-column label="工期" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.货期 }} {{ scope.row.货期 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
</template> </template>
@@ -256,39 +275,39 @@
</el-table> </el-table>
</el-card> </el-card>
<el-card> <el-card>
<div class="word">装配调试</div> <h1 class="word">装配调试</h1>
<el-table v-loading="loading1" :data="tableData5" size="mini" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中"> <el-table v-loading="loading1" :data="tableData5" highlight-current-row style="width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column label="组号" align="center"> <el-table-column label="组号" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.组号 }} {{ scope.row.组号 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="任务名称" align="center"> <el-table-column label="任务名称" align="center" min-width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务名称 }} {{ scope.row.任务名称 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="开始时间" align="center"> <el-table-column label="开始时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.任务开始时间 }} {{ scope.row.任务开始时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="计划完成时间" align="center"> <el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.计划完成时间 }} {{ scope.row.计划完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际完成时间" align="center"> <el-table-column label="实际完成时间" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.实际完成时间 }} {{ scope.row.实际完成时间 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工期" align="center"> <el-table-column label="工期" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.货期 }} {{ scope.row.货期 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center"> <el-table-column label="备注" align="center" min-width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.备注 }} {{ scope.row.备注 }}
</template> </template>
@@ -350,16 +369,16 @@ export default {
}, },
// 查询表格数据 // 查询表格数据
searchTable() { searchTable() {
this.loading = true
this.tableData = []
this.tableData1 = []
this.tableData2 = []
this.tableData3 = []
this.tableData4 = []
this.tableData5 = []
this.now = new Date()
if (this.projectValue !== '') { if (this.projectValue !== '') {
if (this.machineValue !== '') { if (this.machineValue !== '') {
this.loading = true
this.tableData = []
this.tableData1 = []
this.tableData2 = []
this.tableData3 = []
this.tableData4 = []
this.tableData5 = []
this.now = new Date()
searchtable(this.projectValue, this.machineValue).then(response => { searchtable(this.projectValue, this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) { for (let i = 0; i < response.data.length; i++) {
if (response.data[i].合同签订日期 !== '' && response.data[i].合同签订日期 !== null) { if (response.data[i].合同签订日期 !== '' && response.data[i].合同签订日期 !== null) {
@@ -370,6 +389,7 @@ export default {
} }
} }
this.loading = false this.loading = false
console.log(response.data)
this.tableData = response.data this.tableData = response.data
}).then(() => { }).then(() => {
searchtable2(this.machineValue, 1).then(response => { searchtable2(this.machineValue, 1).then(response => {
@@ -509,12 +529,16 @@ export default {
margin-bottom: 10px; margin-bottom: 10px;
} }
.word{ .word{
font-size: 20px; /*font-size: 20px;*/
margin-bottom: 20px; /*margin-bottom: 20px;*/
margin-left: 20px; margin-top: 0;
} }
span{ span{
margin: 10px 0 10px 10px; margin: 10px 0 10px 10px;
} }
</style> </style>
<style>
.bold-font .el-table{
font: bold 18px arial!important;
}
</style>