零件工艺制定
This commit is contained in:
@@ -1,5 +1,41 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 典艺查询<高精原有数据>
|
||||||
|
export function searchProcess11(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间生产管理工艺_原零件工艺查询_MESWORK',
|
||||||
|
param: '零件图号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 典艺查询<高精原有数据>
|
||||||
|
export function numChange(num) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '1',
|
||||||
|
name: '车间生产管理工艺_原零件工艺明细查询_MESWORK',
|
||||||
|
param: '典艺流水号=' + num
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 保存主表工艺
|
||||||
|
export function selectRequest(num0, num1, num2, num3, request0) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间生产管理工艺_零件工序_修改数据_根据工序流水号和工艺计划流水号',
|
||||||
|
param: '工序流水号=' + num0 + '&工艺计划流水号=' + num1 + '&工艺编号=' + num2 + '&工艺顺序=' + num3 + '&工艺要求=' + request0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
// 初始化 工艺员A
|
// 初始化 工艺员A
|
||||||
export function initCraftmen() {
|
export function initCraftmen() {
|
||||||
return request({
|
return request({
|
||||||
@@ -322,18 +358,7 @@ export function saveApprove(num0, num1, request0, spec, num2, outhelp, num3, num
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 选择工艺要求
|
|
||||||
export function selectRequest(num0, num1, num2, num3, request0) {
|
|
||||||
return request({
|
|
||||||
url: '',
|
|
||||||
method: 'post',
|
|
||||||
data: {
|
|
||||||
type: '2',
|
|
||||||
name: '车间生产管理工艺_零件工序_修改数据_根据工序流水号和工艺计划流水号',
|
|
||||||
param: '工序流水号=' + num0 + '&工艺计划流水号=' + num1 + '&工艺编号=' + num2 + '&工艺顺序=' + num3 + '&工艺要求=' + request0
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 粘贴
|
// 粘贴
|
||||||
export function pasteTable(oldNum, newNum) {
|
export function pasteTable(oldNum, newNum) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function getMachines() {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
type: '1',
|
type: '1',
|
||||||
name: '车间生产管理工艺_传递后_机床名称_根据机床查询',
|
name: '车间生产管理工艺_传递后_机床名称_加工进度修改模块查询',
|
||||||
param: '是否传递=2=int&考核状态=6=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
|
param: '是否传递=2=int&考核状态=6=int&工艺任务分配状态=2=int&定额任务分配状态=2=int&单件是否外协=1=int'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -82,8 +82,8 @@
|
|||||||
<span>长度:</span>
|
<span>长度:</span>
|
||||||
<el-input-number v-model="height2" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
|
<el-input-number v-model="height2" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
|
||||||
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation1()">计算重量</el-button>
|
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="Calculation1()">计算重量</el-button>
|
||||||
∮ ° # □ ∥ ± × Ⅰ Ⅱ Ⅲ ⊥ % ■ ∠ mm ◎ ○ δ μm / ◇ ()
|
<!--∮ ° # □ ∥ ± × Ⅰ Ⅱ Ⅲ ⊥ % ■ ∠ mm ◎ ○ δ μm / ◇ ()-->
|
||||||
<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="insertThestring()">计算重量</el-button>
|
<!--<el-button style="margin-top: 20px;margin-left: 10px;" type="primary" size="small" @click="insertThestring()">计算重量</el-button>-->
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col v-show="materielValue==='2'||materielValue==='9'||materielValue==='10'||materielValue==='11'" :span="20">
|
<el-col v-show="materielValue==='2'||materielValue==='9'||materielValue==='10'||materielValue==='11'" :span="20">
|
||||||
@@ -144,16 +144,11 @@
|
|||||||
<el-button style="margin:10px" type="primary" size="small" @click="calTol()">计算公差</el-button>
|
<el-button style="margin:10px" type="primary" size="small" @click="calTol()">计算公差</el-button>
|
||||||
<el-button-group v-if="isShow1" style="margin: 10px">
|
<el-button-group v-if="isShow1" style="margin: 10px">
|
||||||
<el-button v-if="isShow1" type="info" size="small" icon="el-icon-document" @click="pasteTable">粘贴</el-button>
|
<el-button v-if="isShow1" type="info" size="small" icon="el-icon-document" @click="pasteTable">粘贴</el-button>
|
||||||
<el-button v-if="false" :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="DYbtn">典艺
|
<el-button v-if="true" :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="DYbtn">原有</el-button>
|
||||||
</el-button>
|
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="WYbtn">完艺</el-button>
|
||||||
<el-button :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="WYbtn">完艺
|
<el-button :disabled="disabled" type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除</el-button>
|
||||||
</el-button>
|
<el-button v-if="isShow1" type="primary" size="small" icon="el-icon-tickets" @click="copyAndSave">复制并保存</el-button>
|
||||||
<el-button :disabled="disabled" type="danger" size="small" icon="el-icon-delete" @click="deleteTable">删除
|
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-tickets" @click="saveApprove">保存</el-button>
|
||||||
</el-button>
|
|
||||||
<el-button v-if="isShow1" type="primary" size="small" icon="el-icon-tickets" @click="copyAndSave">复制并保存
|
|
||||||
</el-button>
|
|
||||||
<el-button :disabled="disabled" type="primary" size="small" icon="el-icon-tickets" @click="saveApprove">保存
|
|
||||||
</el-button>
|
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -306,72 +301,29 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<el-dialog :visible.sync="dialogFormVisible" title="典型工艺选择" center width="800px">
|
<el-dialog :visible.sync="dialogFormVisible" title="工艺选择" center width="800px">
|
||||||
<el-form ref="form" :model="form" label-position="left" label-width="125px" class="demo-ruleForm">
|
<el-form ref="form" :model="form" label-position="left" label-width="125px" class="demo-ruleForm">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="24">
|
||||||
<el-form-item label="典型工艺零件分类">
|
<el-form-item label="零件图号">
|
||||||
<el-select
|
<el-input v-model="partNameValue1" size="small" placeholder="输入零件图号" style="width: 150px" clearable/>
|
||||||
v-model="typicalClassValue"
|
<el-button type="success" size="small" icon="el-icon-search" style="margin-left: 20px" @click="searchProcess()">查询</el-button>
|
||||||
placeholder="分类"
|
|
||||||
size="small"
|
|
||||||
style="width:150px"
|
|
||||||
@change="classChange()">
|
|
||||||
<el-option
|
|
||||||
v-for="item in typicalClass"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
|
||||||
<el-form-item label="零件名称">
|
|
||||||
<el-select
|
|
||||||
id="name"
|
|
||||||
v-model="partNameValue1"
|
|
||||||
placeholder="零件名称"
|
|
||||||
size="small"
|
|
||||||
style="width:150px"
|
|
||||||
@change="nameChange()">
|
|
||||||
<el-option
|
|
||||||
v-for="item in partName1"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-button type="success" size="small" icon="el-icon-search" @click="searchProcess()">查询</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="10">
|
<el-col :span="24">
|
||||||
<el-form-item label="典型工艺号">
|
<el-form-item label="零件图号">
|
||||||
<el-select
|
<el-select id="num" v-model="processNumValue" placeholder="零件图号" style="width:150px" size="small" @change="numChange()">
|
||||||
id="num"
|
|
||||||
v-model="processNumValue"
|
|
||||||
placeholder="工艺号"
|
|
||||||
style="width:150px"
|
|
||||||
size="small"
|
|
||||||
@change="numChange()">
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in partName1"
|
v-for="item in partName1"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.num"
|
:label="item.label"
|
||||||
:value="item.value"/>
|
:value="item.value"/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-button size="small" style="margin-left: 20px" @click="processCopy()">工艺拷贝</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10">
|
|
||||||
<el-form-item label="备注">
|
|
||||||
<el-input v-model="remark" size="small" readonly style="width: 150px;"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-button size="small" @click="processCopy()">工艺拷贝</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData2"
|
:data="tableData2"
|
||||||
@@ -381,7 +333,7 @@
|
|||||||
size="mini">
|
size="mini">
|
||||||
<el-table-column align="center" label="工艺序号" width="80">
|
<el-table-column align="center" label="工艺序号" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.工艺序号 }}
|
{{ scope.row.工序顺序 }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="工艺名称" width="180">
|
<el-table-column align="center" label="工艺名称" width="180">
|
||||||
@@ -472,12 +424,7 @@
|
|||||||
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
<el-button size="small" @click="processCopy1()">工艺拷贝</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table :data="tableData4" style="width: 97%;max-height: 250px;margin-top: 15px" size="mini" border height="250px">
|
||||||
:data="tableData4"
|
|
||||||
style="width: 97%;max-height: 250px;margin-top: 15px"
|
|
||||||
size="mini"
|
|
||||||
border
|
|
||||||
height="250px">
|
|
||||||
<el-table-column align="center" label="工艺序号" width="80">
|
<el-table-column align="center" label="工艺序号" width="80">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.工序顺序 }}
|
{{ scope.row.工序顺序 }}
|
||||||
@@ -552,6 +499,8 @@
|
|||||||
<script>
|
<script>
|
||||||
import '@/icon/iconfont.css'
|
import '@/icon/iconfont.css'
|
||||||
import {
|
import {
|
||||||
|
numChange,
|
||||||
|
searchProcess11,
|
||||||
WeightCopy,
|
WeightCopy,
|
||||||
initCraftmen,
|
initCraftmen,
|
||||||
getPartnames1,
|
getPartnames1,
|
||||||
@@ -562,8 +511,6 @@ import {
|
|||||||
searchMaterial,
|
searchMaterial,
|
||||||
typicalProcess,
|
typicalProcess,
|
||||||
initTolerance,
|
initTolerance,
|
||||||
FcK,
|
|
||||||
searchProcess,
|
|
||||||
searchWYgongyi,
|
searchWYgongyi,
|
||||||
gongyiCopy,
|
gongyiCopy,
|
||||||
initPerson,
|
initPerson,
|
||||||
@@ -1099,67 +1046,29 @@ export default {
|
|||||||
this.remark1 = ''
|
this.remark1 = ''
|
||||||
this.tuhaoValue = ''
|
this.tuhaoValue = ''
|
||||||
},
|
},
|
||||||
classChange() { // 当分类改变时,获取零件名称和典型工艺流水号
|
// 典艺工艺查询
|
||||||
this.partNameValue1 = ''
|
searchProcess() {
|
||||||
this.processNumValue = ''
|
this.processNumValue = ''
|
||||||
for (let i = 0; i < this.typicalClass.length; i++) {
|
this.partName1 = []
|
||||||
if (this.typicalClassValue === this.typicalClass[i].value) {
|
this.tableData2 = []
|
||||||
this.serialNumValue1 = this.serialNum1[i].value
|
searchProcess11(this.partNameValue1).then(response => {
|
||||||
FcK(this.serialNumValue1).then(response => {
|
for (let i = 0; i < response.data.length; i++) {
|
||||||
this.partName1 = []
|
this.partName1.push({
|
||||||
this.processNum = []
|
label: response.data[i].零件图号,
|
||||||
this.remark = response.data[0].备注
|
value: response.data[i].典艺流水号
|
||||||
for (let j = 0; j < response.data.length; j++) {
|
|
||||||
this.partName1.push({
|
|
||||||
label: response.data[j].典型工艺名称,
|
|
||||||
num: response.data[j].典型工艺号,
|
|
||||||
value: response.data[j].典型工艺流水号
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
nameChange() { // 当零件名称改变时,典型工艺号改变
|
|
||||||
for (let i = 0; i < this.partName1.length; i++) {
|
|
||||||
if (this.partNameValue1 === this.partName1[i].value) {
|
|
||||||
this.processNumValue = this.partName1[i].num
|
|
||||||
this.serialNumValue2 = this.partNameValue1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
numChange() { // 当典型工艺号改变时,零件名称改变
|
|
||||||
for (let i = 0; i < this.partName1.length; i++) {
|
|
||||||
if (this.processNumValue === this.partName1[i].value) {
|
|
||||||
this.partNameValue1 = this.partName1[i].value
|
|
||||||
this.serialNumValue2 = this.partNameValue1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
searchProcess() { // 典艺工艺查询
|
|
||||||
if (this.typicalClassValue === '') {
|
|
||||||
this.serialNumValue1check = false
|
|
||||||
} else {
|
|
||||||
this.serialNumValue1check = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.partNameValue1 === '') {
|
|
||||||
this.partNameValue1check = false
|
|
||||||
} else {
|
|
||||||
this.partNameValue1check = true
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.processNumValue === '') {
|
|
||||||
this.processNumValuecheck = false
|
|
||||||
} else {
|
|
||||||
this.processNumValuecheck = true
|
|
||||||
}
|
|
||||||
this.tableData2 = []
|
|
||||||
searchProcess(this.serialNumValue1check, this.serialNumValue1, this.partNameValue1check, this.serialNumValue2, this.processNumValuecheck, this.serialNumValue2).then(response => {
|
|
||||||
this.tableData2 = response.data
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
processCopy() { // 典艺工艺拷贝
|
// 典艺选择查表格
|
||||||
|
numChange() {
|
||||||
|
numChange(this.processNumValue).then(response => {
|
||||||
|
this.tableData2 = response.data
|
||||||
|
console.log(this.tableData2)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 典艺工艺拷贝
|
||||||
|
processCopy() {
|
||||||
if (this.partNumValue === '') {
|
if (this.partNumValue === '') {
|
||||||
this.$message.error('请在主界面选择一个零件作为被拷贝对象')
|
this.$message.error('请在主界面选择一个零件作为被拷贝对象')
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
@@ -1170,12 +1079,11 @@ export default {
|
|||||||
this.tableData[i].工艺名称 = this.tableData2[i].工艺名称
|
this.tableData[i].工艺名称 = this.tableData2[i].工艺名称
|
||||||
this.tableData[i].工艺难度等级 = this.tableData2[i].工艺难度等级
|
this.tableData[i].工艺难度等级 = this.tableData2[i].工艺难度等级
|
||||||
this.tableData[i].工艺要求 = this.tableData2[i].工艺要求
|
this.tableData[i].工艺要求 = this.tableData2[i].工艺要求
|
||||||
selectRequest(this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号, this.tableData2[i].工艺编号, this.tableData2[i].工艺序号, this.tableData2[i].工艺要求).then(response => {
|
console.log(this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号, this.tableData2[i].工艺编号, this.tableData2[i].工序顺序, this.tableData2[i].工艺要求)
|
||||||
})
|
selectRequest(this.tableData[i].工序流水号, this.tableData[i].工艺计划流水号, this.tableData2[i].工艺编号, this.tableData2[i].工序顺序, this.tableData2[i].工艺要求)
|
||||||
hardEdit(this.tableData[i].工序流水号, this.tableData2[i].工艺难度等级).then(response => {
|
hardEdit(this.tableData[i].工序流水号, this.tableData2[i].工艺难度等级)
|
||||||
})
|
|
||||||
this.dialogFormVisible = false
|
|
||||||
}
|
}
|
||||||
|
this.dialogFormVisible = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchProcess1() { // 完艺工艺查询
|
searchProcess1() { // 完艺工艺查询
|
||||||
@@ -1310,8 +1218,7 @@ export default {
|
|||||||
this.str = this.str + this.processRequestValue
|
this.str = this.str + this.processRequestValue
|
||||||
this.tableData[this.index].工艺要求 = this.str
|
this.tableData[this.index].工艺要求 = this.str
|
||||||
this.dialogFormVisible2 = false
|
this.dialogFormVisible2 = false
|
||||||
selectRequest(this.tableData[this.index].工序流水号, this.tableData[this.index].工艺计划流水号, this.tableData[this.index].工艺编号, this.tableData[this.index].工序顺序, this.tableData[this.index].工艺要求).then(response => {
|
selectRequest(this.tableData[this.index].工序流水号, this.tableData[this.index].工艺计划流水号, this.tableData[this.index].工艺编号, this.tableData[this.index].工序顺序, this.tableData[this.index].工艺要求)
|
||||||
})
|
|
||||||
},
|
},
|
||||||
calTol() { // 计算公差
|
calTol() { // 计算公差
|
||||||
this.tolerance = ''
|
this.tolerance = ''
|
||||||
|
|||||||
Reference in New Issue
Block a user