@@ -82,8 +82,8 @@
< span > 长度 : < / span >
< 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 >
∮ ° # □ ∥ ± × Ⅰ Ⅱ Ⅲ ⊥ % ■ ∠ mm ◎ ○ δ μm / ◇ ( )
< el-button style = "margin-top: 20px;margin-left: 10px;" type = "primary" size = "small" @click ="insertThestring()" > 计算重量 < / el -button >
<!-- ∮ ° # □ ∥ ± × Ⅰ Ⅱ Ⅲ ⊥ % ■ ∠ mm ◎ ○ δ μm / ◇ ( ) -- >
<!-- < el-button style = "margin-top: 20px;margin-left: 10px;" type = "primary" size = "small" @click ="insertThestring()" > 计算重量 < / el -button > -- >
< / el-col >
< 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-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 = "fals e" :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="DYbtn" > 典艺
< / el -button >
< el-button :disabled = "disabled" type = "warning " size = "small" icon = "el-icon-tickets " @click ="WYbtn" > 完艺
< / el -button >
< el-button :disabled = "disabled" type = "danger " size = "small" icon = "el-icon-del ete " @click ="deleteTable" > 删除
< / 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 v-if = "tru e" :disabled="disabled" type="warning" size="small" icon="el-icon-tickets" @click="DYbtn" > 原有 < / el -button >
< el-button :disabled = "disabled" type = "warning" size = "small" icon = "el-icon-tickets" @click ="WYbtn" > 完艺 < / el -button >
< el-button :disabled = "disabled" type = "danger " size = "small" icon = "el-icon-delete " @click ="deleteTable" > 删除 < / 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-tick ets " @click ="saveApprove" > 保存 < / el -button >
< / el-button-group >
< / el-row >
< el-table
@@ -306,72 +301,29 @@
< / el-form >
< / 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-row >
< el-col :span = "10 " >
< el-form-item label = "典型工艺零件分类 " >
< el-select
v-model = "typicalClassValue"
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-col :span = "24 " >
< el-form-item label = "零件图号 " >
< el-input v-model = "partNameValue1" size="small" placeholder="输入零件图号" style="width: 150px" clearable / >
< el-button type = "success" size = "small" icon = "el-icon-search" style = "margin-left: 20px" @click ="searchProcess()" > 查询 < / el -button >
< / el-form-item >
< / 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-col :span = "10 " >
< el-form-item label = "典型工艺 号" >
< el-select
id = "num"
v-model = "processNumValue"
placeholder = "工艺号"
style = "width:150px"
size = "small"
@change ="numChange()" >
< el-col :span = "24 " >
< el-form-item label = "零件图 号" >
< el-select id = "num" v-model = "processNumValue" placeholder="零件图号" style="width:150px" size="small" @change="numChange()" >
< el -option
v-for = "item in partName1"
:key = "item.value"
:label = "item.num "
:label = "item.label "
:value = "item.value" / >
< / el-select >
< el-button size = "small" style = "margin-left: 20px" @click ="processCopy()" > 工艺拷贝 < / el -button >
< / el-form-item >
< / 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-table
:data = "tableData2"
@@ -381,7 +333,7 @@
size = "mini" >
< el-table-column align = "center" label = "工艺序号" width = "80" >
< template slot -scope = " scope " >
{ { scope . row . 工艺序号 } }
{ { scope . row . 工序顺序 } }
< / template >
< / el-table-column >
< el-table-column align = "center" label = "工艺名称" width = "180" >
@@ -472,12 +424,7 @@
< el-button size = "small" @click ="processCopy1()" > 工艺拷贝 < / el -button >
< / el-col >
< / el-row >
< el-table
:data = "tableData4"
style = "width: 97%;max-height: 250px;margin-top: 15px"
size = "mini"
border
height = "250px" >
< el-table :data = "tableData4" style = "width: 97%;max-height: 250px;margin-top: 15px" size = "mini" border height = "250px" >
< el-table-column align = "center" label = "工艺序号" width = "80" >
< template slot -scope = " scope " >
{ { scope . row . 工序顺序 } }
@@ -552,6 +499,8 @@
< script >
import '@/icon/iconfont.css'
import {
numChange ,
searchProcess11 ,
WeightCopy ,
initCraftmen ,
getPartnames1 ,
@@ -562,8 +511,6 @@ import {
searchMaterial ,
typicalProcess ,
initTolerance ,
FcK ,
searchProcess ,
searchWYgongyi ,
gongyiCopy ,
initPerson ,
@@ -1099,67 +1046,29 @@ export default {
this . remark1 = ''
this . tuhaoValue = ''
} ,
classChange ( ) { // 当分类改变时,获取零件名称和典型工艺流水号
this . partNameValue1 = ''
// 典艺工艺查询
searchProcess ( ) {
this . processNumValue = ''
for ( let i = 0 ; i < this . typicalClass . length ; i ++ ) {
if ( this . typicalClassValue === this . typicalClass [ i ] . value ) {
this . serialNumValue1 = this . serialNum1 [ i ] . value
FcK ( this . serialNumValue1 ) . then ( response => {
this . partName1 = [ ]
this . processNum = [ ]
this . remark = response . data [ 0 ] . 备注
for ( let j = 0 ; j < response . data . length ; j ++ ) {
this . partName1 . push ( {
label : response . data [ j ] . 典型工艺名称 ,
num : response . data [ j ] . 典型工艺号 ,
value : response . data [ j ] . 典型工艺流水号
} )
}
this . partName1 = [ ]
this . tableData2 = [ ]
searchProcess11 ( this . partNameValue1 ) . then ( response => {
for ( let i = 0 ; i < response . data . length ; i ++ ) {
this . partName1 . push ( {
label : response . data [ i ] . 零件图号 ,
value : response . data [ i ] . 典艺流水号
} )
}
}
} ,
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 === '' ) {
this . $message . error ( '请在主界面选择一个零件作为被拷贝对象' )
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 ] . 工艺要求
selectRequest ( this . tableData [ i ] . 工序流水号 , this . tableData [ i ] . 工艺计划流水号 , this . tableData2 [ i ] . 工艺编号 , this . tableData2 [ i ] . 工艺序号 , this . tableData2 [ i ] . 工艺要求 ) . then ( response => {
} )
hardEdit ( this . tableData [ i ] . 工序流水号 , this . tableData2 [ i ] . 工艺难度等级 ) . then ( response => {
} )
this . dialogFormVisible = false
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 ] . 工艺难度等级 )
}
this . dialogFormVisible = false
}
} ,
searchProcess1 ( ) { // 完艺工艺查询
@@ -1310,8 +1218,7 @@ export default {
this . str = this . str + this . processRequestValue
this . tableData [ this . index ] . 工艺要求 = this . str
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 ( ) { // 计算公差
this . tolerance = ''