1037 lines
56 KiB
Vue
1037 lines
56 KiB
Vue
<template>
|
|
<div class="app-container bold-font">
|
|
<el-card>
|
|
<div slot="header">
|
|
<el-row>
|
|
<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"
|
|
: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" clearable filterable size="small" style="margin-bottom:10px;width: 220px" placeholder="机床名称">
|
|
<el-option
|
|
v-for="item in machine"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"/>
|
|
</el-select>
|
|
<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>
|
|
<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"/>
|
|
<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"/>
|
|
<span>提前</span>
|
|
<el-input-number v-model="warningValue" :min="1" controls-position="right" size="small" style="width: 90px"/>
|
|
<span>天预警</span>
|
|
<el-button size="small" icon="el-icon-search" type="success" style="margin-left: 10px" @click="pageSize=10; pageCurrent=1;searchTable1();searchAll()">查询</el-button>
|
|
</el-row>
|
|
</div>
|
|
<h1 class="word" style="margin: 0">总计划:</h1>
|
|
<div style="border: 1px solid #ebeef5;">
|
|
<span>合同总数:</span>{{ 合同总数 ? 合同总数 : '-' }} (个)
|
|
<span>合同总金额:</span>{{ 合同总金额 ? 合同总金额 : '-' }} (万元)
|
|
<span>已支付:</span>{{ 已支付 ? 已支付 : '-' }} (万元)
|
|
<span>理论加工时间:</span>{{ 理论加工时间 ? 理论加工时间 : '-' }} (分)<br>
|
|
<span>实际加工时间:</span>{{ 实际加工时间 ? 实际加工时间 : '-' }} (分)
|
|
<span>外协工时总数:</span>{{ 外协工时总数 ? 外协工时总数 : '-' }} (分)
|
|
<span>采购总额:</span>{{ 零件金额 ? 零件金额 : '-' }} (元)
|
|
</div>
|
|
<el-table v-loading="loading" :data="tableData10" height="550" highlight-current-row style="width: 100%;" border element-loading-text="拼命加载中" @row-click="searchTable">
|
|
<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"/>
|
|
</template>
|
|
<template v-else>
|
|
{{ scope.row.项目编号 }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
<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="140px" fixed="left">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.机床图号 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.机床数量 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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="120px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.发货节点 }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="设备预验节点" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.设备预验收节点 }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="安装调试节点" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.安装调试节点 }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="设计者" align="center" width="90px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.机床设计者 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="审图(计划开始)" align="center" width="170px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.审图计划开始时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="审图(计划完成)" align="center" width="170px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.审图计划完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="审图(实际完成)" align="center" width="170px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.审图实际完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="发图(计划)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.机床设计完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="发图(实际)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.机床设计实际完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="采购(计划)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.采购完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="采购(实际)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.采购实际完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="备料(计划)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.备料完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="备料(实际)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.备料实际完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="制造(计划)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.机床生产完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="制造(实际)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.机床生产实际完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="装配(计划)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.机床装配完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="装配(实际)" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.机床装配实际完成时间 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="更新" align="center" width="90px">
|
|
<template slot-scope="scope">
|
|
<div>{{ scope.row.更新 }}</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<div class="block">
|
|
<el-pagination
|
|
v-if="!loading"
|
|
:current-page="pageCurrent"
|
|
:page-sizes="[10, 20, 30, 40, 100]"
|
|
:page-size="pageSize"
|
|
:total="total"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
@size-change="handleSizeChange"
|
|
@current-change="handleCurrentChange"/>
|
|
</div>
|
|
<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" fixed="left">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.项目名称 }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="机床型号" align="center" min-width="120px" fixed="left">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.机床图号 }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="机床名称" align="center" min-width="220px" fixed="left">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.机床名称 }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="开始时间" align="center" min-width="130px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.合同签订日期)">{{ scope.row.合同签订日期 === '1900-01-01' ? '' : scope.row.合同签订日期 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="结束时间" align="center" min-width="130px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.发货节点)">{{ scope.row.发货节点 === '1900-01-01' ? '' : scope.row.发货节点 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="设备预验节点" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.设备预验收节点 === '1900-01-01 00:00:00' ? '' : (scope.row.设备预验收节点 ? scope.row.设备预验收节点.split(' ')[0] : '') }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="安装调试节点" align="center" width="150px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.安装调试节点 === '1900-01-01 00:00:00' ? '' : (scope.row.安装调试节点 ? scope.row.安装调试节点.split(' ')[0] : '') }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="审图(计划开始)" align="center" min-width="170px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.审图计划开始时间 === '1900-01-01' ? '' : scope.row.审图计划开始时间 }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="审图(计划完成)" align="center" min-width="170px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.审图计划完成时间, scope.row.审图实际完成时间)">{{ scope.row.审图计划完成时间 === '1900-01-01' ? '' : scope.row.审图计划完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="审图(实际完成)" align="center" min-width="170px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.审图计划完成时间, scope.row.审图实际完成时间)">{{ scope.row.审图实际完成时间 === '1900-01-01' ? '' : scope.row.审图实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="发图" align="center" min-width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.机床设计完成时间, scope.row.机床设计实际完成时间)">{{ scope.row.机床设计完成时间 === '1900-01-01 00:00:00' ? '' : (scope.row.机床设计完成时间 ? scope.row.机床设计完成时间.split(' ')[0] : '') }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="发图(实际)" align="center" width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.机床设计完成时间, scope.row.机床设计实际完成时间)">{{ scope.row.机床设计实际完成时间 === '1900-01-01' ? '' : scope.row.机床设计实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="采购" align="center" min-width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.采购完成时间, scope.row.采购实际完成时间)">{{ scope.row.采购完成时间 === '1900-01-01 00:00:00' ? '' : (scope.row.采购完成时间 ? scope.row.采购完成时间.split(' ')[0] : '') }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="采购(实际)" align="center" width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.采购完成时间, scope.row.采购实际完成时间)">{{ scope.row.采购实际完成时间 === '1900-01-01' ? '' : scope.row.采购实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="备料" align="center" min-width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.备料完成时间, scope.row.备料实际完成时间)">{{ scope.row.备料完成时间 === '1900-01-01 00:00:00' ? '' : (scope.row.备料完成时间 ? scope.row.备料完成时间.split(' ')[0] : '') }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="备料(实际)" align="center" width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.备料完成时间, scope.row.备料实际完成时间)">{{ scope.row.备料实际完成时间 === '1900-01-01' ? '' : scope.row.备料实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="制造" align="center" min-width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.机床生产完成时间, scope.row.机床生产实际完成时间)">{{ scope.row.机床生产完成时间 === '1900-01-01 00:00:00' ? '' : (scope.row.机床生产完成时间 ? scope.row.机床生产完成时间.split(' ')[0] : '') }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="制造(实际)" align="center" width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class=" colorActual(scope.row.机床生产完成时间, scope.row.机床生产实际完成时间)">{{ scope.row.机床生产实际完成时间 === '1900-01-01' ? '' : scope.row.机床生产实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="装配" align="center" min-width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.机床装配完成时间, scope.row.机床装配实际完成时间)">{{ scope.row.机床装配完成时间 === '1900-01-01 00:00:00' ? '' : (scope.row.机床装配完成时间 ? scope.row.机床装配完成时间.split(' ')[0] : '') }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="装配(实际)" align="center" width="140px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.机床装配完成时间, scope.row.机床装配实际完成时间)">{{ scope.row.机床装配实际完成时间 === '1900-01-01' ? '' : scope.row.机床装配实际完成时间 }}</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">
|
|
{{ scope.row.组号 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.任务开始时间 }}
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="计划完成时间" align="center" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="实际完成时间" align="center" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.备注 }}
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<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">
|
|
{{ scope.row.组号 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.任务开始时间 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="实际完成时间" align="center" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.备注 }}
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<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">
|
|
{{ scope.row.组号 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.任务开始时间 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="实际完成时间" align="center" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.备注 }}
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<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">
|
|
{{ scope.row.组号 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.任务开始时间 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="实际完成时间" align="center" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.备注 }}
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<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">
|
|
{{ scope.row.组号 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.任务开始时间 }}
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorJudge(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.计划完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column label="实际完成时间" align="center" min-width="100px">
|
|
<template slot-scope="scope">
|
|
<span :class="colorActual(scope.row.计划完成时间, scope.row.实际完成时间)">{{ scope.row.实际完成时间 }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<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" min-width="100px">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.备注 }}
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-card>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { searchAll, initProject, initMachine, searchtable, searchtable2, searchtable5 } from '@/api/ManufacturingCenter/ProjectPlanningQuery'
|
|
import Sticky from '@/components/Sticky'
|
|
export default {
|
|
components: { Sticky },
|
|
data() {
|
|
return {
|
|
合同总数: '',
|
|
合同总金额: '',
|
|
已支付: '',
|
|
理论加工时间: '',
|
|
实际加工时间: '',
|
|
外协工时总数: '',
|
|
零件金额: '',
|
|
projectValue: '',
|
|
projectValue1: '',
|
|
project: [],
|
|
machineValue: '',
|
|
machineValue1: '',
|
|
machine: [],
|
|
time_SignStart: '', // 签订开始
|
|
time_SignFinish: '', // 签订结束
|
|
time_deliveryStart: '', // 交货开始
|
|
time_deliveryFinish: '', // 交货结束
|
|
CustomerNameValue: '',
|
|
CustomerName: [], // 客户名称
|
|
loading: false,
|
|
loading1: false,
|
|
pageSize: 10,
|
|
pageCurrent: 1,
|
|
now: '',
|
|
arrival: [],
|
|
judge: [],
|
|
arrival1: [],
|
|
judge1: [],
|
|
arrival2: [],
|
|
judge2: [],
|
|
arrival3: [],
|
|
judge3: [],
|
|
arrival4: [],
|
|
judge4: [],
|
|
warningValue: '',
|
|
tableData10: [], // 表格数据
|
|
tableData: [], // 表格数据
|
|
tableData1: [], // 表格数据
|
|
tableData2: [], // 表格数据
|
|
tableData3: [], // 表格数据
|
|
tableData4: [], // 表格数据
|
|
tableData5: [] // 表格数据
|
|
}
|
|
},
|
|
created() {
|
|
this.fetchData()
|
|
this.searchTable1()
|
|
},
|
|
mounted() {
|
|
this.searchAll()
|
|
},
|
|
methods: {
|
|
searchAll() {
|
|
this.projectValue ? this.projectValue_check = 1 : this.projectValue_check = 0
|
|
searchAll(this.projectValue_check, this.projectValue).then(response => {
|
|
this.合同总数 = response.data[0].合同总数
|
|
this.合同总金额 = response.data[0].合同总金额
|
|
this.已支付 = response.data[0].已支付
|
|
this.理论加工时间 = response.data[0].理论加工时间段
|
|
this.实际加工时间 = response.data[0].实际加工时间段
|
|
this.外协工时总数 = response.data[0].外协工时总数
|
|
this.零件金额 = response.data[0].零件金额
|
|
})
|
|
},
|
|
colorJudge(time1, time2) {
|
|
if (time2 === null) {
|
|
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'
|
|
}
|
|
} else {
|
|
return ''
|
|
}
|
|
},
|
|
colorActual(time1, time2) {
|
|
if ((new Date(time1) - new Date(time2)) > 0) {
|
|
return 'green'
|
|
} else if ((new Date(time1) - this.now) < 0) {
|
|
return 'red'
|
|
} else {
|
|
return 'black'
|
|
}
|
|
},
|
|
fetchData() {
|
|
this.getSelect(initProject, ['项目名称', '项目流水号'], 'project')
|
|
},
|
|
typeChange() {
|
|
this.machineValue = ''
|
|
this.machine = []
|
|
initMachine(this.projectValue).then(response => {
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
this.machine.push({
|
|
label: response.data[i].机床图号,
|
|
value: response.data[i].机床流水号
|
|
})
|
|
}
|
|
})
|
|
},
|
|
// 查询表格数据
|
|
searchTable1() {
|
|
this.loading = true
|
|
this.tableData10 = []
|
|
if (this.projectValue !== '' && this.projectValue !== null) { this.projectValuecheck = 1 } else { this.projectValuecheck = 0 }
|
|
if (this.CustomerNameValue !== '' && this.CustomerNameValue !== null) { this.CustomerNameValuecheck = 1 } else { this.CustomerNameValuecheck = 0 }
|
|
if (this.machineValue !== '' && this.machineValue !== null) { this.machineValuecheck = 1 } else { this.machineValuecheck = 0 }
|
|
if (this.time_SignStart !== '' && this.time_SignStart !== null && this.time_SignFinish !== '' && this.time_SignFinish) { this.time_Signcheck = 1 } else { this.time_Signcheck = 0 }
|
|
if (this.time_deliveryStart !== '' && this.time_deliveryStart !== null && this.time_deliveryFinish !== '' && this.time_deliveryFinish) { this.time_deliverycheck = 1 } else { this.time_deliverycheck = 0 }
|
|
searchtable5(this.projectValuecheck, this.projectValue, this.machineValuecheck, this.machineValue, this.CustomerNameValuecheck, this.CustomerNameValue, this.time_Signcheck, this.time_SignStart, this.time_SignFinish, this.time_deliverycheck, this.time_deliveryStart, this.time_deliveryFinish, this.pageCurrent, this.pageSize).then(response => {
|
|
if (response.data.total === 0) {
|
|
this.loading = false
|
|
} else {
|
|
for (let i = 0; i < response.data.rows.length; i++) {
|
|
if (response.data.rows[i].合同签订日期 !== '' && response.data.rows[i].合同签订日期 !== null && response.data.rows[i].合同签订日期 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].合同签订日期 = response.data.rows[i].合同签订日期.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].合同签订日期 = ''
|
|
}
|
|
if (response.data.rows[i].发货节点 !== '' && response.data.rows[i].发货节点 !== null && response.data.rows[i].发货节点 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].发货节点 = response.data.rows[i].发货节点.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].发货节点 = ''
|
|
}
|
|
if (response.data.rows[i].设备预验收节点 !== '' && response.data.rows[i].设备预验收节点 !== null && response.data.rows[i].设备预验收节点 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].设备预验收节点 = response.data.rows[i].设备预验收节点.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].设备预验收节点 = ''
|
|
}
|
|
if (response.data.rows[i].安装调试节点 !== '' && response.data.rows[i].安装调试节点 !== null && response.data.rows[i].安装调试节点 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].安装调试节点 = response.data.rows[i].安装调试节点.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].安装调试节点 = ''
|
|
}
|
|
if (response.data.rows[i].机床设计完成时间 !== '' && response.data.rows[i].机床设计完成时间 !== null && response.data.rows[i].机床设计完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].机床设计完成时间 = response.data.rows[i].机床设计完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].机床设计完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].采购完成时间 !== '' && response.data.rows[i].采购完成时间 !== null && response.data.rows[i].采购完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].采购完成时间 = response.data.rows[i].采购完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].采购完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].备料完成时间 !== '' && response.data.rows[i].备料完成时间 !== null && response.data.rows[i].备料完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].备料完成时间 = response.data.rows[i].备料完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].备料完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].机床生产完成时间 !== '' && response.data.rows[i].机床生产完成时间 !== null && response.data.rows[i].机床生产完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].机床生产完成时间 = response.data.rows[i].机床生产完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].机床生产完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].机床装配完成时间 !== '' && response.data.rows[i].机床装配完成时间 !== null && response.data.rows[i].机床装配完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].机床装配完成时间 = response.data.rows[i].机床装配完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].机床装配完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].机床设计实际完成时间 !== '' && response.data.rows[i].机床设计实际完成时间 !== null && response.data.rows[i].机床设计实际完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].机床设计实际完成时间 = response.data.rows[i].机床设计实际完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].机床设计实际完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].采购实际完成时间 !== '' && response.data.rows[i].采购实际完成时间 !== null && response.data.rows[i].采购实际完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].采购实际完成时间 = response.data.rows[i].采购实际完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].采购实际完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].备料实际完成时间 !== '' && response.data.rows[i].备料实际完成时间 !== null && response.data.rows[i].备料实际完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].备料实际完成时间 = response.data.rows[i].备料实际完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].备料实际完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].机床生产实际完成时间 !== '' && response.data.rows[i].机床生产实际完成时间 !== null && response.data.rows[i].机床生产实际完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].机床生产实际完成时间 = response.data.rows[i].机床生产实际完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].机床生产实际完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].机床装配实际完成时间 !== '' && response.data.rows[i].机床装配实际完成时间 !== null && response.data.rows[i].机床装配实际完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].机床装配实际完成时间 = response.data.rows[i].机床装配实际完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].机床装配实际完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].审图计划开始时间 !== '' && response.data.rows[i].审图计划开始时间 !== null && response.data.rows[i].审图计划开始时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].审图计划开始时间 = response.data.rows[i].审图计划开始时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].审图计划开始时间 = ''
|
|
}
|
|
if (response.data.rows[i].审图计划完成时间 !== '' && response.data.rows[i].审图计划完成时间 !== null && response.data.rows[i].审图计划完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].审图计划完成时间 = response.data.rows[i].审图计划完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].审图计划完成时间 = ''
|
|
}
|
|
if (response.data.rows[i].审图实际完成时间 !== '' && response.data.rows[i].审图实际完成时间 !== null && response.data.rows[i].审图实际完成时间 !== '1900/1/1 0:00:00') {
|
|
response.data.rows[i].审图实际完成时间 = response.data.rows[i].审图实际完成时间.split(' ')[0]
|
|
} else {
|
|
response.data.rows[i].审图实际完成时间 = ''
|
|
}
|
|
this.tableData10.push({
|
|
项目编号: response.data.rows[i].项目编号,
|
|
项目名称: response.data.rows[i].项目名称,
|
|
机床图号: response.data.rows[i].机床图号,
|
|
机床名称: response.data.rows[i].机床名称,
|
|
机床数量: response.data.rows[i].机床数量,
|
|
合同签订日期: response.data.rows[i].合同签订日期,
|
|
发货节点: response.data.rows[i].发货节点,
|
|
设备预验收节点: response.data.rows[i].设备预验收节点,
|
|
安装调试节点: response.data.rows[i].安装调试节点,
|
|
客户名称: response.data.rows[i].客户名称,
|
|
机床设计者: response.data.rows[i].机床设计者,
|
|
机床设计完成时间: response.data.rows[i].机床设计完成时间,
|
|
采购完成时间: response.data.rows[i].采购完成时间,
|
|
备料完成时间: response.data.rows[i].备料完成时间,
|
|
机床生产完成时间: response.data.rows[i].机床生产完成时间,
|
|
机床装配完成时间: response.data.rows[i].机床装配完成时间,
|
|
机床设计实际完成时间: response.data.rows[i].机床设计实际完成时间,
|
|
采购实际完成时间: response.data.rows[i].采购实际完成时间,
|
|
备料实际完成时间: response.data.rows[i].备料实际完成时间,
|
|
机床生产实际完成时间: response.data.rows[i].机床生产实际完成时间,
|
|
机床装配实际完成时间: response.data.rows[i].机床装配实际完成时间,
|
|
审图计划开始时间: response.data.rows[i].审图计划开始时间,
|
|
审图计划完成时间: response.data.rows[i].审图计划完成时间,
|
|
审图实际完成时间: response.data.rows[i].审图实际完成时间,
|
|
完成顺序: response.data.rows[i].完成顺序,
|
|
更新: response.data.rows[i].更新,
|
|
项目流水号: response.data.rows[i].项目流水号,
|
|
机床流水号: response.data.rows[i].机床流水号
|
|
})
|
|
}
|
|
this.total = response.data.total
|
|
}
|
|
}).then(() => {
|
|
this.loading = false
|
|
})
|
|
},
|
|
// 查询表格数据
|
|
searchTable(row) {
|
|
this.projectValue1 = row.项目流水号
|
|
this.machineValue1 = row.机床流水号
|
|
if (this.projectValue1 !== '') {
|
|
if (this.machineValue1 !== '') {
|
|
this.loading = true
|
|
this.tableData = []
|
|
this.tableData1 = []
|
|
this.tableData2 = []
|
|
this.tableData3 = []
|
|
this.tableData4 = []
|
|
this.tableData5 = []
|
|
this.now = new Date()
|
|
searchtable(this.projectValue1, this.machineValue1).then(response => {
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
if (response.data[i].合同签订日期 !== '' && response.data[i].合同签订日期 !== null) {
|
|
response.data[i].合同签订日期 = response.data[i].合同签订日期.split(' ')[0]
|
|
}
|
|
if (response.data[i].发货节点 !== '' && response.data[i].发货节点 !== null) {
|
|
response.data[i].发货节点 = response.data[i].发货节点.split(' ')[0]
|
|
}
|
|
// if (response.data[i].设备预验收节点 !== '' && response.data[i].设备预验收节点 !== null) {
|
|
// response.data[i].设备预验收节点 = response.data[i].设备预验收节点.split(' ')[0]
|
|
// }
|
|
// if (response.data[i].安装调试节点 !== '' && response.data[i].安装调试节点 !== null) {
|
|
// response.data[i].安装调试节点 = response.data[i].安装调试节点.split(' ')[0]
|
|
// }
|
|
if (response.data[i].审图计划开始时间 !== '' && response.data[i].审图计划开始时间 !== null) {
|
|
response.data[i].审图计划开始时间 = response.data[i].审图计划开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].审图计划完成时间 !== '' && response.data[i].审图计划完成时间 !== null) {
|
|
response.data[i].审图计划完成时间 = response.data[i].审图计划完成时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].审图实际完成时间 !== '' && response.data[i].审图实际完成时间 !== null) {
|
|
response.data[i].审图实际完成时间 = response.data[i].审图实际完成时间.split(' ')[0]
|
|
}
|
|
// if (response.data[i].机床设计完成时间 !== '' && response.data[i].机床设计完成时间 !== null) {
|
|
// response.data[i].机床设计完成时间 = response.data[i].机床设计完成时间.split(' ')[0]
|
|
// }
|
|
if (response.data[i].机床设计实际完成时间 !== '' && response.data[i].机床设计实际完成时间 !== null) {
|
|
response.data[i].机床设计实际完成时间 = response.data[i].机床设计实际完成时间.split(' ')[0]
|
|
}
|
|
// if (response.data[i].采购完成时间 !== '' && response.data[i].采购完成时间 !== null) {
|
|
// response.data[i].采购完成时间 = response.data[i].采购完成时间.split(' ')[0]
|
|
// }
|
|
if (response.data[i].采购实际完成时间 !== '' && response.data[i].采购实际完成时间 !== null) {
|
|
response.data[i].采购实际完成时间 = response.data[i].采购实际完成时间.split(' ')[0]
|
|
}
|
|
// if (response.data[i].备料完成时间 !== '' && response.data[i].备料完成时间 !== null) {
|
|
// response.data[i].备料完成时间 = response.data[i].备料完成时间.split(' ')[0]
|
|
// }
|
|
if (response.data[i].备料实际完成时间 !== '' && response.data[i].备料实际完成时间 !== null) {
|
|
response.data[i].备料实际完成时间 = response.data[i].备料实际完成时间.split(' ')[0]
|
|
}
|
|
// if (response.data[i].机床生产完成时间 !== '' && response.data[i].机床生产完成时间 !== null) {
|
|
// response.data[i].机床生产完成时间 = response.data[i].机床生产完成时间.split(' ')[0]
|
|
// }
|
|
if (response.data[i].机床生产实际完成时间 !== '' && response.data[i].机床生产实际完成时间 !== null) {
|
|
response.data[i].机床生产实际完成时间 = response.data[i].机床生产实际完成时间.split(' ')[0]
|
|
}
|
|
// if (response.data[i].机床装配完成时间 !== '' && response.data[i].机床装配完成时间 !== null) {
|
|
// response.data[i].机床装配完成时间 = response.data[i].机床装配完成时间.split(' ')[0]
|
|
// }
|
|
if (response.data[i].机床装配实际完成时间 !== '' && response.data[i].机床装配实际完成时间 !== null) {
|
|
response.data[i].机床装配实际完成时间 = response.data[i].机床装配实际完成时间.split(' ')[0]
|
|
}
|
|
}
|
|
this.loading = false
|
|
this.tableData = response.data
|
|
}).then(() => {
|
|
searchtable2(this.machineValue1, 1).then(response => {
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
// this.arrival.push(new Date(response.data[i].计划完成时间))
|
|
// if ((this.arrival[i] - this.now) > 0 && (this.arrival[i] - this.now) < (86400000 * this.warningValue)) {
|
|
// this.judge[i] = 1 // 即将拖期
|
|
// } else if ((this.arrival[i] - this.now) < 0) {
|
|
// this.judge[i] = 2 // 已拖期
|
|
// } else if ((this.arrival[i] - this.now) > (86400000 * this.warningValue)) {
|
|
// this.judge[i] = 3 // 进度正常
|
|
// }
|
|
if (response.data[i].任务开始时间 !== '' && response.data[i].任务开始时间 !== null) {
|
|
response.data[i].任务开始时间 = response.data[i].任务开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].实际完成时间 !== '' && response.data[i].实际完成时间 !== null) {
|
|
response.data[i].实际完成时间 = response.data[i].实际完成时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].计划完成时间 !== '' && response.data[i].计划完成时间 !== null) {
|
|
response.data[i].计划完成时间 = response.data[i].计划完成时间.split(' ')[0]
|
|
}
|
|
}
|
|
this.loading1 = false
|
|
this.tableData1 = response.data
|
|
})
|
|
searchtable2(this.machineValue1, 2).then(response => {
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
// this.arrival1.push(new Date(response.data[i].计划完成时间))
|
|
// if ((this.arrival1[i] - this.now) > 0 && (this.arrival1[i] - this.now) < (86400000 * this.warningValue)) {
|
|
// this.judge1[i] = 1 // 即将拖期
|
|
// } else if ((this.arrival1[i] - this.now) < 0) {
|
|
// this.judge1[i] = 2 // 已拖期
|
|
// } else if ((this.arrival1[i] - this.now) > (86400000 * this.warningValue)) {
|
|
// this.judge1[i] = 3 // 进度正常
|
|
// }
|
|
if (response.data[i].实际开始时间 !== '' && response.data[i].实际开始时间 !== null) {
|
|
response.data[i].实际开始时间 = response.data[i].实际开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].任务开始时间 !== '' && response.data[i].任务开始时间 !== null) {
|
|
response.data[i].任务开始时间 = response.data[i].任务开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].实际完成时间 !== '' && response.data[i].实际完成时间 !== null) {
|
|
response.data[i].实际完成时间 = response.data[i].实际完成时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].计划完成时间 !== '' && response.data[i].计划完成时间 !== null) {
|
|
response.data[i].计划完成时间 = response.data[i].计划完成时间.split(' ')[0]
|
|
}
|
|
}
|
|
this.loading1 = false
|
|
this.tableData2 = response.data
|
|
})
|
|
searchtable2(this.machineValue1, 3).then(response => {
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
// this.arrival2.push(new Date(response.data[i].计划完成时间))
|
|
// if ((this.arrival2[i] - this.now) > 0 && (this.arrival2[i] - this.now) < (86400000 * this.warningValue)) {
|
|
// this.judge2[i] = 1 // 即将拖期
|
|
// } else if ((this.arrival2[i] - this.now) < 0) {
|
|
// this.judge2[i] = 2 // 已拖期
|
|
// } else if ((this.arrival[i] - this.now) > (86400000 * this.warningValue)) {
|
|
// this.judge2[i] = 3 // 进度正常
|
|
// }
|
|
if (response.data[i].实际开始时间 !== '' && response.data[i].实际开始时间 !== null) {
|
|
response.data[i].实际开始时间 = response.data[i].实际开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].任务开始时间 !== '' && response.data[i].任务开始时间 !== null) {
|
|
response.data[i].任务开始时间 = response.data[i].任务开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].实际完成时间 !== '' && response.data[i].实际完成时间 !== null) {
|
|
response.data[i].实际完成时间 = response.data[i].实际完成时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].计划完成时间 !== '' && response.data[i].计划完成时间 !== null) {
|
|
response.data[i].计划完成时间 = response.data[i].计划完成时间.split(' ')[0]
|
|
}
|
|
}
|
|
this.loading1 = false
|
|
this.tableData3 = response.data
|
|
})
|
|
searchtable2(this.machineValue1, 4).then(response => {
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
// this.arrival3.push(new Date(response.data[i].计划完成时间))
|
|
// if ((this.arrival3[i] - this.now) > 0 && (this.arrival3[i] - this.now) < (86400000 * this.warningValue)) {
|
|
// this.judge3[i] = 1 // 即将拖期
|
|
// } else if ((this.arrival3[i] - this.now) < 0) {
|
|
// this.judge3[i] = 2 // 已拖期
|
|
// } else if ((this.arrival3[i] - this.now) > (86400000 * this.warningValue)) {
|
|
// this.judge3[i] = 3 // 进度正常
|
|
// }
|
|
if (response.data[i].实际开始时间 !== '' && response.data[i].实际开始时间 !== null) {
|
|
response.data[i].实际开始时间 = response.data[i].实际开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].任务开始时间 !== '' && response.data[i].任务开始时间 !== null) {
|
|
response.data[i].任务开始时间 = response.data[i].任务开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].实际完成时间 !== '' && response.data[i].实际完成时间 !== null) {
|
|
response.data[i].实际完成时间 = response.data[i].实际完成时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].计划完成时间 !== '' && response.data[i].计划完成时间 !== null) {
|
|
response.data[i].计划完成时间 = response.data[i].计划完成时间.split(' ')[0]
|
|
}
|
|
}
|
|
this.loading1 = false
|
|
this.tableData4 = response.data
|
|
})
|
|
searchtable2(this.machineValue1, 5).then(response => {
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
// this.arrival4.push(new Date(response.data[i].计划完成时间))
|
|
// if ((this.arrival4[i] - this.now) > 0 && (this.arrival4[i] - this.now) < (86400000 * this.warningValue)) {
|
|
// this.judge4[i] = 1 // 即将拖期
|
|
// } else if ((this.arrival3[i] - this.now) < 0) {
|
|
// this.judge4[i] = 2 // 已拖期
|
|
// } else if ((this.arrival3[i] - this.now) > (86400000 * this.warningValue)) {
|
|
// this.judge4[i] = 3 // 进度正常
|
|
// }
|
|
if (response.data[i].下阶段开始时间 !== '' && response.data[i].下阶段开始时间 !== null) {
|
|
response.data[i].下阶段开始时间 = response.data[i].下阶段开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].任务开始时间 !== '' && response.data[i].任务开始时间 !== null) {
|
|
response.data[i].任务开始时间 = response.data[i].任务开始时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].实际完成时间 !== '' && response.data[i].实际完成时间 !== null) {
|
|
response.data[i].实际完成时间 = response.data[i].实际完成时间.split(' ')[0]
|
|
}
|
|
if (response.data[i].计划完成时间 !== '' && response.data[i].计划完成时间 !== null) {
|
|
response.data[i].计划完成时间 = response.data[i].计划完成时间.split(' ')[0]
|
|
}
|
|
}
|
|
this.loading1 = false
|
|
this.tableData5 = response.data
|
|
})
|
|
})
|
|
} else {
|
|
this.$message.warning('请选择机床')
|
|
}
|
|
} else {
|
|
this.$message.warning('请选择项目')
|
|
}
|
|
},
|
|
// 分页
|
|
handleSizeChange(val) {
|
|
this.pageCurrent = 1
|
|
this.pageSize = val
|
|
this.searchTable1()
|
|
},
|
|
handleCurrentChange(val) {
|
|
this.pageCurrent = val
|
|
this.searchTable1()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.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{
|
|
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;
|
|
}
|
|
.green{
|
|
color: #63a35c;
|
|
}
|
|
</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>
|