已编制

This commit is contained in:
chenjianan
2019-05-30 18:30:45 +08:00
parent dae8666569
commit d3135dfd11
2 changed files with 88 additions and 47 deletions

View File

@@ -1,6 +1,6 @@
import request from '@/utils/request' import request from '@/utils/request'
// 查询零件(包含借用件) // 查询零件未编制(包含借用件)
export function getPartnames3(num1, num2) { export function getPartnames3(num1, num2) {
return request({ return request({
url: '', url: '',
@@ -12,6 +12,18 @@ export function getPartnames3(num1, num2) {
} }
}) })
} }
// 查询零件已编制(包含借用件)
export function getPartnames4(num1, num2) {
return request({
url: '',
method: 'post',
data: {
type: '1',
name: '车间生产管理工艺_零件工艺计划_查询已完成工艺制定零件_按人员机床组号或图号查',
param: '工艺人员编号=' + num1 + '&机床组号或图号=' + num2
}
})
}
// 典艺查询<高精原有数据> // 典艺查询<高精原有数据>
export function searchProcess11(num) { export function searchProcess11(num) {
return request({ return request({
@@ -491,3 +503,15 @@ export function TableAddLi(a, b, c, num0, num1) {
} }
}) })
} }
// 修改备注
export function modifyRemark(...params) {
return request({
url: '',
method: 'post',
data: {
type: '2',
name: '车间生产管理工艺_零件工艺计划_工艺修改记录_增加数据',
param: `修改人员编号=${params[0]}&修改备注=${params[1]}&工艺计划流水号=${params[2]}`
}
})
}

View File

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