This commit is contained in:
liushuai
2019-04-13 14:50:15 +08:00
25 changed files with 1489 additions and 429 deletions

View File

@@ -1,8 +1,8 @@
<template>
<div>
<div class="app-container bold-font">
<el-card>
<el-row>
<span>项目名称:</span>
<h3 style="display: inline-block;margin: 0">项目名称:</h3>
<el-select v-model="projectValue" filterable clearable size="small" style="margin-top:10px;width: 220px" placeholder="项目名称" @change="typeChange()">
<el-option
v-for="item in project"
@@ -10,7 +10,7 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>机床名称:</span>
<h3 style="display: inline-block;margin: 0 0 0 20px">机床名称:</h3>
<el-select v-model="toolNumValue" clearable filterable size="small" style="margin-bottom:10px;width: 220px" placeholder="机床名称">
<el-option
v-for="item in toolNum"
@@ -18,23 +18,24 @@
:label="item.label"
:value="item.value"/>
</el-select>
<span>客户名称:</span>
<h3 style="display: inline-block;margin: 0 0 0 20px">客户名称:</h3>
<el-input v-model="CustomerNameValue" placeholder="客户名称" size="small" clearable style="width:200px"/>
</el-row>
<el-row>
<span>签订日期:</span>
<el-date-picker v-model="time_SignStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>~
<h3 style="display: inline-block;margin: 0">签订日期:</h3>
<el-date-picker v-model="time_SignStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/> ~
<el-date-picker v-model="time_SignFinish" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="签订日期" class="time"/>
<span>交货期:</span>
<el-date-picker v-model="time_deliveryStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>~
<h3 style="display: inline-block;margin: 0 0 0 20px">交货期:</h3>
<el-date-picker v-model="time_deliveryStart" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/> ~
<el-date-picker v-model="time_deliveryFinish" size="small" value-format="yyyy-MM-dd" type="date" style="margin-top:10px;width: 180px" placeholder="交货期" class="time"/>
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable()">查询</el-button>
</el-row>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" height="580" size="mini" style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="项目编号" align="center" width="140px">
<h2 style="display: inline-block;margin: 0 0 10px 0">总计划:</h2>
<el-table v-loading="loading" :data="tableData" height="750" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中">
<el-table-column label="项目编号" align="center" width="140px" fixed="left">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.项目编号" size="mini"/>
@@ -44,45 +45,45 @@
</template>
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" width="200px">
<el-table-column label="项目名称" align="center" width="120px" fixed="left">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床图号" align="center" width="150px">
<el-table-column label="机床图号" align="center" width="140px" fixed="left">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="机床名称" align="center" width="200px">
<el-table-column label="机床名称" align="center" width="280px" fixed="left">
<template slot-scope="scope">
{{ scope.row.机床名称 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="70px">
<el-table-column label="机床数量" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="签订日期" align="center" width="150px">
<el-table-column label="签订日期" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.合同签订日期 }}
</template>
</el-table-column>
<el-table-column label="交货期" align="center" width="150px">
<el-table-column label="交货期" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.发货节点 }}
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" width="250px">
<el-table-column label="客户名称" align="center" width="280px">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column label="设计者" align="center" width="100px">
<el-table-column label="设计者" align="center" width="90px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.机床设计者" size="mini"/>
<el-input v-model="scope.row.机床设计者" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.机床设计者 }}
@@ -92,50 +93,50 @@
<el-table-column label="发图" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.机床设计完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.机床设计完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 1;openDialog(scope.row)">{{ scope.row.机床设计完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 1;openDialog(scope.row)">{{ scope.row.机床设计完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="采购" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.采购完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.采购完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 2;openDialog(scope.row)">{{ scope.row.采购完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 2;openDialog(scope.row)">{{ scope.row.采购完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="备料" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.备料完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.备料完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 3;openDialog(scope.row)">{{ scope.row.备料完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 3;openDialog(scope.row)">{{ scope.row.备料完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="制造" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.机床生产完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.机床生产完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 4;openDialog(scope.row)">{{ scope.row.机床生产完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 4;openDialog(scope.row)">{{ scope.row.机床生产完成时间 }}</el-button>
</template>
</template>
</el-table-column>
<el-table-column label="装配" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.机床装配完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.机床装配完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
<el-button type="text" @click="code = 5;openDialog(scope.row)">{{ scope.row.机床装配完成时间 }}</el-button>
<el-button class="bold-font" type="text" @click="code = 5;openDialog(scope.row)">{{ scope.row.机床装配完成时间 }}</el-button>
</template>
</template>
</el-table-column>
@@ -149,7 +150,7 @@
<!--</template>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="更新" align="center" width="200px">
<el-table-column label="更新" align="center" width="90px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.更新" size="mini"/>
@@ -159,7 +160,7 @@
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="200px" align="center" fixed="right">
<el-table-column label="操作" width="150px" align="center">
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit(scope.row)">确定</el-button>
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
@@ -167,7 +168,7 @@
</template>
</el-table-column>
</el-table>
<div class="block">
<div class="block" style="margin-top: 15px;">
<el-pagination
v-if="!loading"
:current-page="pageCurrent"
@@ -179,84 +180,85 @@
@current-change="handleCurrentChange"/>
</div>
</el-card>
<el-card>
<!--<span>{{ title }}</span>-->
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="margin-left: 10px" @click="addTable()">增加</el-button>
<el-table v-loading="loading2" :data="tableData2" size="mini" style="margin-top: 10px;width: 100%;" border element-loading-text="拼命加载中">
<el-table-column min-width="300px" label="组号" align="center" width="240px">
<h2 style="width: 400px;float:left;display: inline-block;margin: 0 0 10px 0">子计划{{ machineNum }}</h2>
<el-button size="small" icon="el-icon-circle-plus" type="primary" style="float:left;margin: 7px 0 0 0" @click="addTable()">增加</el-button>
<el-table v-loading="loading2" :data="tableData2" style="margin-top: 10px;width: 100%;" stripe border element-loading-text="拼命加载中">
<el-table-column min-width="100px" label="组号" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.组号" size="mini"/>
<el-input v-model="scope.row.组号" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.组号 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="任务名称" align="center" width="240px">
<el-table-column min-width="200px" label="任务名称" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.任务名称" size="mini"/>
<el-input v-model="scope.row.任务名称" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.任务名称 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="负责人" align="center" width="240px">
<el-table-column min-width="100px" label="负责人" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.负责人" size="mini"/>
<el-input v-model="scope.row.负责人" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.负责人 }}
</template>
</template>
</el-table-column>
<el-table-column label="接收任务时间" align="center" width="250px">
<el-table-column label="接收任务时间" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.接收任务时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.接收任务时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.接收任务时间 }}
</template>
</template>
</el-table-column>
<el-table-column label="任务开始时间" align="center" width="250px">
<el-table-column label="任务开始时间" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.任务开始时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.任务开始时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.任务开始时间 }}
</template>
</template>
</el-table-column>
<el-table-column label="计划完成时间" align="center" width="250px">
<el-table-column label="计划完成时间" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.计划完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.计划完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.计划完成时间 }}
</template>
</template>
</el-table-column>
<el-table-column min-width="300px" label="货期" align="center" width="240px">
<el-table-column min-width="100px" label="货期" align="center">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.货期" size="mini"/>
<el-input v-model="scope.row.货期" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.货期 }}
</template>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" width="250px">
<el-table-column label="实际完成时间" align="center" width="150px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-date-picker v-model="scope.row.实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date"/>
<el-date-picker v-model="scope.row.实际完成时间" value-format="yyyy-MM-dd" size="mini" type="date" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.实际完成时间 }}
@@ -266,14 +268,14 @@
<el-table-column min-width="300px" label="备注" align="center" width="240px">
<template slot-scope="scope">
<template v-if="scope.row.edit">
<el-input v-model="scope.row.备注" size="mini"/>
<el-input v-model="scope.row.备注" size="mini" style="width: 100%"/>
</template>
<template v-else>
{{ scope.row.备注 }}
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="200px" align="center" fixed="right">
<el-table-column label="操作" width="180px" align="center" fixed="right">
<template slot-scope="scope">
<el-button v-if="scope.row.edit" type="success" size="small" @click="confirmEdit2(scope.row)">确定</el-button>
<el-button v-else type="primary" size="small" @click="scope.row.edit=!scope.row.edit">编辑</el-button>
@@ -291,6 +293,7 @@ import { getProject, getCustomerName, getToolNum, searchtable, editTable, search
export default {
data() {
return {
machineNum: '',
jichuang: '',
title: '',
tableData2: [],
@@ -442,6 +445,7 @@ export default {
},
// 查询表格2数据
openDialog(row) {
this.machineNum = row.机床图号
this.loading2 = true
this.tableData2 = []
if (this.code === 1) {
@@ -627,6 +631,38 @@ export default {
<style scoped>
.el-card {
margin-bottom: 15px;
border-color: rgb(0, 12, 57);
color: white;
margin-bottom: 5px;
background-color: rgb(0, 12, 57);
}
span{
margin: 10px 0 10px 10px;
}
.el-pagination{
background-color: white;
}
</style>
<style>
.bold-font .el-table{
font: bold 18px arial!important;
margin: 0 0 10px 0;
color: white;
}
.bold-font .el-table td{
background-color: rgb(0, 12, 57)!important;
}
.bold-font .el-table th{
color: white;
background-color: rgb(0, 12, 57)!important;
}
.bold-font .el-table div{
color: white;
background-color: rgb(0, 12, 57)!important;
}
.bold-font{
color: ghostwhite;
font: bold 22px arial!important;
padding: 5px;
}
</style>

View File

@@ -50,72 +50,76 @@
<!--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>-->
<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" min-width="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<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" min-width="220px">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<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" min-width="120px">
<template slot-scope="scope">
{{ scope.row.发货节点 }}
</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-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>
<h1 class="word">设计</h1>
<sticky :z-index="10" style="height: 180px">
<div>
<h1 class="word" style="margin: 0">总计划</h1>
<el-table v-loading="loading" :data="tableData" height="120px" 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" min-width="120px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<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" min-width="220px">
<template slot-scope="scope">
{{ scope.row.客户名称 }}
</template>
</el-table-column>
<el-table-column label="开始时间" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.合同签订日期)">{{ scope.row.合同签订日期 }}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.发货节点)">{{ scope.row.发货节点 }}</span>
</template>
</el-table-column>
<el-table-column label="发图" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床设计完成时间)">{{ scope.row.机床设计完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="采购" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.采购完成时间)">{{ scope.row.采购完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="备料" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.备料完成时间)">{{ scope.row.备料完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="制造" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床生产完成时间)">{{ scope.row.机床生产完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
<el-table-column label="装配" align="center" min-width="120px">
<template slot-scope="scope">
<span :class="colorJudge(scope.row.机床装配完成时间)">{{ scope.row.机床装配完成时间.split(' ')[0] }}</span>
</template>
</el-table-column>
</el-table>
</div>
</sticky>
<sticky :z-index="10" :sticky-top="180">
<h1 class="word">设计</h1>
</sticky>
<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">
@@ -134,7 +138,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -153,9 +157,9 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h1 class="word">采购</h1>
<sticky :z-index="11" :sticky-top="180">
<h1 class="word">采购</h1>
</sticky>
<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">
@@ -174,7 +178,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -193,9 +197,9 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h1 class="word">备料</h1>
<sticky :z-index="12" :sticky-top="180">
<h1 class="word">备料</h1>
</sticky>
<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">
@@ -214,7 +218,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -233,9 +237,9 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h1 class="word">制造</h1>
<sticky :z-index="13" :sticky-top="180">
<h1 class="word">制造</h1>
</sticky>
<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">
@@ -254,7 +258,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -273,9 +277,9 @@
</template>
</el-table-column>
</el-table>
</el-card>
<el-card>
<h1 class="word">装配调试</h1>
<sticky :z-index="14" :sticky-top="180">
<h1 class="word">装配调试</h1>
</sticky>
<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">
@@ -294,7 +298,7 @@
</el-table-column>
<el-table-column label="计划完成时间" align="center" min-width="100px">
<template slot-scope="scope">
{{ scope.row.计划完成时间 }}
<span :class="colorJudge(scope.row.计划完成时间)">{{ scope.row.计划完成时间 }}</span>
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center" min-width="100px">
@@ -317,9 +321,11 @@
</div>
</template>
<script>import { initProject, initMachine, searchtable, searchtable2 } from '@/api/ManufacturingCenter/ProjectPlanningQuery'
<script>
import { initProject, initMachine, searchtable, searchtable2 } from '@/api/ManufacturingCenter/ProjectPlanningQuery'
import Sticky from '@/components/Sticky'
export default {
components: { Sticky },
data() {
return {
projectValue: '',
@@ -352,6 +358,16 @@ export default {
this.fetchData()
},
methods: {
colorJudge(time1) {
console.log(new Date(time1) - this.now)
if ((new Date(time1) - this.now) > 0 && (new Date(time1) - this.now) < (86400000 * this.warningValue)) {
return 'orange'
} else if ((new Date(time1) - this.now) < 0) {
return 'red'
} else {
return 'black'
}
},
fetchData() {
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
},
@@ -525,20 +541,55 @@ export default {
</script>
<style scoped>
.el-card{
margin-bottom: 10px;
.el-pagination{
background-color: white;
}
.el-card {
border-color: rgb(0, 12, 57);
color: white;
margin-bottom: 5px;
background-color: rgb(0, 12, 57);
}
.word{
/*font-size: 20px;*/
/*margin-bottom: 20px;*/
border: 1px solid #ebeef5;
margin-top: 0;
line-height: 60px;
/*height: 50px;*/
background-color: rgb(0, 12, 57);
}
span{
margin: 10px 0 10px 10px;
}
.orange{
color: orange;
}
.red{
color: red;
}
.black{
color: white;
}
</style>
<style>
.bold-font .el-table{
font: bold 18px arial!important;
margin: 0 0 10px 0;
color: white;
}
.bold-font .el-table td{
background-color: rgb(0, 12, 57)!important;
}
.bold-font .el-table th{
color: white;
background-color: rgb(0, 12, 57)!important;
}
.bold-font .el-table div{
color: white;
background-color: rgb(0, 12, 57)!important;
}
.bold-font{
color: ghostwhite;
font: bold 22px arial!important;
padding: 5px;
}
</style>