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

View File

@@ -1,7 +1,8 @@
<template> <template>
<div class="app-container"> <div class="app-container bold-font">
<el-card> <el-card>
<span>项目名称</span> <div slot="header">
<h3 style="display: inline-block;margin: 0">项目名称:</h3>
<el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small" @change="searchMachine"> <el-select v-model="projectValue" placeholder="请选择项目名称" filterable size="small" @change="searchMachine">
<el-option <el-option
v-for="item in project" v-for="item in project"
@@ -9,8 +10,7 @@
:label="item.label" :label="item.label"
:value="item.value"/> :value="item.value"/>
</el-select> </el-select>
<h3 style="display: inline-block;margin: 0 0 0 20px">机床图号:</h3>
<span>机床图号</span>
<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"
@@ -18,7 +18,6 @@
: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"-->
@@ -35,7 +34,6 @@
<!--style="width: 160px"--> <!--style="width: 160px"-->
<!--type="date"--> <!--type="date"-->
<!--placeholder="选择日期"/>--> <!--placeholder="选择日期"/>-->
<!--<span>交货期:</span>--> <!--<span>交货期:</span>-->
<!--<el-date-picker--> <!--<el-date-picker-->
<!--v-model="startTime1"--> <!--v-model="startTime1"-->
@@ -56,79 +54,100 @@
<!--<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>--> <!--<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>-->
<!--<span>天预警</span>--> <!--<span>天预警</span>-->
<el-button icon="el-icon-search" type="success" size="small" style="margin-left: 20px" @click="searchTable()">查询</el-button> <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" size="mini" highlight-current-row style="width: 100%; margin-top: 30px" border element-loading-text="拼命加载中"> </div>
<el-table-column label="项目名称" align="center"> <el-table v-loading="loading" :data="tableData" border element-loading-text="拼命加载中">
<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="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,6 +369,8 @@ export default {
}, },
// 查询表格数据 // 查询表格数据
searchTable() { searchTable() {
if (this.projectValue !== '') {
if (this.machineValue !== '') {
this.loading = true this.loading = true
this.tableData = [] this.tableData = []
this.tableData1 = [] this.tableData1 = []
@@ -358,8 +379,6 @@ export default {
this.tableData4 = [] this.tableData4 = []
this.tableData5 = [] this.tableData5 = []
this.now = new Date() this.now = new Date()
if (this.projectValue !== '') {
if (this.machineValue !== '') {
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>