This commit is contained in:
zhangdingyu
2019-05-31 12:11:42 +08:00
9 changed files with 210 additions and 101 deletions

View File

@@ -76,6 +76,11 @@
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="工艺员" align="center">
<template slot-scope="scope">
{{ scope.row.工艺员 }}
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination

View File

@@ -1,6 +1,10 @@
<template>
<div class="app-container">
<el-card>
<el-radio-group v-model="radio" size="small" style="margin: 10px;" @change="checked = false;partNum=[];partNumValue = '';typeValue = '';partName = '';material = '';materialName = '';prepareMateriel = '';spec = '';batchNum = '';searchPartsByMachineGroup();">
<el-radio v-model="radio" :label="1">未编制</el-radio>
<el-radio v-model="radio" :label="2">已编制</el-radio>
</el-radio-group>
<span>工艺员:</span>
<el-select v-model="CraftmenValue" placeholder="工艺员" size="small" style="width:100px" @change="clearDetail();">
<el-option
@@ -29,10 +33,8 @@
</el-option>
</el-select>
<el-checkbox v-model="checked" :disabled="isShow2" size="small" style="margin:10px">是否核准</el-checkbox>
<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整
</el-button>
<el-button v-show="false" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式
</el-button>
<!--<el-button v-show="isShow2" type="danger" icon="el-icon-edit" size="small" @click="returnEdit">在制零件工艺调整</el-button>-->
<!--<el-button v-show="false" plain size="small" style="margin: 10px;float:right" @click="switchEdit()">切换编辑模式</el-button>-->
<div v-show="isShow">
<span>种类:</span>
<el-input v-model="typeValue" placeholder="种类" size="small" readonly style="width:100px"/>
@@ -168,6 +170,7 @@
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-tickets" @click="saveApprove">保存
</el-button>
</el-button-group>
<el-button v-if="!isShow1" type="warning" size="small" icon="el-icon-tickets" @click="saveCompiled">记录修改备注</el-button>
</el-row>
<div style="margin-top: 5px;margin-bottom: 10px;display: inline-block"><span>符号</span>
<el-tag type="info"></el-tag>
@@ -211,21 +214,10 @@
@change="handleChange(scope.row)"/>
</template>
</el-table-column>
<el-table-column v-if="false" prop="name" label="工艺名称" width="130" align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.工艺名称"
:disabled="disabled"
readonly
style="width:100%"
@dblclick.native="tableSearch(scope.$index)"/>
</template>
</el-table-column>
<el-table-column prop="hard" label="难度等级" width="110" align="center">
<template slot-scope="scope">
<el-select
v-model="scope.row.工艺难度等级"
:disabled="disabled"
clearable
placeholder=""
@change="hardEdit(scope.row)">
@@ -235,17 +227,6 @@
</el-select>
</template>
</el-table-column>
<el-table-column v-if="false" prop="request" label="工艺要求" align="center" min-width="350">
<template slot-scope="scope">
<el-input
v-model="scope.row.工艺要求"
:rows="1"
:disabled="disabled"
type="textarea"
@dblclick.native="tableSearch(scope.$index)"
@change="requestEdit(scope.row)"/>
</template>
</el-table-column>
<el-table-column prop="request" label="工艺要求" align="center" min-width="350">
<template slot-scope="scope">
<el-autocomplete
@@ -272,22 +253,18 @@
<template slot-scope="scope">
<div>
<el-button
:disabled="disabled"
icon="el-icon-arrow-up"
type="primary"
@click="upOne(scope.row)"/>
<el-button
:disabled="disabled"
icon="el-icon-arrow-down"
type="primary"
@click="downOne(scope.row)"/>
<el-button
:disabled="disabled"
icon="el-icon-circle-plus-outline"
type="primary"
@click="insertOne(scope.row)"/>
<el-button
:disabled="disabled"
icon="el-icon-delete"
type="danger"
@click="deleteOne(scope.row)"/>
@@ -552,7 +529,9 @@ import {
readyChange,
TableAddLi1,
TableAddLi,
getPartnames3
getPartnames3,
getPartnames4,
modifyRemark
} from '@/api/ManufacturingCenter/ProcessQuotaEstablishment'
import elInput from 'element-ui/packages/input'
import { mapGetters } from 'vuex'
@@ -720,13 +699,33 @@ export default {
'id'
])
},
created() {
mounted() {
this.fetchData()
this.initPerson()
this.getList()
this.openCascader()
},
methods: {
// 保存已编制
saveCompiled() {
if (this.partNumValue) {
this.$prompt('请输入工艺修改备注', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
console.log(value, '日期', this.id, this.partNumValue)
modifyRemark(this.id, value, this.partNumValue)
this.$message.success('记录成功')
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
} else {
this.$message.warning('请选择零件')
}
},
blurRequest(row) {
selectRequest(row.工序流水号, row.工艺计划流水号, row.工艺编号, row.工序顺序, row.工艺要求).then(response => {
if (response.data[0].result === '1') {
@@ -1087,20 +1086,38 @@ export default {
searchPartsByMachineGroup() {
this.tableData = []
this.partNum = []
this.disabled = false
this.isShow1 = true
this.isShow2 = false
this.checked1 = true
getPartnames3(this.CraftmenValue, this.machine_Group_part).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.partNum.push({
label: response.data[i].零件图号,
value: response.data[i].工艺计划流水,
machine: response.data[i].机床图,
group: response.data[i].组号
})
}
})
if (this.radio === 1) { // 未编制
this.disabled = false
this.isShow1 = true
this.isShow2 = false
this.checked1 = true
getPartnames3(this.CraftmenValue, this.machine_Group_part).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.partNum.push({
label: response.data[i].零件图,
value: response.data[i].工艺计划流水,
machine: response.data[i].机床图号,
group: response.data[i].组号
})
}
})
} else { // 已编制
this.isShow = true
this.isShow1 = false
this.isShow2 = true
this.disabled = true
this.checked1 = false
getPartnames4(this.CraftmenValue, this.machine_Group_part).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.partNum.push({
label: response.data[i].零件图号,
value: response.data[i].工艺计划流水号,
machine: response.data[i].机床图号,
group: response.data[i].组号
})
}
})
}
},
searchParts() { // 根据条件查零件号
this.tableData = []

View File

@@ -50,28 +50,28 @@
<el-table
v-loading="loading0"
:data="tableData"
style="width: 100%;max-height: 600px"
height="600"
style="width: 100%;max-height: 610px"
height="610"
size="mini"
highlight-current-row
border>
<el-table-column align="center" label="序号" type="index" width="60px"/>
<el-table-column align="center" label="机床图号" width="170px">
<el-table-column align="center" label="序号" type="index" width="50px"/>
<el-table-column align="center" label="机床图号" width="100px">
<template slot-scope="scope">
{{ scope.row.机床图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="组号" width="140px">
<el-table-column align="center" label="组号" width="60px">
<template slot-scope="scope">
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件图号" width="200px">
<el-table-column align="center" label="零件图号" width="150px">
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件名称" width="180px">
<el-table-column align="center" label="零件名称" width="100px">
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
@@ -81,17 +81,17 @@
{{ scope.row.投产总数量 }}
</template>
</el-table-column>
<el-table-column align="center" label="投产时间" width="130px">
<el-table-column align="center" label="投产时间" width="100px">
<template slot-scope="scope">
{{ scope.row.传递时间 }}
</template>
</el-table-column>
<el-table-column align="center" label="零件状态" width="750px">
<el-table-column align="center" label="零件状态" min-width="960px">
<template slot-scope="scope">
<el-steps :active="scope.row.考核状态" finish-status="success" simple>
<el-steps id="StatusQuery" :active="scope.row.考核状态" finish-status="success" simple>
<el-step title="投产" />
<el-step title="工艺" />
<el-step title="定额" />
<el-step title="工艺定额" />
<!--<el-step title="定额" />-->
<el-step title="平衡" />
<el-step title="完成" />
<el-step title="入库" />
@@ -491,3 +491,8 @@ export default {
margin: 10px 0 10px 10px;
}
</style>
<style>
#StatusQuery {
padding: 8px 30px;
}
</style>