零件分配

This commit is contained in:
Vergil
2020-02-20 15:56:28 +08:00
parent 74eab855dc
commit 4160cdcbb5
4 changed files with 214 additions and 264 deletions

View File

@@ -2,7 +2,6 @@
<div class="app-container">
<el-card style="padding-top: 5px;">
<el-row>
<!-- <span>机床编号:</span>-->
<el-select v-model="machineNumberValue" filterable placeholder="机床图号" size="small" style="margin:0px;width: 180px" clearable @change="machineChange">
<el-option
v-for="item in machineNumber"
@@ -13,7 +12,6 @@
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
</el-option>
</el-select>
<!-- <span>组号:</span>-->
<el-select v-model="groupNumberValue" filterable placeholder="组号" style="margin-left: 10px;width: 90px" size="small" clearable>
<el-option
v-for="item in groupNumber"
@@ -32,219 +30,187 @@
</el-badge>
</el-row>
</el-card>
<!-- <el-card>-->
<!-- <el-table :data="tableData" border size="mini" highlight-current-row style="width: 100%;margin-top: 15px" height="250px" @row-click="searchPart">-->
<!-- <el-table-column label="项目名称" prop="项目名称" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.项目名称 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="机床编号" prop="机床图号" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.机床图号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="机床名称" prop="机床名称" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.机床名称 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="组号" prop="组号" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.组号 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="组件名称" prop="组件名称" align="center">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.组件名称 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-card>-->
<el-card style="">
<el-tabs type="border-card" @tab-click="selectPart">
<el-tab-pane label="基本件">
<el-table :data="tableData1" :row-class-name="tableRowClassName1" stripe border size="mini" style="width: 1140px" height="300px" @selection-change="handleSelectionChange">
<el-table-column align="center" width="50" type="selection"/>
<el-table-column label="零件名称" align="center" width="140px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="前零件图号" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="零件总数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="投产总数量" align="center" width="115px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.投产总数量" :min="0" size="mini" style="width: 90px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.零件备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-right" plain @click="OutParts(scope.row)">移出</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="外购件">
<el-table :data="tableData2" border size="mini" style="width: 100%" height="300px" @selection-change="handleSelectionChange">
<el-table-column align="center" width="50" type="selection"/>
<el-table-column label="物料代码" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料代码 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="零件总数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="采购总数量" align="center" width="115px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.采购总数量" :min="0" size="mini" style="width: 90px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="标准件">
<el-table :data="tableData3" border size="mini" style="width: 100%" height="300px" @selection-change="handleSelectionChange">
<el-table-column align="center" width="50" type="selection"/>
<el-table-column label="物料代码" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料代码 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="零件总数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="采购总数量" align="center" width="115px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.采购总数量" :min="0" size="mini" style="width: 90px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<el-card style="padding: 3px">
<span>交货期</span>
<el-date-picker
v-model="time"
size="small"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期"/>
<span style="font-weight: bold">制造:</span>
<el-tooltip :open-delay="1200" effect="dark" content="将零件选择到采购单" placement="top">
<el-button type="primary" size="small" icon="el-icon-s-shop" plain style="margin-top: 3px; margin-left: 5px" @click="purchaseRequisition()">制造部采购</el-button>
</el-tooltip>
<span style="margin-left: 40px;font-weight: bold">金工:</span>
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配为自家生产" placement="top">
<el-button type="danger" size="small" icon="el-icon-star-off" plain style="margin-top: 3px; margin-left: 5px" @click="Production()">车间生产</el-button>
</el-tooltip>
<span style="margin-left: 40px;font-weight: bold">采购:</span>
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配到采购部" placement="top">
<el-button type="success" size="small" icon="el-icon-shopping-cart-full" plain style="margin-top: 3px; margin-left: 5px" @click="PurchasingDepartment()">采购部门采购</el-button>
</el-tooltip>
</el-card>
<el-tabs type="border-card" @tab-click="selectPart">
<el-tab-pane label="基本件">
<el-table :data="tableData1" :row-class-name="tableRowClassName1" stripe border size="mini" style="width: 1140px" height="300px" @selection-change="handleSelectionChange">
<el-table-column align="center" width="50" type="selection"/>
<el-table-column label="零件名称" align="center" width="140px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="前零件图号" align="center" width="120px" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.前零件图号 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="零件总数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="投产总数量" align="center" width="115px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.投产总数量" :min="0" size="mini" style="width: 90px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.零件备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-right" plain @click="OutParts(scope.row)">移出</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="外购件">
<el-table :data="tableData2" border size="mini" style="width: 100%" height="300px" @selection-change="handleSelectionChange">
<el-table-column align="center" width="50" type="selection"/>
<el-table-column label="物料代码" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料代码 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="零件总数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="采购总数量" align="center" width="115px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.采购总数量" :min="0" size="mini" style="width: 90px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="标准件">
<el-table :data="tableData3" border size="mini" style="width: 100%" height="300px" @selection-change="handleSelectionChange">
<el-table-column align="center" width="50" type="selection"/>
<el-table-column label="物料代码" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料代码 }}
</template>
</el-table-column>
<el-table-column label="物料名称" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.物料型号 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="零件总数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.总数量 }}
</template>
</el-table-column>
<el-table-column label="采购总数量" align="center" width="115px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.采购总数量" :min="0" size="mini" style="width: 90px"/>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="120">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<el-card style="padding: 3px">
<span>交货期</span>
<el-date-picker
v-model="time"
size="small"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期"/>
<span style="font-weight: bold">制造:</span>
<el-tooltip :open-delay="1200" effect="dark" content="将零件选择到采购单" placement="top">
<el-button type="primary" size="small" icon="el-icon-s-shop" plain style="margin-top: 3px; margin-left: 5px" @click="purchaseRequisition()">制造部采购</el-button>
</el-tooltip>
<span style="margin-left: 40px;font-weight: bold">金工:</span>
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配为自家生产" placement="top">
<el-button type="danger" size="small" icon="el-icon-star-off" plain style="margin-top: 3px; margin-left: 5px" @click="Production()">车间生产</el-button>
</el-tooltip>
<span style="margin-left: 40px;font-weight: bold">采购:</span>
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配到采购部" placement="top">
<el-button type="success" size="small" icon="el-icon-shopping-cart-full" plain style="margin-top: 3px; margin-left: 5px" @click="PurchasingDepartment()">采购部门采购</el-button>
</el-tooltip>
</el-card>
<el-card style="padding: 3px;">
<el-row>
<!-- <span>请购单号</span>-->
<el-input v-model="PurchaseOrder" size="small" style="width: 155px" placeholder="请购单号" clearable/>
<el-button icon="el-icon-search" type="primary" size="mini" style="margin-left: 10px" plain @click="searchTable1()">查询</el-button>
<el-button icon="el-icon-circle-plus-outline" type="warning" size="mini" style="margin-left: 10px" plain @click="handleAdd()">新增</el-button>
@@ -253,20 +219,15 @@
</el-row>
</el-card>
<el-row>
<el-col style="width: 400px;">
<el-card>
<el-card>
<el-col style="width: 400px;">
<el-table :data="tableData4" stripe border size="mini" style="width: 100%" height="300px" highlight-current-row @row-click="searchDetailed">
<el-table-column label="请购单号" show-overflow-tooltip align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.请购单编号 }}
</template>
</el-table-column>
<!-- <el-table-column label="请购车间" align="center" width="100px">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.请购车间 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="请购人" align="center" show-overflow-tooltip width="60px">
<el-table-column label="请购" align="center" show-overflow-tooltip width="80px">
<template slot-scope="scope">
{{ scope.row.请购人 }}
</template>
@@ -281,17 +242,9 @@
{{ scope.row.备注 }}
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" width="250px" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="warning" size="mini" icon="el-icon-edit" plain @click="handleEdit(scope.row)">编辑</el-button>-->
<!-- <el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 15px" plain @click="handleDelete(scope.row)">删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-card>
</el-col>
<el-col style="width: 985px;margin-left: 0px">
<el-card>
</el-col>
<el-col style="width: 950px;margin-left: 0px">
<el-table :data="tableData6" border size="mini" height="300px">
<el-table-column label="序号" type="index" align="center" width="50px"/>
<el-table-column label="零件名称" show-overflow-tooltip align="center" width="90px">
@@ -304,7 +257,7 @@
{{ scope.row.图号或型号 }}
</template>
</el-table-column>
<el-table-column label="材料或规格" show-overflow-tooltip align="center" width="90px">
<el-table-column label="材料或规格" show-overflow-tooltip align="center" width="110px">
<template slot-scope="scope">
{{ scope.row.规格或材料 }}
</template>
@@ -314,7 +267,7 @@
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="零件类型" show-overflow-tooltip align="center" width="70px">
<el-table-column label="零件类型" show-overflow-tooltip align="center" width="80px">
<template slot-scope="scope">
{{ scope.row.零件类型 }}
</template>
@@ -324,11 +277,6 @@
{{ scope.row.物料计划到货时间 }}
</template>
</el-table-column>
<!-- <el-table-column label="项目名称" align="center" width="150px">-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.项目名称 }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="机床图号" show-overflow-tooltip align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
@@ -359,8 +307,8 @@
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-col>
</el-card>
</el-row>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="新增请购单" center style="min-height: 300px" width="400px">
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="110px" class="demo-ruleForm">
@@ -370,7 +318,6 @@
size="small"
style="width:200px"/>
</el-form-item>
<el-form-item label="请购人">
<el-input
v-model="name"