This commit is contained in:
liushuai
2019-10-06 08:27:27 +08:00
parent 66876d957d
commit 3c48d2583e
9 changed files with 479 additions and 255 deletions

View File

@@ -18,7 +18,7 @@
</div>
<div id="son2" :class="[isActive ? color[20] : 'weikaishi']" class="module" style="position: relative;left: 1168px;top:190px; width: 80px;height: 48px;">
<el-tooltip :open-delay="600" placement="top">
<div slot="content">装配质检合格率{{ `${data2[0].装配质检}%` }}</div>
<div slot="content">装配质检合格率{{ `${data2[0].装配质检 === 11111111 ? '-' : data2[0].装配质检}%` }}</div>
<el-button :disabled="disabled" :class="[isActive ? color[20] : 'weikaishi']" type="text" @click.stop="searchDiv21">装配质检<br>{{ `${data2[0].装配质检 === 11111111 ? '-' : data2[0].装配质检}%` }}</el-button>
</el-tooltip>
</div>
@@ -54,13 +54,13 @@
</div>
<div id="son8" :class="[isActive ? color[14] : 'weikaishi']" class="module" style="position: relative;left: 280px;top:95px; width: 80px;height: 48px;">
<el-tooltip :open-delay="600" placement="top">
<div slot="content">自制质检合格率{{ `${data2[0].自制质检}%` }}</div>
<div slot="content">自制质检合格率{{ `${data2[0].自制质检 === 11111111 ? '-' : data2[0].自制质检}%` }}</div>
<el-button :disabled="disabled" :class="[isActive ? color[14] : 'weikaishi']" type="text" @click.stop="searchDiv12">自制质检<br>{{ `${data2[0].自制质检 === 11111111 ? '-' : data2[0].自制质检}%` }}</el-button>
</el-tooltip>
</div>
<div id="son9" :class="[isActive ? color[13] : 'weikaishi']" class="module" style="position: relative;left: 197px;top:286px; width: 80px;height: 48px;">
<el-tooltip :open-delay="600" placement="top">
<div slot="content">采购质检合格率{{ `${data2[0].采购质检}%` }}</div>
<div slot="content">采购质检合格率{{ `${data2[0].采购质检 === 11111111 ? '-' : data2[0].采购质检}%` }}</div>
<el-button :disabled="disabled" :class="[isActive ? color[13] : 'weikaishi']" type="text" @click.stop="searchDiv19">采购质检<br>{{ `${data2[0].采购质检 === 11111111 ? '-' : data2[0].采购质检}%` }}</el-button>
</el-tooltip>
</div>
@@ -96,8 +96,8 @@
</div>
<div id="son16" :class="[isActive ? color[0] : 'weikaishi']" class="module" style="position: relative;left: -1295px;top:236px; width: 80px;height: 48px;">
<el-tooltip :open-delay="600" placement="top">
<div slot="content">回款进度{{ `${data2[0].签订合同}%` }}</div>
<el-button :disabled="disabled" :class="[isActive ? color[0] : 'weikaishi']" type="text" @click.stop="searchDiv1">签订合同<br>{{ `${data2[0].签订合同}%` }}</el-button>
<div slot="content">回款进度{{ parseInt(`${data2[0].签订合同}`) + '%' }}</div>
<el-button :disabled="disabled" :class="[isActive ? color[0] : 'weikaishi']" type="text" @click.stop="searchDiv1">签订合同<br>{{ parseInt(`${data2[0].签订合同}`) + '%' }}</el-button>
</el-tooltip>
</div>
<div id="son17" :class="[isActive ? color[1] : 'weikaishi']" class="module" style="position: relative;left: -1280px;top:238px; width: 80px;height: 48px;">
@@ -319,7 +319,7 @@
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-row>
<div style="margin-top: 17px">
<span>机床设计者</span><el-tag size="mini">{{ '李玉萍' }}</el-tag>
<span>机床设计者</span><el-tag size="mini">{{ dataDiv2.负责人 }}</el-tag>
<span style="margin-left: 10px">组件总数</span><el-tag size="mini">{{ dataDiv2.组件总数 }}</el-tag>
<span style="margin-left: 10px">整改组数</span><el-tag size="mini">{{ dataDiv2.整改组数 }}</el-tag>
</div>
@@ -964,12 +964,7 @@
<el-card class="showDiv">
<h3 style="align-content: center">{{ Machine }} : 车间加工</h3>
<el-row style="margin-top: 10px">
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<div id="barDiv10" style="width:600px;height:400px; display: block; float: left"/>
</div>
</el-col>
<el-col :span="16">
<el-col :span="24">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv10"
@@ -985,13 +980,7 @@
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="scope.row.实际完成时间" type="success" size="mini" style="width: 80px">完成</el-tag>
<el-tag v-else type="danger" size="mini" style="width: 80px">未完成</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="组号" width="80px">
<el-table-column align="center" label="组号">
<template slot-scope="scope">
{{ scope.row.组号 ? scope.row.组号 : '--' }}
</template>
@@ -1001,7 +990,12 @@
{{ scope.row.任务名称 ? scope.row.任务名称 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="负责人" width="80px">
<el-table-column align="center" label="组别进度">
<template slot-scope="scope">
{{ scope.row.进度 ? scope.row.进度 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="负责人">
<template slot-scope="scope">
{{ scope.row.负责人 ? scope.row.负责人 : '--' }}
</template>
@@ -1333,6 +1327,11 @@
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="发货状态">
<template slot-scope="scope">
<el-tag v-if="scope.row.是否发出 === 1" type="success" size="mini" style="width: 80px">已发货</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="发货单编号">
<template slot-scope="scope">
{{ scope.row.发货单编号 ? scope.row.发货单编号 : '--' }}
@@ -1343,34 +1342,19 @@
{{ scope.row.发货单名称 ? scope.row.发货单名称 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="制单人">
<el-table-column align="center" label="货品编号">
<template slot-scope="scope">
{{ scope.row.制单人 ? scope.row.制单人 : '--' }}
{{ scope.row.货品编号 ? scope.row.货品编号 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="发货人">
<el-table-column align="center" label="货品名称">
<template slot-scope="scope">
{{ scope.row.执行人 ? scope.row.执行人 : '--' }}
{{ scope.row.货品名称 ? scope.row.货品名称 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="发出时间">
<el-table-column align="center" label="货品类别">
<template slot-scope="scope">
{{ scope.row.发出时间 ? scope.row.发出时间 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="车辆牌号">
<template slot-scope="scope">
{{ scope.row.车辆牌号 ? scope.row.车辆牌号 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="司机姓名">
<template slot-scope="scope">
{{ scope.row.司机姓名 ? scope.row.司机姓名 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="联系电话">
<template slot-scope="scope">
{{ scope.row.联系电话 ? scope.row.联系电话 : '--' }}
{{ scope.row.货品类别 ? scope.row.货品类别 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="收货单位">
@@ -1378,9 +1362,9 @@
{{ scope.row.收货单位 ? scope.row.收货单位 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="收货地址">
<el-table-column align="center" label="发出时间">
<template slot-scope="scope">
{{ scope.row.收货地址 ? scope.row.收货地址 : '--' }}
{{ scope.row.发出时间 ? scope.row.发出时间 : '--' }}
</template>
</el-table-column>
</el-table>
@@ -2082,6 +2066,7 @@ export default {
dataDiv2: {
组件总数: '',
整改组数: '',
负责人: '',
data: []
},
dataDiv3: {
@@ -2529,6 +2514,9 @@ export default {
}
}).then(res => {
this.tableDataDiv2 = res.data
if (this.tableDataDiv2.length !== 0) {
this.dataDiv2.负责人 = res.data[0].负责人
}
request({
url: '',
method: 'post',
@@ -3409,71 +3397,13 @@ export default {
method: 'post',
data: {
type: '3',
name: `select COUNT(*) as 未完成
from 项目计划管理_组件计划_视图
where 机床流水号 = ${this.machineValue1} and 计划类型 = 4 and 实际完成时间 is null`
name: `select CONVERT(nvarchar(50),round(CONVERT(float,sum(case when [机加工实际完成时间] is not null then [投产总数量] else 0 end ))/CONVERT(float,sum([投产总数量]))*100,2) ) as 进度
from 综合查询_车间加工
where 机床流水号 = ${this.machineValue1} and 计划类型 = 4`
}
}).then(res => {
if (res.data[0].未完成 !== 0) {
this.dataDiv10.data.push({
name: '未完成',
value: res.data[0].未完成
})
}
}).then(() => {
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select COUNT(*) as 已完成
from 项目计划管理_组件计划_视图
where 机床流水号 = ${this.machineValue1} and 计划类型 = 4 and 实际完成时间 is not null`
}
}).then(res => {
if (res.data[0].已完成 !== 0) {
this.dataDiv10.data.push({
name: '已完成',
value: res.data[0].已完成
})
}
this.drawLineDiv10()
})
})
})
},
// 绘制油漆div饼图
drawLineDiv10() {
const bar = echarts.init(document.getElementById('barDiv10'))
// 指定图表的配置项和数据
bar.setOption({
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
legend: {
orient: 'vertical',
left: 'left',
data: ['已完成', '未完成']
},
series: [
{
name: '状态比例',
type: 'pie',
radius: '55%',
center: ['50%', '45%'],
data: this.dataDiv10.data,
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
})
},
// 查询自家备料div数据
async searchDiv11() {
this.showDiv0 = false
@@ -4501,10 +4431,11 @@ export default {
method: 'post',
data: {
type: '3',
name: `select * from dbo.发货管理_发货单 where 机床流水号 = ${this.machineValue1} and 是否发出 = 1`
name: `select * from 综合查询_发货_查询视图 where 机床流水号 = 10`
}
}).then(res => {
this.tableDataDiv23 = res.data
console.log(this.tableDataDiv23)
})
}
}
@@ -4516,16 +4447,22 @@ export default {
background: red;
}
.jixingzhong{
width: 80px;
height: 40px;
background: #7eaced;
color: black;
font-weight: bold;
}
.yiwancheng{
width: 80px;
height: 40px;
background: #ff9759;
color: black;
font-weight: bold;
}
.weikaishi{
width: 80px;
height: 40px;
background: #EAEAEA;
color: black;
font-weight: bold;