Files
JY1.0/src/views/ManufacturingCenter/ParseQuery/index.vue
liushuai afcda77786 更新
2019-09-05 10:33:39 +08:00

4276 lines
180 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div>
<el-card>
<span>请选择机床</span>
<el-autocomplete
v-model="searchCriteria"
:fetch-suggestions="querySearch"
clearable
style="width: 200px;margin-left: 10px"
size="small"
class="inline-input"
placeholder="请输入内容"
@clear="clearMachine"
@select="handleSelect"/>
<!--<el-button type="success" icon="el-icon-search" size="mini" style="margin-left: 15px" @click="searchColor">查询</el-button>-->
</el-card>
<el-card>
<div class="main">
<div class="process">
<div :class="color[22]" class="module" style="position: relative;left: 1770px;top:220px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色装配部<br>根据营销部门发出发货请求<br>装配部进行发货</div>
<el-button :disabled="disabled" type="text" @click="searchDiv23">发货</el-button>
</el-tooltip>
</div>
<div :class="color[21]" class="module" style="position: relative;left: 1580px;top:220px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色质检部<br>对机床进行总装调试</div>
<el-button :disabled="disabled" type="text" @click="searchDiv22">总装调试</el-button>
</el-tooltip>
</div>
<div :class="color[20]" class="module" style="position: relative;left: 1390px;top:220px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色质检部<br>对机床重要部件进行检测</div>
<el-button :disabled="disabled" type="text" @click="searchDiv21">装配质检</el-button>
</el-tooltip>
</div>
<div :class="color[19]" class="module" style="position: relative;left: 1185px;top:105px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色电气部<br>电气部长制定装配计划<br>并记录计划执行情况</div>
<el-button :disabled="disabled" type="text" @click="searchDiv6">电气装配</el-button>
</el-tooltip>
</div>
<div :class="color[18]" class="module" style="position: relative;left: 1100px;top:176px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色装配部长<br>装配部长制定装配计划<br>并记录计划执行情况</div>
<el-button :disabled="disabled" type="text" @click="searchDiv5">机械装配</el-button>
</el-tooltip>
</div>
<div :class="color[17]" class="module" style="position: relative;left: 1015px;top:247px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色冷作车间主任<br>冷作车间主任制定冷作计划<br>并记录计划执行情况</div>
<el-button :disabled="disabled" type="text" @click="searchDiv7">冷作</el-button>
</el-tooltip>
</div>
<div :class="color[16]" class="module" style="position: relative;left: 930px;top:319px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色油漆车间主任<br>油漆车间主任制定装配计划<br>并记录计划执行情况</div>
<el-button :disabled="disabled" type="text" @click="searchDiv8">油漆</el-button>
</el-tooltip>
</div>
<div :class="color[15]" class="module" style="position: relative;left: 695px;top:220px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色装配部长<br>此模块用于查询某机床是否达到装配条件<br>即采购件与自制件是否成组配套</div>
<el-button :disabled="disabled" type="text" @click="searchDiv9">成组配套</el-button>
</el-tooltip>
</div>
<div :class="color[14]" class="module" style="position: relative;left: 455px;top:55px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色质检部<br>对自制件进行检测</div>
<el-button :disabled="disabled" type="text" @click="searchDiv12">自制质检</el-button>
</el-tooltip>
</div>
<div :class="color[13]" class="module" style="position: relative;left: 373px;top:283px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色质检部<br>对采购件进行检测</div>
<el-button :disabled="disabled" type="text" @click="searchDiv19">采购质检</el-button>
</el-tooltip>
</div>
<div :class="color[12]" class="module" style="position: relative;left: 160px;top:110px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色金工车间<br>接收加工任务并使用<br>MES工作站进行报工</div>
<el-button :disabled="disabled" type="text" @click="searchDiv10">车间加工</el-button>
</el-tooltip>
</div>
<div :class="color[11]" class="module" style="position: relative;left: -25px;top:-1px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色外协员<br>进行外协加工</div>
<el-button :disabled="disabled" type="text" @click="searchDiv18">工序外协</el-button>
</el-tooltip>
</div>
<div :class="color[10]" class="module" style="position: relative;left: -230px;top:54px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色计划员<br>针对做完工艺定额的零件进行排查</div>
<el-button :disabled="disabled" type="text" @click="searchDiv15">能力平衡</el-button>
</el-tooltip>
</div>
<div :class="color[9]" class="module" style="position: relative;left: -415px;top:54px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色工艺部<br>制定零件定额</div>
<el-button :disabled="disabled" type="text" @click="searchDiv14">定额</el-button>
</el-tooltip>
</div>
<div :class="color[8]" class="module" style="position: relative;left: -597px;top:54px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色工艺部<br>制定零件工艺</div>
<el-button :disabled="disabled" type="text" @click="searchDiv13">工艺</el-button>
</el-tooltip>
</div>
<div :class="color[7]" class="module" style="position: relative;left: -805px;top:1px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色下料员<br>对于钢板等自家备料<br>下料员需要在系统确认备料<br>并通知金工领料</div>
<el-button :disabled="disabled" type="text" @click="searchDiv11">自家备料</el-button>
</el-tooltip>
</div>
<div :class="color[0]" class="module" style="position: relative;left: -1350px;top:222px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色营销内勤<br>负责创建项目及机床的基础信息<br>此部分作为系统数据的源头</div>
<el-button :disabled="disabled" type="text" @click="searchDiv1">签订合同</el-button>
</el-tooltip>
</div>
<div :class="color[1]" class="module" style="position: relative;left: -1336px;top:222px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色技术员<br>负责导入三表(零件)<br>组件在项目启动会时提出<br>由制造总监导入</div>
<el-button :disabled="disabled" type="text" @click="searchDiv2">产品设计</el-button>
</el-tooltip>
</div>
<div :class="color[6]" class="module" style="position: relative;left: -1057px;top:110px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色下料员<br>外购物料到货后由下料员确认备料<br>并通知金工领料</div>
<el-button :disabled="disabled" type="text" @click="searchDiv20">外购备料</el-button>
</el-tooltip>
</div>
<div :class="color[2]" class="module" style="position: relative;left: -1405px;top:222px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色计划员<br>计划员负责将三表中的零件按实际情况分配为<br>自制件采购部采购件制造部采购件三类</div>
<el-button :disabled="disabled" type="text" @click="searchDiv3">零件分配</el-button>
</el-tooltip>
</div>
<div :class="color[3]" class="module" style="position: relative;left: -1350px;top:63px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色计划员<br>计划员分配零件后<br>在生产计划下达模块<br>可查看到自家加工的零件任务<br>计划员需要将这些零件投产</div>
<el-button :disabled="disabled" type="text" @click="searchDiv4">自制件</el-button>
</el-tooltip>
</div>
<div :class="color[5]" class="module" style="position: relative;left: -1435px;top:223px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色制造部长<br>计划员分配零件后<br>将分配到制造部的采购件进行采购</div>
<el-button :disabled="disabled" type="text" @click="searchDiv17">车间采购</el-button>
</el-tooltip>
</div>
<div :class="color[4]" class="module" style="position: relative;left: -548px;top:300px; width: 80px;height: 48px;">
<el-tooltip placement="top">
<div slot="content">角色采购部<br>计划员分配零件后<br>将分配到采购部的采购件进行采购</div>
<el-button :disabled="disabled" type="text" @click="searchDiv16">采购部采购</el-button>
</el-tooltip>
</div>
</div>
</div>
</el-card>
<!--初始化-->
<div v-show="showDiv0">
<el-card class="showDiv">
<div class="grid-content bg-purple" style="width: 100%; height: 340px; border: 1px solid #DCDFE6;text-align: center;line-height: 340px;color: #DCDFE6">
<h2>请选择项目后选择节点查看对应信息</h2>
</div>
</el-card>
</div>
<!--签订合同-->
<div v-show="showDiv1">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6">
<div style="margin:0 auto; width:400px; height:100px;margin-top: 70px">
<div>
<span class="tag-group__title">合同编号</span>
<el-tag
size="small"
effect="dark">
{{ dataDiv1.合同编号 }}
</el-tag>
</div>
<div style="margin-top: 17px">
<span class="tag-group__title">项目名称</span>
{{ dataDiv1.项目名称 }}
</div>
<div style="margin-top: 17px">
<span class="tag-group__title">签订日期</span>
{{ dataDiv1.合同签订日期.substring(0, 11) }}
</div>
<div style="margin-top: 17px">
<span class="tag-group__title">交货节点</span>
{{ dataDiv1.发货节点.substring(0, 11) }}
</div>
</div>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6">
<div style="margin:0 auto; width:400px; height:100px;margin-top: 70px">
<div style="margin-top: 17px">
<span class="tag-group__title">营销经理</span>
<el-tag
size="small"
effect="dark">
{{ dataDiv1.姓名 }}
</el-tag>
</div>
<div style="margin-top: 17px">
合同总金额{{ dataDiv1.合同总金额 }}
</div>
<div style="margin-top: 17px">
已收款金额{{ dataDiv1.已支付 }}
</div>
<div style="margin-top: 17px">
<span class="tag-group__title">付款方式</span>
{{ dataDiv1.付款方式 }}
</div>
<div style="margin-top: 17px">
<sapn>回款进度</sapn>
<div style="width: 200px;display: inline-block">
<el-progress :text-inside="true" :stroke-width="15" :percentage="dataDiv1.付款百分比"/>
</div>
</div>
</div>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple-light" style="width: 99%; height: 340px; border: 1px solid #DCDFE6">
<div style="margin:0 auto; width:400px; height:100px;margin-top: 70px">
<div style="margin-top: 17px">
<span class="tag-group__title">客户名称</span>
{{ dataDiv1.客户名称 }}
</div>
<div style="margin-top: 17px">
<span class="tag-group__title">联系人</span>
{{ dataDiv1.联系人 }}
</div>
<div style="margin-top: 17px">
<span class="tag-group__title">联系方式</span>
{{ dataDiv1.电话 }}
</div>
<div style="margin-top: 17px">
<sapn>客户评级</sapn>
<el-rate
:max="maxDiv1"
v-model="valueDiv1"
style="display: inline-block"
disabled
show-score
text-color="#ff9900"
score-template="{value}"/>
</div>
</div>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--产品设计-->
<div v-show="showDiv2">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<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 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>
</el-row>
<el-row>
<div id="barDiv1" style="width:600px;height:400px; display: block; float: left"/>
</el-row>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; color: #DCDFE6">
<el-table
:data="tableDataDiv2"
height="340"
style="width: 100%;min-height: 300px;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
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="组号">
<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.任务开始时间.substring(0, 11) }}
</template>
</el-table-column>
<el-table-column label="计划完成时间" align="center">
<template slot-scope="scope">
{{ scope.row.计划完成时间.substring(0, 11) }}
</template>
</el-table-column>
<el-table-column label="实际完成时间" align="center">
<template slot-scope="scope">
{{ scope.row.实际完成时间 ? scope.row.实际完成时间 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="延期时间">
<template slot-scope="scope">
{{ scope.row.时间差 > 0 ? '延迟' + Math.abs(scope.row.时间差) + '天' : '提前' + Math.abs(scope.row.时间差) + '天' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--零件分配-->
<div v-show="showDiv3">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-row>
<div id="barDiv3" style="width:600px;height:350px; display: block; float: left;margin-top: 15px"/>
</el-row>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; color: #DCDFE6">
<el-table
:data="tableDataDiv3"
height="340"
style="width: 100%;min-height: 300px;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.总未分配个数) <= 0 && parseInt(scope.row.总个数) !== 0" type="success" size="mini" style="width: 80px">完成</el-tag>
<el-tag v-else-if="parseInt(scope.row.总个数) === 0" type="danger" size="mini" style="width: 80px">三表未导入</el-tag>
<el-tag v-else type="warning" size="mini" style="width: 80px">未完成</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="分配进度">
<template slot-scope="scope">
<el-progress :text-inside="true" :stroke-width="15" :percentage="percent(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.基本件个数 }}
</template>
</el-table-column>
<el-table-column align="center" label="外购件/标准件条数">
<template slot-scope="scope">
{{ scope.row.外购件个数 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件总条数">
<template slot-scope="scope">
{{ scope.row.总个数 }}
</template>
</el-table-column>
<el-table-column align="center" label="未分配条数">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.总未分配个数) <= 0 && parseInt(scope.row.总个数) !== 0" type="success" size="mini" style="width: 80px">{{ scope.row.总未分配个数 }}</el-tag>
<el-tag v-else-if="parseInt(scope.row.总个数) === 0" type="danger" size="mini" style="width: 80px">{{ scope.row.总未分配个数 }}</el-tag>
<el-tag v-else type="warning" size="mini" style="width: 80px">{{ scope.row.总未分配个数 }}</el-tag>
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--自制件-->
<div v-show="showDiv4">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-row>
<div id="barDiv4" style="width:600px;height:320px; display: block; float: left;margin-top: 15px;margin-left: 10px"/>
</el-row>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; color: #DCDFE6">
<el-table
:data="tableDataDiv4"
height="340"
style="width: 100%;min-height: 300px;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="(parseInt(scope.row.自家加工件总条数) - parseInt(scope.row.已传递条数)) <= 0 && parseInt(scope.row.自家加工件总条数) !== 0" type="success" size="mini" style="width: 80px">投产完成</el-tag>
<el-tag v-else-if="parseInt(scope.row.自家加工件总条数) === 0" type="danger" size="mini" style="width: 80px">未分配/导入</el-tag>
<el-tag v-else type="warning" size="mini" style="width: 80px">未完成</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="未投产条数">
<template slot-scope="scope">
{{ (parseInt(scope.row.自家加工件总条数) - parseInt(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.自家加工件总条数 }}
</template>
</el-table-column>
<el-table-column align="center" label="已投产条数">
<template slot-scope="scope">
{{ scope.row.已传递条数 }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--机械装配-->
<div v-show="showDiv5">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-row>
<div id="barDiv5" style="width:600px;height:400px; display: block; float: left"/>
</el-row>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; color: #DCDFE6">
<el-table
:data="tableDataDiv5"
height="340"
style="width: 100%;min-height: 300px;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="(scope.row.开始时间 !== null && scope.row.开始时间 !== '') && (scope.row.结束时间 !== null && scope.row.结束时间 !== '')" type="success" size="mini" style="width: 80px">装配完成</el-tag>
<el-tag v-else-if="(scope.row.开始时间 !== null && scope.row.开始时间 !== '') && (scope.row.结束时间 === null || scope.row.结束时间 === '')" type="warning" 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="组号">
<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.开始时间 : '--' }}
</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.结束时间 ? parseInt(scope.row.实际工时) + parseInt(scope.row.修补工时) : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--电气装配-->
<div v-show="showDiv6">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-row>
<div id="barDiv6" style="width:600px;height:400px; display: block; float: left"/>
</el-row>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; color: #DCDFE6">
<el-table
:data="tableDataDiv6"
height="340"
style="width: 100%;min-height: 300px;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="(scope.row.开始时间 !== null && scope.row.开始时间 !== '') && (scope.row.结束时间 !== null && scope.row.结束时间 !== '')" type="success" size="mini" style="width: 80px">装配完成</el-tag>
<el-tag v-else-if="(scope.row.开始时间 !== null && scope.row.开始时间 !== '') && (scope.row.结束时间 === null || scope.row.结束时间 === '')" type="warning" 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="组号">
<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.开始时间 : '--' }}
</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.结束时间 ? parseInt(scope.row.实际工时) + parseInt(scope.row.修补工时) : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--冷作计划-->
<div v-show="showDiv7">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-row>
<div id="barDiv7" style="width:600px;height:400px; display: block; float: left"/>
</el-row>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; color: #DCDFE6">
<el-table
:data="tableDataDiv7"
height="340"
style="width: 100%;min-height: 300px;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="(scope.row.开始时间 !== null && scope.row.开始时间 !== '') && (scope.row.结束时间 !== null && scope.row.结束时间 !== '')" type="success" size="mini" style="width: 80px">冷作完成</el-tag>
<el-tag v-else-if="(scope.row.开始时间 !== null && scope.row.开始时间 !== '') && (scope.row.结束时间 === null || scope.row.结束时间 === '')" type="warning" 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="组号">
<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.开始时间 : '--' }}
</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.结束时间 ? parseInt(scope.row.实际工时) + parseInt(scope.row.修补工时) : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--油漆计划-->
<div v-show="showDiv8">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-row>
<div id="barDiv8" style="width:600px;height:400px; display: block; float: left"/>
</el-row>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; color: #DCDFE6">
<el-table
:data="tableDataDiv8"
height="340"
style="width: 100%;min-height: 300px;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="(scope.row.开始时间 !== null && scope.row.开始时间 !== '') && (scope.row.结束时间 !== null && scope.row.结束时间 !== '')" type="success" size="mini" style="width: 80px">油漆完成</el-tag>
<el-tag v-else-if="(scope.row.开始时间 !== null && scope.row.开始时间 !== '') && (scope.row.结束时间 === null || scope.row.结束时间 === '')" type="warning" 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="组号">
<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.开始时间 : '--' }}
</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.结束时间 ? parseInt(scope.row.实际工时) + parseInt(scope.row.修补工时) : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--成组配套-->
<div v-show="showDiv9">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
id="div1"
ref="div1"
:data="tableDataDiv9A"
style="width: 100%;height: 340px;overflow-y: auto;"
size="mini"
highlight-current-row
border
@mouseenter.native="changeScroll1">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="组号" width="80px">
<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="投产数量" width="80px">
<template slot-scope="scope">
{{ scope.row.投产数量 ? scope.row.投产数量 : '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="加工完成数量">
<template slot-scope="scope">
{{ scope.row.入库数量 ? scope.row.入库数量 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="完成时间" width="100px">
<template slot-scope="scope">
{{ scope.row.完成时间 ? scope.row.完成时间.substring(0, 11) : 0 }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
id="div2"
ref="div2"
:data="tableDataDiv9B"
style="width: 100%;height: 340px;overflow-y: scroll;"
size="mini"
highlight-current-row
border
@mouseenter.native="changeScroll2">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="组号" width="80px">
<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="投产数量" width="80px">
<template slot-scope="scope">
{{ scope.row.总零件数量 ? scope.row.总零件数量 : '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="采购到货数量">
<template slot-scope="scope">
{{ scope.row.总到货数量 ? scope.row.总到货数量 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="完成时间" width="100px">
<template slot-scope="scope">
{{ scope.row.完成时间 !== '1900-01-01 00:00:00' ? scope.row.完成时间 : '未完成' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
id="div3"
ref="div3"
:data="tableDataDiv9C"
style="width: 100%;height: 340px;overflow-y: scroll;"
size="mini"
highlight-current-row
border
@mouseenter.native="changeScroll3">
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="组号" width="80px">
<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="投产数量" width="80px">
<template slot-scope="scope">
{{ scope.row.总零件数量 ? scope.row.总零件数量 : '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="车间采购到货">
<template slot-scope="scope">
{{ scope.row.到货数量 ? scope.row.到货数量 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="完成时间">
<template slot-scope="scope">
{{ scope.row.完成时间 !== '1900-01-01 00:00:00' ? scope.row.完成时间 : '未完成' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--车间加工-->
<div v-show="showDiv10">
<el-card class="showDiv">
<el-row>
<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">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv10"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
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">
<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="负责人" width="80px">
<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.任务开始时间.substring(0, 11) : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="计划完成时间">
<template slot-scope="scope">
{{ scope.row.计划完成时间 ? scope.row.计划完成时间.substring(0, 11) : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="实际完成时间">
<template slot-scope="scope">
{{ scope.row.实际完成时间 ? scope.row.实际完成时间.substring(0, 11) : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--自家备料-->
<div v-show="showDiv11">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<div id="barDiv11" style="width:600px;height:350px; display: block; float: left"/>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv11"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
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">
<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.已备料条数 : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--自制件质检-->
<div v-show="showDiv12">
<el-card class="showDiv">
<el-row>
<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="tableDataDiv12"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="组号" width="80px">
<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.检测总数量 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="不合格数">
<template slot-scope="scope">
{{ scope.row.不合格总数量 ? scope.row.不合格总数量 : '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="合格率">
<template slot-scope="scope">
<el-tag size="mini" style="width: 80px">{{ scope.row.合格率 ? scope.row.合格率 * 100 + '%' : '--' }}</el-tag>
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--工艺-->
<div v-show="showDiv13">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<div id="barDiv13" style="width:600px;height:350px; display: block; float: left"/>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv13"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="组号" width="80px">
<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.已制定零件数 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="未制定条数">
<template slot-scope="scope">
{{ scope.row.未制定零件数 ? scope.row.未制定零件数 : '0' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--定额-->
<div v-show="showDiv14">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<div id="barDiv14" style="width:600px;height:350px; display: block; float: left"/>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv14"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="组号" width="80px">
<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.已制定零件数 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="未制定条数">
<template slot-scope="scope">
{{ scope.row.未制定零件数 ? scope.row.未制定零件数 : '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="理论工时">
<template slot-scope="scope">
{{ scope.row.理论总工时 ? scope.row.理论总工时 : '0' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--能力平衡-->
<div v-show="showDiv15">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<div id="barDiv15" style="width:600px;height:350px; display: block; float: left"/>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv15"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成" width="120px">
<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">
<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.已完成数量 : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--发货-->
<div v-show="showDiv23">
<el-card class="showDiv">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv23"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<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.执行人 : '--' }}
</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.司机姓名 : '--' }}
</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.收货地址 : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-card>
</div>
<!--采购部采购-->
<div v-show="showDiv16">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv16A"
style="width: 100%;height: 340px;overflow-y: auto;"
size="mini"
highlight-current-row
border>
<el-table-column align="center" label="组号" width="80px">
<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="总外购件数" width="80px">
<template slot-scope="scope">
{{ scope.row.总外购件数 ? scope.row.总外购件数 : '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="已采购外购件数" width="100px">
<template slot-scope="scope">
{{ scope.row.已采购外购件数 ? scope.row.已采购外购件数 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="部分采购外购件数" width="100px">
<template slot-scope="scope">
{{ scope.row.部分采购外购件数 ? scope.row.部分采购外购件数 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="总到货数外购件数" width="100px">
<template slot-scope="scope">
{{ scope.row.总到货数外购件数 ? scope.row.总到货数外购件数 : 0 }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv16B"
style="width: 100%;height: 340px;overflow-y: scroll;"
size="mini"
highlight-current-row
border>
<el-table-column align="center" label="组号" width="80px">
<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="总标准件数" width="80px">
<template slot-scope="scope">
{{ scope.row.总标准件数 ? scope.row.总标准件数: '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="已采购标准件数">
<template slot-scope="scope">
{{ scope.row.已采购标准件数 ? scope.row.已采购标准件数 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="部分采购标准件数">
<template slot-scope="scope">
{{ scope.row.部分采购标准件数 ? scope.row.部分采购标准件数 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="总到货数标准件数">
<template slot-scope="scope">
{{ scope.row.总到货数标准件数 ? scope.row.总到货数标准件数 : 0 }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv16C"
style="width: 100%;height: 340px;overflow-y: scroll;"
size="mini"
highlight-current-row
border>
<el-table-column align="center" label="组号" width="80px">
<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="总基本件数" width="80px">
<template slot-scope="scope">
{{ scope.row.总基本件数 ? scope.row.总基本件数: '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="已采购基本件数">
<template slot-scope="scope">
{{ scope.row.已采购基本件数 ? scope.row.已采购基本件数 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="部分采购基本件数">
<template slot-scope="scope">
{{ scope.row.部分采购基本件数 ? scope.row.部分采购基本件数 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="总到货数基本件数">
<template slot-scope="scope">
{{ scope.row.总到货数基本件数 ? scope.row.总到货数基本件数 : 0 }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--车间采购-->
<div v-show="showDiv17">
<el-card class="showDiv">
<el-row>
<el-col :span="12">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv17A"
style="width: 100%;height: 340px;overflow-y: auto;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="60"/>
<el-table-column align="center" label="组号" width="120px">
<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="总基本件数" width="150px">
<template slot-scope="scope">
{{ scope.row.总基本件数 ? scope.row.总基本件数 : '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="已采购基本件数" width="150px">
<template slot-scope="scope">
{{ scope.row.已采购基本件数? scope.row.已采购基本件数 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="总到货数基本件数" width="150px">
<template slot-scope="scope">
{{ scope.row.总到货数基本件数 ? scope.row.总到货数基本件数 : 0 }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
<el-col :span="12">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-table
:data="tableDataDiv17B"
style="width: 100%;height: 340px;overflow-y: scroll;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="60"/>
<el-table-column align="center" label="组号" width="120px">
<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="总基本件数" width="150px">
<template slot-scope="scope">
{{ scope.row.总基本件数 ? scope.row.总基本件数: '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="已采购基本件数" width="150px">
<template slot-scope="scope">
{{ scope.row.已采购基本件数 ? scope.row.已采购基本件数 : 0 }}
</template>
</el-table-column>
<el-table-column align="center" label="总到货数基本件数" width="150px">
<template slot-scope="scope">
{{ scope.row.总到货数基本件数 ? scope.row.总到货数基本件数 : 0 }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--工序外协-->
<div v-show="showDiv18">
<el-card class="showDiv">
<el-row>
<el-col :span="8">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">
<el-row>
<div id="barDiv18" style="width:600px;height:350px; display: block; float: left;margin-top: 15px"/>
</el-row>
</div>
</el-col>
<el-col :span="16">
<div class="grid-content bg-purple" style="width: 99%; height: 340px; color: #DCDFE6">
<el-table
:data="tableDataDiv18"
height="340"
style="width: 100%;min-height: 300px;"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
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-if="scope.row.完成状态 === '未外协'" type="danger" size="mini" style="width: 80px">未外协</el-tag>
<el-tag v-else type="warning" 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.组号 : '--' }}
</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.外协总数 }}
</template>
</el-table-column>
<el-table-column align="center" label="已完成数量">
<template slot-scope="scope">
{{ 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>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--采购质检-->
<div v-show="showDiv19">
<el-card class="showDiv">
<el-row>
<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="tableDataDiv19"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="组号" width="80px">
<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.检测总数量 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="不合格数">
<template slot-scope="scope">
{{ scope.row.不合格总数量 ? scope.row.不合格总数量 : '0' }}
</template>
</el-table-column>
<el-table-column align="center" label="合格率">
<template slot-scope="scope">
<el-tag size="mini" style="width: 80px">{{ scope.row.合格率 ? scope.row.合格率 * 100 + '%' : '--' }}</el-tag>
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--外购备料-->
<div v-show="showDiv20">
<el-card class="showDiv">
<el-row>
<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="tableDataDiv20"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.外购备料到货总数)=== parseInt(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">
<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.外购备料到货总数 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="外购备料出库总数">
<template slot-scope="scope">
{{ scope.row.外购备料出库总数 ? scope.row.外购备料出库总数 : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--装配质检-->
<div v-show="showDiv21">
<el-card class="showDiv">
<el-row>
<!--<el-col :span="8">-->
<!--<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">-->
<!--<div id="barDiv11" style="width:600px;height:350px; display: block; float: left"/>-->
<!--</div>-->
<!--</el-col>-->
<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="tableDataDiv21"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否合格)=== 1" 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="机床图号">
<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="组号" width="80px">
<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.检测项明细 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 ? scope.row.备注 : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
<!--总装调试-->
<div v-show="showDiv22">
<el-card class="showDiv">
<el-row>
<!--<el-col :span="8">-->
<!--<div class="grid-content bg-purple" style="width: 99%; height: 340px; border: 1px solid #DCDFE6;text-align: center">-->
<!--<div id="barDiv11" style="width:600px;height:350px; display: block; float: left"/>-->
<!--</div>-->
<!--</el-col>-->
<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="tableDataDiv22"
height="340"
style="width: 100%"
size="mini"
highlight-current-row
border>
<el-table-column
label="序号"
align="center"
type="index"
width="50"/>
<el-table-column align="center" label="是否完成">
<template slot-scope="scope">
<el-tag v-if="parseInt(scope.row.是否合格)=== 1" 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="机床图号">
<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="组号" width="80px">
<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.检测项明细 : '--' }}
</template>
</el-table-column>
<el-table-column align="center" label="备注">
<template slot-scope="scope">
{{ scope.row.备注 ? scope.row.备注 : '--' }}
</template>
</el-table-column>
</el-table>
</div>
</el-col>
</el-row>
</el-card>
</div>
</div>
</template>
<script>
import { SelectMachine, ProcessOutsourcing, ProcessProportion } from '@/api/ManufacturingCenter/ParseQuery'
import request from '@/utils/request'
import echarts from 'echarts'
export default {
data() {
return {
Purchase: '',
WorkPurchase: '',
Outsourcing: '',
Home: '',
color: [],
disabled: true,
machineValue: '', // 机床流水号
searchCriteria: '', // 机床名称 V-model
restaurants: [], // 机床名称数组
showDiv0: true,
showDiv1: false,
showDiv2: false,
showDiv3: false,
showDiv4: false,
showDiv5: false,
showDiv6: false,
showDiv7: false,
showDiv8: false,
showDiv9: false,
showDiv10: false,
showDiv11: false,
showDiv12: false,
showDiv13: false,
showDiv14: false,
showDiv15: false,
showDiv23: false,
showDiv16: false,
showDiv17: false,
showDiv18: false,
showDiv19: false,
showDiv20: false,
showDiv21: false,
showDiv22: false,
valueDiv1: null, // div1 客户评级
maxDiv1: 6, // div1 客户评级最大值
tableDataDiv2: [],
tableDataDiv3: [],
tableDataDiv4: [],
tableDataDiv5: [],
tableDataDiv6: [],
tableDataDiv7: [],
tableDataDiv8: [],
tableDataDiv9A: [],
tableDataDiv9B: [],
tableDataDiv9C: [],
tableDataDiv10: [],
tableDataDiv11: [],
tableDataDiv12: [],
tableDataDiv13: [],
tableDataDiv14: [],
tableDataDiv15: [],
tableDataDiv16A: [],
tableDataDiv16B: [],
tableDataDiv16C: [],
tableDataDiv17A: [],
tableDataDiv17B: [],
tableDataDiv18: [],
tableDataDiv19: [],
tableDataDiv20: [],
tableDataDiv21: [],
tableDataDiv22: [],
tableDataDiv23: [],
dataDiv1: {
付款方式: '无数据',
付款方式代码: '无数据',
价值评估: '无数据',
价值评估流水号: '无数据',
发货节点: '无数据',
合同总金额: '无数据',
合同签订日期: '无数据',
合同编号: '无数据',
姓名: '无数据',
客户名称: '无数据',
已支付: '无数据',
电话: '无数据',
联系人: '无数据',
营销经理流水号: '无数据',
项目名称: '无数据',
项目流水号: '无数据',
付款百分比: 0
},
dataDiv2: {
组件总数: '',
整改组数: '',
data: []
},
dataDiv3: {
xData: [],
yDataA: [],
yDataB: []
},
dataDiv4: {
xData: [],
yDataA: [],
yDataB: []
},
dataDiv5: {
data1: null,
data2: null,
data3: null,
data4: [],
length: null
},
dataDiv6: {
data1: null,
data2: null,
data3: null,
data4: [],
length: null
},
dataDiv7: {
data1: null,
data2: null,
data3: null,
data4: [],
length: null
},
dataDiv8: {
data1: null,
data2: null,
data3: null,
data4: [],
length: null
},
dataDiv10: {
data: []
},
dataDiv11: {
xData: [],
yDataA: [],
yDataB: []
},
dataDiv13: {
xData: [],
yDataA: [],
yDataB: []
},
dataDiv14: {
xData: [],
yDataA: [],
yDataB: []
},
dataDiv15: {
xData: [],
yDataA: [],
yDataB: []
},
dataDiv18: {
xData: [],
yDataA: []
}
}
},
created() {
this.color[0] = 'white'
this.color[1] = 'white'
this.color[2] = 'white'
this.color[3] = 'white'
this.color[4] = 'white'
this.color[5] = 'white'
this.color[6] = 'white'
this.color[7] = 'white'
this.color[8] = 'white'
this.color[9] = 'white'
this.color[10] = 'white'
this.color[11] = 'white'
this.color[12] = 'white'
this.color[13] = 'white'
this.color[14] = 'white'
this.color[15] = 'white'
this.color[16] = 'white'
this.color[17] = 'white'
this.color[18] = 'white'
this.color[19] = 'white'
this.color[20] = 'white'
this.color[21] = 'white'
this.color[22] = 'white'
},
methods: {
changeScroll1() {
const div1 = document.getElementById('div1')
const div2 = document.getElementById('div2')
const div3 = document.getElementById('div3')
div2.removeAttribute('onscroll')
div3.removeAttribute('onscroll')
div1.setAttribute('onscroll', 'document.getElementById(\'div2\').scrollTop = scrollTop;document.getElementById(\'div3\').scrollTop = scrollTop')
},
changeScroll2() {
const div1 = document.getElementById('div1')
const div2 = document.getElementById('div2')
const div3 = document.getElementById('div3')
div1.removeAttribute('onscroll')
div3.removeAttribute('onscroll')
div2.setAttribute('onscroll', 'document.getElementById(\'div1\').scrollTop = scrollTop;document.getElementById(\'div3\').scrollTop = scrollTop')
},
changeScroll3() {
const div1 = document.getElementById('div1')
const div2 = document.getElementById('div2')
const div3 = document.getElementById('div3')
div2.removeAttribute('onscroll')
div1.removeAttribute('onscroll')
div3.setAttribute('onscroll', 'document.getElementById(\'div2\').scrollTop = scrollTop;document.getElementById(\'div1\').scrollTop = scrollTop')
},
// 百分数转换
percent(row) {
const a = parseInt(row.总个数) - parseInt(row.总未分配个数)
const b = parseInt(row.总个数)
return b !== 0 ? (a / b * 100).toFixed(2) : 0
},
// 清空查询条件
clearMachine() {
this.machineValue = ''
this.disabled = true
this.showDiv0 = true
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
},
// 机床名称查询函数
querySearch(queryString, cb) {
this.restaurants = []
if (this.searchCriteria !== '' && this.searchCriteria !== null) {
SelectMachine(this.searchCriteria).then(response => {
const res = response.data
res.forEach(item => {
this.restaurants.push({
value: item.货品编号,
num: item.机床流水号
})
})
return this.restaurants
}).then(data => {
var restaurants = data
var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants
return results
}).then(data => {
// 调用 callback 返回建议列表的数据
cb(data)
})
}
},
// 机床名称实时请求查询匹配函数
createFilter(queryString) {
return (restaurant) => {
return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) !== -1)
// !== -1为全字匹配 === 0为首字匹配
}
},
// 选择机床名称后的赋值函数
handleSelect(item) {
// 在此方法中可以把下拉框选中值中的内容赋值给其他变量使用
console.log(item)
this.machineValue = item.num
this.machineValue ? this.disabled = false : this.disabled = true
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv0 = true
},
// 查询签订合同div数据
async searchDiv1() {
this.showDiv0 = false
this.showDiv1 = true
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 项目流水号 from PDM_机床名称 where 机床流水号 = ${this.machineValue}`
}
}).then(res => {
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from 综合查询_签订合同模块信息视图 where 项目流水号 = ${res.data[0].项目流水号}`
}
}).then(res => {
this.dataDiv1.付款方式 = res.data[0].付款方式
this.dataDiv1.付款方式代码 = res.data[0].付款方式代码
this.dataDiv1.价值评估 = res.data[0].价值评估
this.dataDiv1.价值评估流水号 = res.data[0].价值评估流水号
this.dataDiv1.发货节点 = res.data[0].发货节点
res.data[0].合同总金额 !== '' && res.data[0].合同总金额 !== null ? this.dataDiv1.合同总金额 = res.data[0].合同总金额 + '万元' : this.dataDiv1.合同总金额 = '无数据'
this.dataDiv1.合同签订日期 = res.data[0].合同签订日期
this.dataDiv1.合同编号 = res.data[0].合同编号
this.dataDiv1.姓名 = res.data[0].姓名
this.dataDiv1.客户名称 = res.data[0].客户名称
res.data[0].已支付 !== '' && res.data[0].已支付 !== null ? this.dataDiv1.已支付 = res.data[0].已支付 + '万元' : this.dataDiv1.已支付 = '无数据'
res.data[0].电话 !== '' && res.data[0].电话 !== null ? this.dataDiv1.电话 = res.data[0].电话 : this.dataDiv1.电话 = '无数据'
this.dataDiv1.联系人 = res.data[0].联系人
this.dataDiv1.营销经理流水号 = res.data[0].营销经理流水号
this.dataDiv1.项目名称 = res.data[0].项目名称
this.dataDiv1.项目流水号 = res.data[0].项目流水号
res.data[0].付款百分比 !== '' && res.data[0].付款百分比 !== null ? this.dataDiv1.付款百分比 = res.data[0].付款百分比 : this.dataDiv1.付款百分比 = 0
if (res.data[0].价值评估 === '高') {
this.valueDiv1 = 6
} else if (res.data[0].价值评估 === '高') {
this.valueDiv1 = 3
} else {
this.valueDiv1 = 1
}
})
})
},
// 查询产品设计div数据
async searchDiv2() {
this.dataDiv2.data = []
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = true
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `exec 项目计划管理_项目详细计划_查询数据 @机床流水号=${this.machineValue},@计划类型 = 1`
}
}).then(res => {
this.tableDataDiv2 = res.data
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select count(*) from PDM_组件名称 where 机床流水号=${this.machineValue}`
}
}).then(res => {
this.dataDiv2.组件总数 = res.data[0].Column1
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select count(*) from PDM_组件名称 where 机床流水号=${this.machineValue} and 组号 like '9%'`
}
}).then(res => {
this.dataDiv2.整改组数 = res.data[0].Column1
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select count(*) from 项目计划管理_组件计划_视图 where 机床流水号 = ${this.machineValue} and 计划类型 = 1 and 实际完成时间 is not null`
}
}).then(res => {
if (parseInt(this.dataDiv2.整改组数) !== 0) {
this.dataDiv2.data.push({
value: this.dataDiv2.整改组数,
name: '整改组件'
})
}
if (parseInt(res.data[0].Column1) !== 0) {
this.dataDiv2.data.push({
value: res.data[0].Column1,
name: '已完成组件'
})
}
if (parseInt(this.dataDiv2.组件总数) - parseInt(this.dataDiv2.整改组数) - parseInt(res.data[0].Column1) !== 0) {
this.dataDiv2.data.push({
value: parseInt(this.dataDiv2.组件总数) - parseInt(this.dataDiv2.整改组数) - parseInt(res.data[0].Column1),
name: '未完成组件'
})
}
}).then(() => {
this.drawLineDiv2()
})
})
})
})
},
// 绘制品设计饼状图
drawLineDiv2() {
const bar = echarts.init(document.getElementById('barDiv1'))
// 指定图表的配置项和数据
bar.setOption({
// title : {
// text: '某站点用户访问来源',
// subtext: '纯属虚构',
// x:'center'
// },
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
// legend: {
// orient: 'vertical',
// left: 'left',
// data: ['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
// },
series: [
{
name: '组件类型比例',
type: 'pie',
radius: '55%',
center: ['50%', '40%'],
data: this.dataDiv2.data,
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
})
},
// 查询零件分配div数据
async searchDiv3() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = true
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.dataDiv3.yDataB = []
this.dataDiv3.yDataA = []
this.dataDiv3.xData = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 综合查询_零件分配模块信息视图.*
,isnull(基本件个数,0) as 基本件个数
,isnull(外购件个数,0) as 外购件个数
,(isnull(基本件个数,0) + isnull(外购件个数,0)) as 总个数
,isnull(基本件未分配个数,0) as 基本件未分配个数
,isnull(外购件未分配个数,0) as 外购件未分配个数
,(isnull(基本件未分配个数,0) + isnull(外购件未分配个数,0)) as 总未分配个数
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,count(*) as 基本件个数
from PDM_零件明细表_基本件 group by 组件流水号) as a on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号
left join (select 组件流水号,count(*) as 外购件个数
from PDM_零件明细表_标准件和外购件 group by 组件流水号) as b on 综合查询_零件分配模块信息视图.组件流水号 = b.组件流水号
left join (select 组件流水号,count(*) as 基本件未分配个数
from PDM_零件明细表_基本件 where 是否采购 = 0 and 是否传递 = 0 group by 组件流水号) as c on 综合查询_零件分配模块信息视图.组件流水号 = c.组件流水号
left join (select 组件流水号,count(*) as 外购件未分配个数
from PDM_零件明细表_标准件和外购件 where 是否车间采购 = 0 group by 组件流水号) as d on 综合查询_零件分配模块信息视图.组件流水号 = d.组件流水号
where 机床流水号 = ${this.machineValue} and 组号 <> '00组' order by 组号`
}
}).then(res => {
this.tableDataDiv3 = res.data
for (let i = 0; i < res.data.length; i++) {
this.dataDiv3.xData.push(res.data[i].组号)
this.dataDiv3.yDataA.push(res.data[i].总个数)
this.dataDiv3.yDataB.push(parseInt(res.data[i].总个数) - parseInt(res.data[i].总未分配个数))
}
this.drawLineDiv3()
})
},
// 绘制零件分配条形图
drawLineDiv3() {
const bar = echarts.init(document.getElementById('barDiv3'))
// 指定图表的配置项和数据
bar.setOption({
tooltip: {},
legend: {
data: ['零件总条数', '已分配条数']
},
xAxis: {
data: this.dataDiv3.xData,
show: true
},
yAxis: {},
series: [{
name: '零件总条数',
type: 'bar',
data: this.dataDiv3.yDataA
},
{
name: '已分配条数',
type: 'bar',
data: this.dataDiv3.yDataB
}]
})
},
// 查询自制件div数据
async searchDiv4() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = true
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.tableDataDiv4 = []
this.dataDiv4.xData = []
this.dataDiv4.yDataB = []
this.dataDiv4.yDataA = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 综合查询_零件分配模块信息视图.*,
isnull(自家加工件总条数,0) as 自家加工件总条数
,isnull(已传递条数,0) as 已传递条数
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,COUNT(*) as 自家加工件总条数
from 车间生产管理工艺_零件工序_投产信息_查询视图 group by 组件流水号) as a
on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号
left join (select 组件流水号,count(*) as 已传递条数
from 车间生产管理工艺_零件工序_投产信息_查询视图 where 是否传递 = 2 group by 组件流水号) as b
on 综合查询_零件分配模块信息视图.组件流水号 = b.组件流水号
where 机床流水号 = ${this.machineValue} order by 组号`
}
}).then(res => {
this.tableDataDiv4 = res.data
for (let i = 0; i < res.data.length; i++) {
this.dataDiv4.xData.push(res.data[i].组号)
this.dataDiv4.yDataA.push(res.data[i].自家加工件总条数)
this.dataDiv4.yDataB.push(res.data[i].已传递条数)
}
this.drawLineDiv4Bar()
})
},
// 绘制自制件div条形图
drawLineDiv4Bar() {
const bar = echarts.init(document.getElementById('barDiv4'))
this.tableData = [50, 15, 20, 30, 45, 46]
// 指定图表的配置项和数据
bar.setOption({
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: ['总条数', '已投产']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
yAxis: {
type: 'value',
boundaryGap: [0, 0.01]
},
xAxis: {
type: 'category',
data: this.dataDiv4.xData
},
series: [
{
name: '总条数',
type: 'bar',
data: this.dataDiv4.yDataA
},
{
name: '已投产',
type: 'bar',
data: this.dataDiv4.yDataB
}
]
})
},
// 查询自制件div数据
async searchDiv5() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = true
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.dataDiv5.data4 = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `
select 综合查询_零件分配模块信息视图.* ,计划工时,开始时间,结束时间,实际工时,修补工时
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时
from 车间管理_工作计划 where 计划类型 = 1 group by 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时) as a
on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号 where 机床流水号 = ${this.machineValue} and 组号 <> '00组'
order by 组号`
}
}).then(res => {
this.tableDataDiv5 = res.data
this.dataDiv5.length = res.data.length
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select COUNT(*) as 进行中 from 车间管理_工作计划 where 计划类型 = 1 and (开始时间 is not null and 开始时间 <> '') and (结束时间 is null or 结束时间 = '') and 机床流水号 = ${this.machineValue}`
}
}).then(res => {
this.dataDiv5.data1 = res.data[0].进行中
if (res.data[0].进行中 !== 0) {
this.dataDiv5.data4.push({
value: res.data[0].进行中,
name: '装配进行中'
})
}
}).then(() => {
request({
url: '',
method: 'post',
data: {
type: '3',
name: ` select COUNT(*) as 已完成 from 车间管理_工作计划 where 计划类型 = 1 and 开始时间 is not null and 开始时间 <> '' and 结束时间 is not null and 结束时间 <> '' and 机床流水号 = ${this.machineValue}`
}
}).then(res => {
this.dataDiv5.data2 = res.data[0].已完成
if (res.data[0].已完成 !== 0) {
this.dataDiv5.data4.push({
value: res.data[0].已完成,
name: '装配已完成'
})
}
}).then(() => {
this.dataDiv5.data3 = parseInt(this.dataDiv5.length - this.dataDiv5.data1 - this.dataDiv5.data2)
}).then(() => {
if (parseInt(this.dataDiv5.data3) !== 0) {
this.dataDiv5.data4.push({
value: this.dataDiv5.data3,
name: '无计划/未开始'
})
}
this.drawLineDiv5()
})
})
})
},
// 绘制机械装配div饼图
drawLineDiv5() {
const bar = echarts.init(document.getElementById('barDiv5'))
this.tableData = [50, 15, 20, 30, 45, 46]
// 指定图表的配置项和数据
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.dataDiv5.data4,
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
})
},
// 查询电气装配div数据
async searchDiv6() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = true
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.dataDiv6.data4 = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 综合查询_零件分配模块信息视图.* ,计划工时,开始时间,结束时间,实际工时,修补工时
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时
from 车间管理_工作计划 where 计划类型 = 2 group by 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时) as a
on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号 where 机床流水号 = ${this.machineValue} and 组号 <> '00组'
order by 组号`
}
}).then(res => {
this.tableDataDiv6 = res.data
this.dataDiv6.length = res.data.length
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select COUNT(*) as 进行中 from 车间管理_工作计划 where 计划类型 = 2 and (开始时间 is not null and 开始时间 <> '') and (结束时间 is null or 结束时间 = '') and 机床流水号 = ${this.machineValue}`
}
}).then(res => {
this.dataDiv6.data1 = res.data[0].进行中
if (res.data[0].进行中 !== 0) {
this.dataDiv6.data4.push({
value: res.data[0].进行中,
name: '装配进行中'
})
}
}).then(() => {
request({
url: '',
method: 'post',
data: {
type: '3',
name: ` select COUNT(*) as 已完成 from 车间管理_工作计划 where 计划类型 = 2 and 开始时间 is not null and 开始时间 <> '' and 结束时间 is not null and 结束时间 <> '' and 机床流水号 = ${this.machineValue}`
}
}).then(res => {
this.dataDiv6.data2 = res.data[0].已完成
if (res.data[0].已完成 !== 0) {
this.dataDiv6.data4.push({
value: res.data[0].已完成,
name: '装配已完成'
})
}
}).then(() => {
this.dataDiv6.data3 = parseInt(this.dataDiv6.length - this.dataDiv6.data1 - this.dataDiv6.data2)
}).then(() => {
if (parseInt(this.dataDiv6.data3) !== 0) {
this.dataDiv6.data4.push({
value: this.dataDiv6.data3,
name: '无计划/未开始'
})
}
this.drawLineDiv6()
})
})
})
},
// 绘制电气装配div饼图
drawLineDiv6() {
const bar = echarts.init(document.getElementById('barDiv6'))
// 指定图表的配置项和数据
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.dataDiv6.data4,
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
})
},
// 查询冷作计划div数据
async searchDiv7() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = true
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.dataDiv7.data4 = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 综合查询_零件分配模块信息视图.* ,计划工时,开始时间,结束时间,实际工时,修补工时
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时
from 车间管理_工作计划 where 计划类型 = 3 group by 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时) as a
on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号 where 机床流水号 = ${this.machineValue} and 组号 <> '00组'
order by 组号`
}
}).then(res => {
console.log(res, 8766)
this.tableDataDiv7 = res.data
this.dataDiv7.length = res.data.length
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select COUNT(*) as 进行中 from 车间管理_工作计划 where 计划类型 = 3 and (开始时间 is not null and 开始时间 <> '') and (结束时间 is null or 结束时间 = '') and 机床流水号 = ${this.machineValue}`
}
}).then(res => {
this.dataDiv7.data1 = res.data[0].进行中
if (res.data[0].进行中 !== 0) {
this.dataDiv7.data4.push({
value: res.data[0].进行中,
name: '冷作进行中'
})
}
}).then(() => {
request({
url: '',
method: 'post',
data: {
type: '3',
name: ` select COUNT(*) as 已完成 from 车间管理_工作计划 where 计划类型 = 3 and 开始时间 is not null and 开始时间 <> '' and 结束时间 is not null and 结束时间 <> '' and 机床流水号 = ${this.machineValue}`
}
}).then(res => {
this.dataDiv7.data2 = res.data[0].已完成
if (res.data[0].已完成 !== 0) {
this.dataDiv7.data4.push({
value: res.data[0].已完成,
name: '冷作已完成'
})
}
}).then(() => {
this.dataDiv7.data3 = parseInt(this.dataDiv7.length - this.dataDiv7.data1 - this.dataDiv7.data2)
}).then(() => {
if (parseInt(this.dataDiv7.data3) !== 0) {
this.dataDiv7.data4.push({
value: this.dataDiv7.data3,
name: '无计划/未开始'
})
}
this.drawLineDiv7()
})
})
})
},
// 绘制冷作div饼图
drawLineDiv7() {
const bar = echarts.init(document.getElementById('barDiv7'))
// 指定图表的配置项和数据
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.dataDiv7.data4,
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
})
},
// 查询油漆div数据
async searchDiv8() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = true
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.dataDiv8.data4 = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 综合查询_零件分配模块信息视图.* ,计划工时,开始时间,结束时间,实际工时,修补工时
from 综合查询_零件分配模块信息视图
left join (select 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时
from 车间管理_工作计划 where 计划类型 = 4 group by 组件流水号,计划工时,开始时间,结束时间,实际工时,修补工时) as a
on 综合查询_零件分配模块信息视图.组件流水号 = a.组件流水号 where 机床流水号 = ${this.machineValue} and 组号 <> '00组'
order by 组号`
}
}).then(res => {
this.tableDataDiv8 = res.data
this.dataDiv8.length = res.data.length
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select COUNT(*) as 进行中 from 车间管理_工作计划 where 计划类型 = 4 and (开始时间 is not null and 开始时间 <> '') and (结束时间 is null or 结束时间 = '') and 机床流水号 = ${this.machineValue}`
}
}).then(res => {
this.dataDiv8.data1 = res.data[0].进行中
if (res.data[0].进行中 !== 0) {
this.dataDiv8.data4.push({
value: res.data[0].进行中,
name: '油漆进行中'
})
}
}).then(() => {
request({
url: '',
method: 'post',
data: {
type: '3',
name: ` select COUNT(*) as 已完成 from 车间管理_工作计划 where 计划类型 = 4 and 开始时间 is not null and 开始时间 <> '' and 结束时间 is not null and 结束时间 <> '' and 机床流水号 = ${this.machineValue}`
}
}).then(res => {
this.dataDiv8.data2 = res.data[0].已完成
if (res.data[0].已完成 !== 0) {
this.dataDiv8.data4.push({
value: res.data[0].已完成,
name: '油漆已完成'
})
}
}).then(() => {
this.dataDiv8.data3 = parseInt(this.dataDiv8.length - this.dataDiv8.data1 - this.dataDiv8.data2)
}).then(() => {
if (parseInt(this.dataDiv8.data3) !== 0) {
this.dataDiv8.data4.push({
value: this.dataDiv8.data3,
name: '无计划/未开始'
})
}
this.drawLineDiv8()
})
})
})
},
// 绘制油漆div饼图
drawLineDiv8() {
const bar = echarts.init(document.getElementById('barDiv8'))
// 指定图表的配置项和数据
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.dataDiv8.data4,
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
})
},
// 查询成组配套div数据
async searchDiv9() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = true
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 前几列.*,case when 完成时间 = '未完成' then '未完成' else convert(nvarchar(50),入库时间,21) end as 完成时间
from (SELECT 组号 ,组件名称,SUM(isnull(批次数量,0))as 投产数量,SUM(isnull(入库数量,0))as 入库数量,MAX(入库时间) as 入库时间
from 车间生产管理工艺_零件工艺计划_传递后_视图
where 机床流水号 = 89
group by 组号,组件名称) as 前几列
left join (SELECT 组号,'未完成' as 完成时间
from 车间生产管理工艺_零件工艺计划_传递后_视图
where 机床流水号 = ${this.machineValue} and isnull(入库数量,0) <> isnull(批次数量,0)
group by 组号) as 未完成组
on 前几列.组号 = 未完成组.组号`
}
}).then(res => {
this.tableDataDiv9A = res.data
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 组号,组件名称,sum(零件数量) as 总零件数量,SUM(已到货数量) as 总到货数量, (case when sum(零件数量) = SUM(已到货数量) then GETDATE() ELSE '' END)完成时间 from (
SELECT [机床图号],[机床流水号],[组号] ,[组件名称] ,[组件流水号] ,[物料名称] as 零件名称 ,[物料型号] as 零件图号 ,[物料规格] ,[零件数量] ,通过的合同.已到货数量
FROM MRP_计划订单_组件零件清单_标准件和外购件_视图
left join (
select 采购管理_采购合同_采购部.*,组件零件流水号,数量,已到货数量 from 采购管理_采购合同明细_采购部
inner join 采购管理_采购合同_采购部 on 采购管理_采购合同明细_采购部.采购合同流水号 = 采购管理_采购合同_采购部.采购合同流水号
where 采购管理_采购合同_采购部.是否未通过 = 0
) as 通过的合同 on 通过的合同.组件零件流水号 = MRP_计划订单_组件零件清单_标准件和外购件_视图.组件零件流水号
left join 采购管理_供应商 on 通过的合同.供应商流水号 = 采购管理_供应商.供应商流水号
WHERE 机床流水号 = N'${this.machineValue}'
union
SELECT [机床图号] ,[机床流水号] ,[组号] ,[组件名称] ,[组件流水号] ,[零件名称] ,[零件图号] ,规格 ,[零件数量] ,通过的合同.已到货数量
FROM MRP_计划订单_组件零件清单_基本件_视图
left join (
select 采购管理_采购合同_采购部.*,组件零件基本件流水号,数量,已到货数量 from 采购管理_采购合同明细_采购部
inner join 采购管理_采购合同_采购部 on 采购管理_采购合同明细_采购部.采购合同流水号 = 采购管理_采购合同_采购部.采购合同流水号
where 采购管理_采购合同_采购部.是否未通过 = 0
) as 通过的合同 on 通过的合同.组件零件基本件流水号 = MRP_计划订单_组件零件清单_基本件_视图.组件零件基本件流水号
left join 采购管理_供应商 on 通过的合同.供应商流水号 = 采购管理_供应商.供应商流水号
where 机床流水号 = '${this.machineValue}'
) as a
where a.机床流水号 = '${this.machineValue}'
group by a.组号,a.组件名称
order by a.组号`
}
}).then(res => {
this.tableDataDiv9B = res.data
request({
url: '',
method: 'post',
data: {
type: '3',
name: `SELECT [组号] ,组件名称 ,sum(convert(int,零件数量)) as 总零件数量
,sum(已到货数量) as 总到货数量
, (case when sum(convert(int,零件数量)) = SUM(已到货数量) then GETDATE() ELSE '' END)完成时间
FROM (
SELECT dbo.车间管理_车间采购_请购单明细.机床流水号, dbo.车间管理_车间采购_请购单明细.组号, dbo.PDM_组件名称.组件名称, dbo.车间管理_车间采购_请购单明细.零件数量,
dbo.车间管理_车间采购_请购单明细.已到货数量
FROM dbo.PDM_组件名称 RIGHT OUTER JOIN
dbo.车间管理_车间采购_请购单明细 ON dbo.PDM_组件名称.组件流水号 = dbo.车间管理_车间采购_请购单明细.组件流水号
) as a where a.机床流水号 = ${this.machineValue}
group by a.[组号],a.组件名称`
}
}).then(res => {
console.log(res, 98765)
this.tableDataDiv9C = res.data
})
})
})
},
// 查询车间加工div数据
async searchDiv10() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = true
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.dataDiv10.data = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `exec 项目计划管理_项目详细计划_查询数据 @机床流水号=${this.machineValue}, @计划类型=4`
}
}).then(res => {
this.tableDataDiv10 = res.data
request({
url: '',
method: 'post',
data: {
type: '3',
name: `select COUNT(*) as 未完成
from 项目计划管理_组件计划_视图
where 机床流水号 = ${this.machineValue} and 计划类型 = 4 and 实际完成时间 is null`
}
}).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.machineValue} 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
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = true
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.dataDiv11.yDataB = []
this.dataDiv11.yDataA = []
this.dataDiv11.xData = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `declare @机床流水号 int = ${this.machineValue}
select *,(case when 100 * 已备料条数/零件条数 = 100 then '' else '——' end) as 完成时间 from (
select case when 已备料条数 = 零件条数 then '完成' else '未完成' end as 状态
,所有.*,已备料条数
,100*已备料条数/零件条数 as 备料进度
from (
select PDM_组件名称.组号,PDM_组件名称.组件名称,PDM_机床名称.机床流水号
,COUNT(*) as 零件条数
from (SELECT [工艺计划流水号],[零件图号], [零件名称], [备料打印] , [备料到货]
from [车间生产管理工艺_零件工艺计划_传递后_视图]
WHERE 考核状态 >= 3 and 考核状态 <8 and 工艺任务分配状态 =2 and 批次零件状态=1 and 备料打印 = 1 and 机床流水号 = @机床流水号
and 工艺计划流水号 in ( select 工艺计划流水号 from 车间生产管理工艺_零件工序 where 工艺编号 = 29 )) as 自制备料
inner join 车间生产管理工艺_零件工艺计划 on 自制备料.工艺计划流水号 = 车间生产管理工艺_零件工艺计划.工艺计划流水号
inner join MRP_计划订单_组件零件清单_基本件 on 车间生产管理工艺_零件工艺计划.组件零件基本件流水号 = MRP_计划订单_组件零件清单_基本件.组件零件基本件流水号
inner join MRP_计划订单_机床组件清单 on MRP_计划订单_机床组件清单.机床组件流水号 = MRP_计划订单_组件零件清单_基本件.机床组件流水号
inner join PDM_组件名称 on PDM_组件名称.组件流水号 = MRP_计划订单_机床组件清单.组件流水号
inner join PDM_机床名称 on PDM_组件名称.机床流水号 = PDM_机床名称.机床流水号
group by PDM_组件名称.组号,PDM_组件名称.组件名称,PDM_机床名称.机床流水号,PDM_机床名称.机床图号
) as 所有
left join
(select 自制备料.备料到货
,PDM_组件名称.组号,PDM_组件名称.组件名称,PDM_机床名称.机床流水号
,COUNT(*) as 已备料条数
from (SELECT [工艺计划流水号],[零件图号], [零件名称], [备料打印] , [备料到货]
from [车间生产管理工艺_零件工艺计划_传递后_视图]
WHERE 考核状态 >= 3 and 考核状态 <8 and 工艺任务分配状态 =2 and 批次零件状态=1 and 备料打印 = 1 and 备料到货 = 1 and 机床流水号 = @机床流水号
and 工艺计划流水号 in ( select 工艺计划流水号 from 车间生产管理工艺_零件工序 where 工艺编号 = 29 )) as 自制备料
inner join 车间生产管理工艺_零件工艺计划 on 自制备料.工艺计划流水号 = 车间生产管理工艺_零件工艺计划.工艺计划流水号
inner join MRP_计划订单_组件零件清单_基本件 on 车间生产管理工艺_零件工艺计划.组件零件基本件流水号 = MRP_计划订单_组件零件清单_基本件.组件零件基本件流水号
inner join MRP_计划订单_机床组件清单 on MRP_计划订单_机床组件清单.机床组件流水号 = MRP_计划订单_组件零件清单_基本件.机床组件流水号
inner join PDM_组件名称 on PDM_组件名称.组件流水号 = MRP_计划订单_机床组件清单.组件流水号
inner join PDM_机床名称 on PDM_组件名称.机床流水号 = PDM_机床名称.机床流水号
inner join 车间生产管理工艺_备料出库记录 on 车间生产管理工艺_零件工艺计划.工艺计划流水号 = 车间生产管理工艺_备料出库记录.工艺计划流水号
group by PDM_组件名称.组号,PDM_组件名称.组件名称,PDM_机床名称.机床流水号,PDM_机床名称.机床图号,自制备料.备料到货) as 完成
on 所有.组号 = 完成.组号 and 所有.机床流水号 = 完成.机床流水号
) as 头`
}
}).then(res => {
this.tableDataDiv11 = res.data
for (let i = 0; i < res.data.length; i++) {
this.dataDiv11.xData.push(res.data[i].组号)
this.dataDiv11.yDataA.push(res.data[i].零件条数)
this.dataDiv11.yDataB.push(res.data[i].已备料条数)
}
this.drawLineDiv11()
})
},
// 绘制自家备料条形图
drawLineDiv11() {
const bar = echarts.init(document.getElementById('barDiv11'))
// 指定图表的配置项和数据
bar.setOption({
tooltip: {},
legend: {
data: ['零件条数', '已备料条数']
},
xAxis: {
data: this.dataDiv11.xData,
show: true
},
yAxis: {},
series: [{
name: '零件条数',
type: 'bar',
data: this.dataDiv11.yDataA
},
{
name: '已备料条数',
type: 'bar',
data: this.dataDiv11.yDataB
}]
})
},
// 查询自制件质检数据
async searchDiv12() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = true
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `SELECT
[组号]
,[组件名称]
,sum([数量]) as 检测总数量
,sum([不合格数量]) as 不合格总数量
,sum([批次数量]) as 零件总数量
,isnull(sum([不合格数量])/sum([数量]), 0) as 不合格率
,1 - isNull(sum([不合格数量])/sum([数量]), 0) as 合格率
FROM [质检管理_基本件数据_查询视图] where 机床流水号 = ${this.machineValue}
group by 组号, 组件名称 order by 组号`
}
}).then(res => {
console.log(res)
this.tableDataDiv12 = res.data
})
},
// 查询采购部采购div数据
async searchDiv16() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = true
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `
--外购件
select 机床流水号,组号,组件名称
,SUM(外购件数) as 总外购件数
,SUM(已采购外购件数) as 已采购外购件数
,SUM(部分采购外购件数) as 部分采购外购件数
,SUM(总到货数外购件数 ) as 总到货数外购件数
from (
SELECT 机床流水号,组号,组件名称
,(select COUNT(*) where 机床流水号 = ${this.machineValue}) as 外购件数
,(select COUNT(*) where 机床流水号 = ${this.machineValue} and isnull(数量,0) = isnull(零件数量,0)) as 已采购外购件数
,(select COUNT(*) where 机床流水号 = ${this.machineValue} and isnull(数量,0) <> 0 and isnull(数量,0) <> isnull(零件数量,0)) as 部分采购外购件数
,(select COUNT(*) where 机床流水号 = ${this.machineValue} and isnull(数量,0) <> 0 and isnull(数量,0) = isnull(已到货数量,0)) as 总到货数外购件数
FROM MRP_计划订单_组件零件清单_标准件和外购件_视图
left join (
select 采购管理_采购合同_采购部.*,组件零件流水号,数量,已到货数量 from 采购管理_采购合同明细_采购部
inner join 采购管理_采购合同_采购部 on 采购管理_采购合同明细_采购部.采购合同流水号 = 采购管理_采购合同_采购部.采购合同流水号
where 采购管理_采购合同_采购部.是否未通过 = 0
) as 通过的合同 on 通过的合同.组件零件流水号 = MRP_计划订单_组件零件清单_标准件和外购件_视图.组件零件流水号
left join 采购管理_供应商 on 通过的合同.供应商流水号 = 采购管理_供应商.供应商流水号
where 机床流水号 is not null and 零件类型 = 2 and 机床流水号 = ${this.machineValue}
) as a
group by 机床流水号,组号,组件名称 order by 组号
`
}
}).then(res => {
this.tableDataDiv16A = res.data
request({
url: '',
method: 'post',
data: {
type: '3',
name: `
select 机床流水号,组号
,组件名称
,SUM(标准件数) as 总标准件数
,SUM(已采购标准件数) as 已采购标准件数
,SUM(部分采购标准件数) as 部分采购标准件数
,SUM(总到货数标准件数 ) as 总到货数标准件数
from (
SELECT 机床流水号,组号
,组件名称
,(select COUNT(*) where 机床流水号 = ${this.machineValue}) as 标准件数
,(select COUNT(*) where 机床流水号 = ${this.machineValue} and isnull(数量,0) = isnull(零件数量,0)) as 已采购标准件数
,(select COUNT(*) where 机床流水号 = ${this.machineValue} and isnull(数量,0) <> 0 and isnull(数量,0) <> isnull(零件数量,0)) as 部分采购标准件数
,(select COUNT(*) where 机床流水号 = ${this.machineValue} and isnull(数量,0) <> 0 and isnull(数量,0) = isnull(已到货数量,0)) as 总到货数标准件数
FROM MRP_计划订单_组件零件清单_标准件和外购件_视图
left join (
select 采购管理_采购合同_采购部.*,组件零件流水号,数量,已到货数量 from 采购管理_采购合同明细_采购部
inner join 采购管理_采购合同_采购部 on 采购管理_采购合同明细_采购部.采购合同流水号 = 采购管理_采购合同_采购部.采购合同流水号
where 采购管理_采购合同_采购部.是否未通过 = 0
) as 通过的合同 on 通过的合同.组件零件流水号 = MRP_计划订单_组件零件清单_标准件和外购件_视图.组件零件流水号
left join 采购管理_供应商 on 通过的合同.供应商流水号 = 采购管理_供应商.供应商流水号
where 机床流水号 is not null and 零件类型 = 1 and 机床流水号 = ${this.machineValue}
) as a
group by 机床流水号,组号
,组件名称 order by 组号`
}
}).then(res => {
this.tableDataDiv16B = res.data
request({
url: '',
method: 'post',
data: {
type: '3',
name: `
select 机床流水号,组号,组件名称
,SUM(基本件数) as 总基本件数
,SUM(已采购基本件数) as 已采购基本件数
,SUM(部分采购基本件数) as 部分采购基本件数
,SUM(总到货数基本件数 ) as 总到货数基本件数
from (
SELECT 机床流水号,组号,组件名称
,(select COUNT(*) where 机床流水号 = ${this.machineValue}) as 基本件数
,(select COUNT(*) where 机床流水号 = ${this.machineValue} and isnull(数量,0) = isnull(零件数量,0)) as 已采购基本件数
,(select COUNT(*) where 机床流水号 = ${this.machineValue} and isnull(数量,0) <> 0 and isnull(数量,0) <> isnull(零件数量,0)) as 部分采购基本件数
,(select COUNT(*) where 机床流水号 = ${this.machineValue} and isnull(数量,0) <> 0 and isnull(数量,0) = isnull(已到货数量,0)) as 总到货数基本件数
FROM MRP_计划订单_组件零件清单_基本件_视图
left join (
select 采购管理_采购合同_采购部.*,组件零件基本件流水号,数量,已到货数量 from 采购管理_采购合同明细_采购部
inner join 采购管理_采购合同_采购部 on 采购管理_采购合同明细_采购部.采购合同流水号 = 采购管理_采购合同_采购部.采购合同流水号
where 采购管理_采购合同_采购部.是否未通过 = 0
) as 通过的合同 on 通过的合同.组件零件基本件流水号 = MRP_计划订单_组件零件清单_基本件_视图.组件零件基本件流水号
left join 采购管理_供应商 on 通过的合同.供应商流水号 = 采购管理_供应商.供应商流水号
where 机床流水号 is not null and 机床流水号 = ${this.machineValue}
) as a
group by 机床流水号,组号,组件名称 order by 组号`
}
}).then(res => {
console.log(res, 98765)
this.tableDataDiv16C = res.data
})
})
})
},
// 查询车间采购div数据
async searchDiv17() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = true
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `
select 组号,组件名称
,SUM(基本件数) as 总基本件数
,SUM(已采购基本件数) as 已采购基本件数
,SUM(已到货基本件数 ) as 总到货数基本件数
from (
select 组号,组件名称,
(select COUNT(*) where 机床流水号 =${this.machineValue} and 基本件流水号 is not null) as 基本件数,
(select COUNT(*) where 机床流水号 =${this.machineValue} and 基本件流水号 is not null and 采购合同明细流水号 is not null) as 已采购基本件数,
(select COUNT(*) where 机床流水号 =${this.machineValue} and 基本件流水号 is not null and isnull(零件数量,0) = isnull(已到货数量,0)) as 已到货基本件数
from 车间采购_综合查询视图 where 机床流水号 = ${this.machineValue}
) as a
group by a.组号,a.组件名称 order by 组号`
}
}).then(res => {
this.tableDataDiv17A = res.data
request({
url: '',
method: 'post',
data: {
type: '3',
name: `
select 组号,组件名称
,SUM(基本件数) as 总基本件数
,SUM(已采购基本件数) as 已采购基本件数
,SUM(已到货基本件数 ) as 总到货数基本件数
from (
select 组号,组件名称,
(select COUNT(*) where 机床流水号 =${this.machineValue} and 标准件和外购件流水号 is not null) as 基本件数,
(select COUNT(*) where 机床流水号 =${this.machineValue} and 标准件和外购件流水号 is not null and 采购合同明细流水号 is not null) as 已采购基本件数,
(select COUNT(*) where 机床流水号 =${this.machineValue} and 标准件和外购件流水号 is not null and isnull(零件数量,0) = isnull(已到货数量,0)) as 已到货基本件数
from 车间采购_综合查询视图 where 机床流水号 =${this.machineValue}
) as a
group by a.组号,a.组件名称 order by 组号`
}
}).then(res => {
this.tableDataDiv17B = res.data
})
})
},
// 查询工序外协div数据
searchDiv18() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = true
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.dataDiv18.yDataA = []
this.dataDiv18.xData = []
ProcessOutsourcing(this.machineValue).then(response => {
this.tableDataDiv18 = response.data
})
ProcessProportion(this.machineValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.dataDiv18.xData.push(response.data[i].工艺名称)
this.dataDiv18.yDataA.push(response.data[i].零件数量)
}
}).then(() => {
this.drawLineDiv18()
})
},
// 绘制工序外协条形图
drawLineDiv18() {
const bar = echarts.init(document.getElementById('barDiv18'))
// 指定图表的配置项和数据
bar.setOption({
tooltip: {},
legend: {
data: this.dataDiv18.xData
},
xAxis: {
data: this.dataDiv18.xData,
show: true
},
yAxis: {},
series: [{
name: '外协数量',
type: 'bar',
data: this.dataDiv18.yDataA
}]
})
},
// 查询自制件质检数据
async searchDiv19() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = true
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `SELECT
[组号]
,[组件名称]
,sum([数量]) as 检测总数量
,sum([不合格数量]) as 不合格总数量
,sum([零件数量]) as 零件总数量
,isnull(sum([不合格数量])/sum([数量]), 0) as 不合格率
,1 - isNull(sum([不合格数量])/sum([数量]), 0) as 合格率
FROM (
select 组号,组件名称,数量,不合格数量,零件数量 from 质检管理_外购件制造部数据_查询视图 where 机床流水号 = ${this.machineValue}
union
select 组号,组件名称,数量,不合格数量,零件数量 from 质检管理_外购件采购部基本件数据_查询视图 where 机床流水号 = ${this.machineValue}
union
select 组号,组件名称,数量,不合格数量,零件数量 from 质检管理_外购件采购部外购件数据_查询视图 where 机床流水号 = ${this.machineValue}) as a
group by a.组号, a.组件名称 order by 组号`
}
}).then(res => {
this.tableDataDiv19 = res.data
})
},
// 查询外购备料div数据
async searchDiv20() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = true
this.showDiv21 = false
this.showDiv22 = false
// this.dataDiv11.yDataB = []
// this.dataDiv11.yDataA = []
// this.dataDiv11.xData = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select 组号,组件名称,
SUM(外购备料总数) as 外购备料总数,
SUM(外购备料到货总数) as 外购备料到货总数,
SUM(外购备料出库总数) as 外购备料出库总数 from
(select 组号,组件名称,
(select COUNT(*) where 机床流水号 = ${this.machineValue}) as 外购备料总数,
(select COUNT(*) where 机床流水号 = ${this.machineValue} and 是否到货 = 1) as 外购备料到货总数,
(select COUNT(*) where 机床流水号 = ${this.machineValue} and 是否出库 = 1) as 外购备料出库总数
from [dbo].[备料管理_采购计划明细_查询数据_视图] where 机床流水号 = ${this.machineValue}) as a
group by 组号,组件名称`
}
}).then(res => {
this.tableDataDiv20 = res.data
// for (let i = 0; i < res.data.length; i++) {
// this.dataDiv11.xData.push(res.data[i].组号)
// this.dataDiv11.yDataA.push(res.data[i].零件条数)
// this.dataDiv11.yDataB.push(res.data[i].已备料条数)
// }
// this.drawLineDiv11()
})
},
// 装配质检
async searchDiv21() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = true
this.showDiv22 = false
// this.dataDiv11.yDataB = []
// this.dataDiv11.yDataA = []
// this.dataDiv11.xData = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `SELECT *
FROM [质检管理_装配质检_查询视图] where 机床流水号 = ${this.machineValue} and 组件流水号 is not null`
}
}).then(res => {
this.tableDataDiv21 = res.data
// for (let i = 0; i < res.data.length; i++) {
// this.dataDiv11.xData.push(res.data[i].组号)
// this.dataDiv11.yDataA.push(res.data[i].零件条数)
// this.dataDiv11.yDataB.push(res.data[i].已备料条数)
// }
// this.drawLineDiv11()
})
},
// 总装调试
async searchDiv22() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv23 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = true
// this.dataDiv11.yDataB = []
// this.dataDiv11.yDataA = []
// this.dataDiv11.xData = []
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `SELECT *
FROM [质检管理_装配质检_查询视图] where 机床流水号 = ${this.machineValue} and 组件流水号 is null`
}
}).then(res => {
this.tableDataDiv22 = res.data
// for (let i = 0; i < res.data.length; i++) {
// this.dataDiv11.xData.push(res.data[i].组号)
// this.dataDiv11.yDataA.push(res.data[i].零件条数)
// this.dataDiv11.yDataB.push(res.data[i].已备料条数)
// }
// this.drawLineDiv11()
})
},
// 查询工艺数据
async searchDiv13() {
this.dataDiv13.xData = []
this.dataDiv13.yDataA = []
this.dataDiv13.yDataB = []
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = true
this.showDiv14 = false
this.showDiv15 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.showDiv23 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `declare @机床流水号 int = ${this.machineValue}
select 机床流水号,组号,组件名称,SUM(零件总数) as 零件总数,SUM(未制定零件数) as 未制定零件数,SUM(已制定零件数) as 已制定零件数 from (
--总
select 机床流水号,组号,组件名称
,COUNT(*) as 零件总数
,0 as 未制定零件数
,0 as 已制定零件数
from 车间生产管理工艺_零件工艺计划_传递后_视图
where 机床流水号 = @机床流水号
group by 机床流水号,组号,组件名称
union all
--未
select 机床流水号,组号,组件名称
,0 as 零件总数
,COUNT(*) as 未制定零件数
,0 as 已制定零件数
from 车间生产管理工艺_零件工艺计划_传递后_视图
where 机床流水号 = @机床流水号 and 考核状态 = 3 and 工艺任务分配状态 =2 and 批次零件状态=1
group by 机床流水号,组号,组件名称
union all
--已
select 机床流水号,组号,组件名称
,0 as 零件总数
,0 as 未制定零件数
,COUNT(*) as 已制定零件数
from 车间生产管理工艺_零件工艺计划_传递后_视图
where 机床流水号 = @机床流水号 and 考核状态 >= 4 and 工艺任务分配状态 =2 and 批次零件状态=1
group by 机床流水号,组号,组件名称
) as a
group by 机床流水号,组号,组件名称`
}
}).then(res => {
this.tableDataDiv13 = res.data
for (let i = 0; i < res.data.length; i++) {
this.dataDiv13.xData.push(res.data[i].组号)
this.dataDiv13.yDataA.push(res.data[i].零件总数)
this.dataDiv13.yDataB.push(res.data[i].已制定零件数)
}
this.drawLineDiv13()
})
},
// 绘制工艺条形图
drawLineDiv13() {
const bar = echarts.init(document.getElementById('barDiv13'))
// 指定图表的配置项和数据
bar.setOption({
tooltip: {},
legend: {
data: ['零件总数', '已编制条数']
},
xAxis: {
data: this.dataDiv13.xData,
show: true
},
yAxis: {},
series: [{
name: '零件总数',
type: 'bar',
data: this.dataDiv13.yDataA
}, {
name: '已编制条数',
type: 'bar',
data: this.dataDiv13.yDataB
}]
})
},
// 查询定额数据
async searchDiv14() {
this.dataDiv14.xData = []
this.dataDiv14.yDataA = []
this.dataDiv14.yDataB = []
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = true
this.showDiv15 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.showDiv23 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `declare @机床流水号 int = ${this.machineValue}
select 机床流水号
,a.组件流水号
,组号
,组件名称
,SUM(零件总数) as 零件总数
,SUM(未制定零件数) as 未制定零件数
,SUM(已制定零件数) as 已制定零件数
,理论总工时
from (
--总
select 机床流水号,组件流水号,组号,组件名称
,COUNT(*) as 零件总数
,0 as 未制定零件数
,0 as 已制定零件数
from 车间生产管理工艺_零件工艺计划_传递后_视图
where 机床流水号 = @机床流水号
group by 机床流水号,组件流水号,组号,组件名称
union all
--未
select 机床流水号,组件流水号,组号,组件名称
,0 as 零件总数
,COUNT(*) as 未制定零件数
,0 as 已制定零件数
from 车间生产管理工艺_零件工艺计划_传递后_视图
where 机床流水号 = @机床流水号 and 考核状态 = 3 and 工艺任务分配状态 =2 and 批次零件状态=1
group by 机床流水号,组件流水号,组号,组件名称
union all
--已
select 机床流水号,组件流水号,组号,组件名称
,0 as 零件总数
,0 as 未制定零件数
,COUNT(*) as 已制定零件数
from 车间生产管理工艺_零件工艺计划_传递后_视图
where 机床流水号 = @机床流水号 and 考核状态 >= 4 and 工艺任务分配状态 =2 and 批次零件状态=1
group by 机床流水号,组件流水号,组号,组件名称
) as a
inner join (
select 组件流水号
,sum(isnull(单件定额工时,0)*isnull(批次数量,0) + isnull(准结定额工时,0)) as 理论总工时
from 车间生产管理工艺_零件工艺计划_传递后_视图
inner join 车间生产管理工艺_零件工序 on 车间生产管理工艺_零件工艺计划_传递后_视图.工艺计划流水号 = 车间生产管理工艺_零件工序.工艺计划流水号
left JOIN 车间生产管理工艺_基础表_工艺名称 on 车间生产管理工艺_零件工序.工艺编号 = dbo.车间生产管理工艺_基础表_工艺名称.工艺编号
where 机床流水号 = @机床流水号 and (isnull(单件定额工时,0) <> 0 or isnull(准结定额工时,0) <> 0)
group by 组件流水号
) as b
on a.组件流水号 = b.组件流水号
group by 机床流水号,a.组件流水号,组号,组件名称,理论总工时
order by 组号`
}
}).then(res => {
console.log(res)
this.tableDataDiv14 = res.data
for (let i = 0; i < res.data.length; i++) {
this.dataDiv14.xData.push(res.data[i].组号)
this.dataDiv14.yDataA.push(res.data[i].零件总数)
this.dataDiv14.yDataB.push(res.data[i].已制定零件数)
}
this.drawLineDiv14()
})
},
// 绘制定额条形图
drawLineDiv14() {
const bar = echarts.init(document.getElementById('barDiv14'))
// 指定图表的配置项和数据
bar.setOption({
tooltip: {},
legend: {
data: ['零件总数', '已编制条数']
},
xAxis: {
data: this.dataDiv14.xData,
show: true
},
yAxis: {},
series: [{
name: '零件总数',
type: 'bar',
data: this.dataDiv14.yDataA
}, {
name: '已编制条数',
type: 'bar',
data: this.dataDiv14.yDataB
}]
})
},
// 查询能力平衡数据
async searchDiv15() {
this.dataDiv15.xData = []
this.dataDiv15.yDataA = []
this.dataDiv15.yDataB = []
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = true
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.showDiv23 = false
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `declare @机床流水号 int = ${this.machineValue}
create table #临时表1
(
id int IDENTITY (1,1) not null,
组件流水号 nvarchar(50),
primary key (id)
);
create table #临时表2
(
id int IDENTITY (1,1) not null,
组号 nvarchar(50),
组件名称 nvarchar(50),
完成状态 nvarchar(50),
已完成数量 nvarchar(50),
零件总条数 nvarchar(50),
primary key (id)
);
insert into #临时表1 select distinct 组件流水号 from dbo.车间生产管理工艺_零件工序_工艺卡报表_视图
where 机床流水号=@机床流水号 and 考核状态 > 3
declare @id int =1
declare @id2 int
declare @组号 nvarchar(50)
declare @组件名称 nvarchar(50)
declare @完成状态 nvarchar(50)
declare @已完成数量 int
declare @零件总条数 int
while (@id<=(select COUNT (id) from #临时表1 ))
begin
select @已完成数量 = COUNT(工艺计划流水号) from 车间生产管理工艺_零件工序_工艺卡报表_视图
where 机床流水号=@机床流水号 and 考核状态 >= 6
and 组件流水号=(select 组件流水号 from #临时表1 where id=@id)
insert into #临时表2 (已完成数量) values (@已完成数量)
set @id2 = @@IDENTITY
select @零件总条数 = COUNT(工艺计划流水号) from 车间生产管理工艺_零件工序_工艺卡报表_视图
where 机床流水号=@机床流水号 and 考核状态 > 3
and 组件流水号=(select 组件流水号 from #临时表1 where id=@id)
update #临时表2 set 零件总条数 = @零件总条数
where id=@id2
select @组件名称 = 组件名称,@组号 = 组号 from 车间生产管理工艺_零件工序_工艺卡报表_视图
where 机床流水号=@机床流水号 and 考核状态 > 3
and 组件流水号=(select 组件流水号 from #临时表1 where id=@id)
update #临时表2 set 组件名称 = @组件名称,组号 = @组号
where id=@id2
if @已完成数量 <> @零件总条数
begin
set @完成状态 = '未完成'
update #临时表2 set 完成状态 = @完成状态
where id=@id2
end
else
begin
set @完成状态 = '已完成'
update #临时表2 set 完成状态 = @完成状态
where id=@id2
end
set @id = @id + 1
end
select * from #临时表2 order by 组号
drop table #临时表1
drop table #临时表2`
}
}).then(res => {
console.log(res)
this.tableDataDiv15 = res.data
for (let i = 0; i < res.data.length; i++) {
this.dataDiv15.xData.push(res.data[i].组号)
this.dataDiv15.yDataA.push(res.data[i].零件总条数)
this.dataDiv15.yDataB.push(res.data[i].已完成数量)
}
this.drawLineDiv15()
})
},
// 绘制能力平衡条形图
drawLineDiv15() {
const bar = echarts.init(document.getElementById('barDiv15'))
// 指定图表的配置项和数据
bar.setOption({
tooltip: {},
legend: {
data: ['零件总数', '已编制条数']
},
xAxis: {
data: this.dataDiv15.xData,
show: true
},
yAxis: {},
series: [{
name: '零件总数',
type: 'bar',
data: this.dataDiv15.yDataA
}, {
name: '已编制条数',
type: 'bar',
data: this.dataDiv15.yDataB
}]
})
},
// 查询发货数据
async searchDiv23() {
this.showDiv0 = false
this.showDiv1 = false
this.showDiv2 = false
this.showDiv3 = false
this.showDiv4 = false
this.showDiv5 = false
this.showDiv6 = false
this.showDiv7 = false
this.showDiv8 = false
this.showDiv9 = false
this.showDiv10 = false
this.showDiv11 = false
this.showDiv12 = false
this.showDiv13 = false
this.showDiv14 = false
this.showDiv15 = false
this.showDiv16 = false
this.showDiv17 = false
this.showDiv18 = false
this.showDiv19 = false
this.showDiv20 = false
this.showDiv21 = false
this.showDiv22 = false
this.showDiv23 = true
await request({
url: '',
method: 'post',
data: {
type: '3',
name: `select * from dbo.发货管理_发货单 where 机床流水号 = ${this.machineValue} and 是否发出 = 1`
}
}).then(res => {
console.log(res)
this.tableDataDiv23 = res.data
})
},
aaa() {
console.log(this.dataDiv10.data, 89)
}
}
}
</script>
<style scoped>
.red{
background: red;
}
.yellow{
background: orange;
}
.green{
background: lightgreen;
}
.white{
background: white;
}
.el-card{
margin: 5px 10px 5px 10px;
}
.showDiv{
height: 380px;
}
.module{
border-radius: 6px;
border: 3px solid black;
/*background-color: white;*/
display: inline-block;
}
.module:hover{
box-shadow: 5px 5px 5px #888888;/*设置阴影,可以自定义参数*/
}
.process{
text-align: center;
margin-left: 80px;
margin-top: 20px;
width: 1858px;
height: 400px;
/*border: 1px solid red;*/
background: url('../../../assets/img/img4.png') repeat;
background-repeat:no-repeat;
background-size:100% 100%;-moz-background-size:100% 100%;
}
.main{
border: 1px solid #DCDFE6;
width:100%;
overflow-y: hidden;
overflow-x: auto;
color: #000;
font-size: 16px;
height: 440px;
}
.main p{height:300px;}
/*-------滚动条整体样式----*/
.main::-webkit-scrollbar {
width:8px;
height:8px;
}
/*滚动条里面小方块样式*/
.main::-webkit-scrollbar-thumb {
border-radius:100px;
-webkit-box-shadow:inset 0 0 5px rgba(0,0,0,0.2);
background:#DCDFE6;
}
/*滚动条里面轨道样式*/
.main::-webkit-scrollbar-track {
-webkit-box-shadow:inset 0 0 5px rgba(0,0,0,0.2);
border-radius:0;
background:white;
}
</style>