This commit is contained in:
bryan sun
2019-10-31 17:13:36 +08:00
parent 4af98a6f65
commit c97874bbd5
6 changed files with 556 additions and 491 deletions

View File

@@ -14,14 +14,15 @@
</el-option>
</el-select>
<!-- <span>组号:</span>-->
<el-select v-model="groupNumberValue" filterable placeholder="组号" style="margin:0px 10px" size="small" clearable>
<el-select v-model="groupNumberValue" filterable placeholder="组号" style="margin:0px 10px" size="small" clearable @change="searchTable">
<el-option
v-for="item in groupNumber"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable()">查询</el-button>
<!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable()">查询</el-button>-->
<!-- <el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchPart()">查询1</el-button>-->
<el-badge :value="value1" :max="99" class="item">
<el-button size="small" type="text" @click="PartCallbackInformation1">外购件和标准件打回信息</el-button>
</el-badge>
@@ -30,76 +31,76 @@
</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>-->
<!-- <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>
<el-tabs type="border-card" @tab-click="selectPart">
<el-tab-pane label="基本件">
<el-table :data="tableData1" 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">
<el-table-column label="零件名称" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center">
<el-table-column label="零件图号" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="前零件图号" align="center">
<el-table-column label="前零件图号" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.前零件图号 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center">
<el-table-column label="材料" align="center" width="120px">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center">
<el-table-column label="零件数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="机床数量" align="center">
<el-table-column label="机床数量" align="center" width="90px">
<template slot-scope="scope">
{{ scope.row.机床数量 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<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" fixed="right">
<el-table-column label="操作" align="center" width="100px">
<template slot-scope="scope">
<el-button type="danger" size="mini" icon="el-icon-delete" plain @click="OutParts(scope.row)">移出</el-button>
</template>
@@ -202,115 +203,122 @@
<el-button type="primary" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 15px" @click="PurchasingDepartment()">采购部门采购</el-button>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="所选零件分配为自家生产" placement="top">
<el-button type="warning" size="small" icon="el-icon-star-off" style="margin-top: 3px; margin-left: 15px" @click="Production()">车间生产</el-button>
<el-button type="warning" size="small" icon="el-icon-star-off" style="margin: 3px 15px 10px 15px; margin-left: 15px" @click="Production()">车间生产</el-button>
</el-tooltip>
</el-card>
<el-card>
<el-row>
<span>请购单号</span>
<el-input v-model="PurchaseOrder" size="small" style="width: 200px" placeholder="请购单号" clearable/>
<!-- <span>请购单号</span>-->
<el-input v-model="PurchaseOrder" size="small" style="width: 150px" placeholder="请购单号" clearable/>
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 15px" @click="searchTable1()">查询</el-button>
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" style="margin-left: 15px" @click="handleAdd()">新增</el-button>
<el-button type="danger" size="mini" icon="el-icon-delete" style="margin-left: 15px" plain @click="handleDelete()">删除</el-button>
</el-row>
</el-card>
<el-card>
<el-table :data="tableData4" border size="mini" style="width: 100%" height="200px" highlight-current-row @row-click="searchDetailed">
<el-table-column label="请购单号" align="center">
<template slot-scope="scope">
{{ scope.row.请购单编号 }}
</template>
</el-table-column>
<el-table-column label="请购车间" align="center">
<template slot-scope="scope">
{{ scope.row.请购车间 }}
</template>
</el-table-column>
<el-table-column label="请购人" align="center">
<template slot-scope="scope">
{{ scope.row.请购人 }}
</template>
</el-table-column>
<el-table-column label="请购时间" align="center">
<template slot-scope="scope">
{{ 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-card>
<el-table :data="tableData6" border size="mini" style="width: 100%" height="300px">
<el-table-column label="零件名称" align="center">
<template slot-scope="scope">
{{ scope.row.物料名称 }}
</template>
</el-table-column>
<el-table-column label="零件图号" align="center">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="材料" align="center">
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
</el-table-column>
<el-table-column label="零件数量" align="center">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center">
<template slot-scope="scope">
{{ scope.row.零件类型 }}
</template>
</el-table-column>
<el-table-column label="交货期" align="center">
<template slot-scope="scope">
{{ scope.row.物料计划到货时间 }}
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" min-width="150px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床编号" align="center">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="150px" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block;margin-right: 10px">
<el-button type="text" size="mini" icon="el-icon-edit" @click="handleEdit1(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="移出" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
<el-row>
<el-col style="width: 490px">
<el-card>
<el-table :data="tableData4" border size="mini" style="width: 100%" height="300px" highlight-current-row @row-click="searchDetailed">
<el-table-column label="请购单号" align="center" width="160px">
<template slot-scope="scope">
{{ scope.row.请购单编号 }}
</template>
</el-table-column>
<el-table-column label="请购车间" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.请购车间 }}
</template>
</el-table-column>
<el-table-column label="请购人" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.请购人 }}
</template>
</el-table-column>
<el-table-column label="请购时间" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.请购时间 }}
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" width="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: 1200px">
<el-card>
<el-table :data="tableData6" border size="mini" style="width: 100%" height="300px">
<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="140px">
<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="80px">
<template slot-scope="scope">
{{ scope.row.零件数量 }}
</template>
</el-table-column>
<el-table-column label="零件类型" align="center" width="80px">
<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="150px">
<template slot-scope="scope">
{{ scope.row.项目名称 }}
</template>
</el-table-column>
<el-table-column label="机床编号" align="center" width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column label="组号" align="center" width="80px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="150px">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120px">
<template slot-scope="scope">
<el-tooltip :open-delay="1200" effect="dark" content="编辑" placement="top">
<div style="display: inline-block;margin-right: 10px">
<el-button type="text" size="mini" icon="el-icon-edit" @click="handleEdit1(scope.row)"/>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="移出" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" icon="el-icon-delete" @click="MoveOut(scope.row)"/>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
<el-card>
<el-table :data="tableData5" border size="mini" style="width: 100%" height="300px">
<el-table-column label="物料代码" align="center">
@@ -879,7 +887,7 @@ export default {
searchgroup(this.machineNumberValue).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.groupNumber.push({
label: response.data[i].组号,
label: response.data[i].组号 + ' ' + response.data[i].组件名称,
value: response.data[i].组件流水号
})
}
@@ -894,11 +902,18 @@ export default {
this.check3 = 1
} else { this.check3 = 0 }
searchTable(this.machineNumberValue, this.check2, this.groupNumberValue, this.check3).then(response => {
this.tableData = response.data
// this.tableData = response.data
this.projectName = response.data[0].项目名称
this.projectFloatValue = response.data[0].项目流水号
this.MachineToolNumber = response.data[0].机床图号
this.machineFloatValue = response.data[0].机床流水号
this.groupName = response.data[0].组号
this.groupFloatValue = response.data[0].组件流水号
this.tableData1 = []
this.tableData2 = []
this.tableData3 = []
this.loading = false
this.searchPart()
})
},
selectPart(val) {
@@ -917,26 +932,26 @@ export default {
})
}
},
searchPart(row) {
searchPart() {
this.tableData1 = []
this.tableData2 = []
this.tableData3 = []
this.projectName = row.项目名称
this.projectFloatValue = row.项目流水号
this.MachineToolNumber = row.机床图号
this.machineFloatValue = row.机床流水号
this.groupName = row.组号
this.groupFloatValue = row.组件流水号
// this.projectName = row.项目名称
// this.projectFloatValue = row.项目流水号
// this.MachineToolNumber = row.机床图号
// this.machineFloatValue = row.机床流水号
// this.groupName = row.组号
// this.groupFloatValue = row.组件流水号
if (this.PartType === '基本件') {
searchPart(row.组件流水号).then(response => {
searchPart(this.groupFloatValue).then(response => {
this.tableData1 = response.data
})
} else if (this.PartType === '外购件') {
searchPart1(row.组件流水号, 2).then(response => {
searchPart1(this.groupFloatValue, 2).then(response => {
this.tableData2 = response.data
})
} else if (this.PartType === '标准件') {
searchPart1(row.组件流水号, 1).then(response => {
searchPart1(this.groupFloatValue, 1).then(response => {
this.tableData3 = response.data
})
}
@@ -1006,26 +1021,33 @@ export default {
}
})
},
handleDelete(row) { // 删除单据
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteData(row.请购单流水号).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.tableData5 = []
this.tableData6 = []
this.searchTable1()
} else { this.$message.error('删除失败') }
handleDelete() { // 删除单据
console.log(this.RequisitionList)
if (this.RequisitionList === '') {
this.$message.error('请先选择请购单')
} else {
this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
deleteData(this.RequisitionList).then(response => {
if (response.data[0].result === '1') {
this.$message.success('删除成功')
this.tableData5 = []
this.tableData6 = []
this.searchTable1()
} else {
this.$message.error('删除失败')
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
},
OutParts(row) { // 移出数据
this.$confirm('移出后,该零件将不再参与考核', '提示', {