This commit is contained in:
chenjianan
2019-04-09 18:53:45 +08:00
parent aeaacd88c8
commit c3346ec1ba

View File

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