更新
This commit is contained in:
@@ -32,10 +32,19 @@
|
||||
<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()">查询</el-button>
|
||||
<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">
|
||||
@@ -506,12 +515,19 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { initProject, initMachine, searchtable, searchtable2, searchtable5 } from '@/api/ManufacturingCenter/ProjectPlanningQuery'
|
||||
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: [],
|
||||
@@ -553,7 +569,22 @@ export default {
|
||||
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)) {
|
||||
@@ -605,56 +636,90 @@ export default {
|
||||
this.loading = false
|
||||
} else {
|
||||
for (let i = 0; i < response.data.rows.length; i++) {
|
||||
if (response.data.rows[i].合同签订日期 !== '' && response.data.rows[i].合同签订日期 !== null) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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) {
|
||||
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].项目编号,
|
||||
@@ -715,7 +780,6 @@ export default {
|
||||
if (response.data[i].发货节点 !== '' && response.data[i].发货节点 !== null) {
|
||||
response.data[i].发货节点 = response.data[i].发货节点.split(' ')[0]
|
||||
}
|
||||
console.log(response.data[i].设备预验收节点, 11111)
|
||||
// if (response.data[i].设备预验收节点 !== '' && response.data[i].设备预验收节点 !== null) {
|
||||
// response.data[i].设备预验收节点 = response.data[i].设备预验收节点.split(' ')[0]
|
||||
// }
|
||||
@@ -763,7 +827,6 @@ export default {
|
||||
}
|
||||
}
|
||||
this.loading = false
|
||||
console.log(response.data, 222222)
|
||||
this.tableData = response.data
|
||||
}).then(() => {
|
||||
searchtable2(this.machineValue1, 1).then(response => {
|
||||
@@ -787,7 +850,6 @@ export default {
|
||||
}
|
||||
}
|
||||
this.loading1 = false
|
||||
console.log(response.data, 2)
|
||||
this.tableData1 = response.data
|
||||
})
|
||||
searchtable2(this.machineValue1, 2).then(response => {
|
||||
@@ -814,9 +876,7 @@ export default {
|
||||
}
|
||||
}
|
||||
this.loading1 = false
|
||||
console.log(response.data, 3)
|
||||
this.tableData2 = response.data
|
||||
console.log(response.data, 2222)
|
||||
})
|
||||
searchtable2(this.machineValue1, 3).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
@@ -842,7 +902,6 @@ export default {
|
||||
}
|
||||
}
|
||||
this.loading1 = false
|
||||
console.log(response.data, 4)
|
||||
this.tableData3 = response.data
|
||||
})
|
||||
searchtable2(this.machineValue1, 4).then(response => {
|
||||
@@ -869,11 +928,9 @@ export default {
|
||||
}
|
||||
}
|
||||
this.loading1 = false
|
||||
console.log(response.data, 5)
|
||||
this.tableData4 = response.data
|
||||
})
|
||||
searchtable2(this.machineValue1, 5).then(response => {
|
||||
console.log(response.data)
|
||||
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)) {
|
||||
@@ -897,7 +954,6 @@ export default {
|
||||
}
|
||||
}
|
||||
this.loading1 = false
|
||||
console.log(response.data, 6)
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user