零件工艺制定
This commit is contained in:
@@ -382,3 +382,15 @@ export function searchRecord(num) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 重量拷贝
|
||||||
|
export function WeightCopy(num, num2) {
|
||||||
|
return request({
|
||||||
|
url: '',
|
||||||
|
method: 'post',
|
||||||
|
data: {
|
||||||
|
type: '2',
|
||||||
|
name: '车间生产管理工艺_零件工序_重量拷贝_工艺计划流水号',
|
||||||
|
param: '工艺计划流水号=' + num + '&重量信息=' + num2
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
placeholder="零件号"
|
placeholder="零件号"
|
||||||
size="small"
|
size="small"
|
||||||
@clear="clearDetail"
|
@clear="clearDetail"
|
||||||
@change="searchParts">
|
@change="searchParts();searchDetail()">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in partNum"
|
v-for="item in partNum"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
@@ -59,10 +59,40 @@
|
|||||||
<el-button slot="append" icon="el-icon-cjn-09" @click="saveMaterial"/>
|
<el-button slot="append" icon="el-icon-cjn-09" @click="saveMaterial"/>
|
||||||
</el-input>
|
</el-input>
|
||||||
<span>规格:</span>
|
<span>规格:</span>
|
||||||
<el-input v-show="false" v-model="spec" :readonly="isShow2" style="width:100px" size="small" placeholder="规格"/>
|
<el-input v-model="spec" :readonly="isShow2" style="width:100px" size="small" placeholder="规格"/>
|
||||||
<span>投产总数量:</span>
|
<span>投产总数量:</span>
|
||||||
<el-input v-model="batchNum" readonly size="small" style="width:80px;margin-top:10px;"/>
|
<el-input v-model="batchNum" readonly size="small" style="width:80px;margin-top:10px;"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="4">
|
||||||
|
<span>物料类型:</span>
|
||||||
|
<el-select v-model="materielValue" size="small" style="margin-top: 20px;width:100px" placeholder="物料类型" @change="clear()">
|
||||||
|
<el-option
|
||||||
|
v-for="item in materiel"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"/>
|
||||||
|
</el-select>
|
||||||
|
</el-col>
|
||||||
|
<el-col v-show="materielValue==='1'" :span="20">
|
||||||
|
<span>长:</span>
|
||||||
|
<el-input-number v-model="Length" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
|
||||||
|
<span>宽:</span>
|
||||||
|
<el-input-number v-model="Width" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
|
||||||
|
<span>高:</span>
|
||||||
|
<el-input-number v-model="height1" 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-col>
|
||||||
|
<el-col v-show="materielValue==='2'" :span="20">
|
||||||
|
<span>直径:</span>
|
||||||
|
<el-input-number v-model="diameter" size="small" controls-position="right" style="width:100px;margin-top:20px;"/>
|
||||||
|
<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="Calculation2()">计算重量</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card>
|
<el-card>
|
||||||
@@ -490,6 +520,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import '@/icon/iconfont.css'
|
import '@/icon/iconfont.css'
|
||||||
import {
|
import {
|
||||||
|
WeightCopy,
|
||||||
initCraftmen,
|
initCraftmen,
|
||||||
getPartnames1,
|
getPartnames1,
|
||||||
getPartnames2,
|
getPartnames2,
|
||||||
@@ -531,6 +562,21 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
Result1: '',
|
||||||
|
Result2: '',
|
||||||
|
Length: '',
|
||||||
|
Width: '',
|
||||||
|
height1: '',
|
||||||
|
diameter: '',
|
||||||
|
height2: '',
|
||||||
|
materiel: [{
|
||||||
|
value: '1',
|
||||||
|
label: '方'
|
||||||
|
}, {
|
||||||
|
value: '2',
|
||||||
|
label: '柱'
|
||||||
|
}],
|
||||||
|
materielValue: '1',
|
||||||
total: 0,
|
total: 0,
|
||||||
pageCurrent: 1,
|
pageCurrent: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
@@ -626,6 +672,37 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
clear() {
|
||||||
|
this.Length = ''
|
||||||
|
this.Width = ''
|
||||||
|
this.height1 = ''
|
||||||
|
this.diameter = ''
|
||||||
|
this.height2 = ''
|
||||||
|
},
|
||||||
|
// 长宽高计算
|
||||||
|
Calculation1() {
|
||||||
|
if (this.partNumValue === '' || this.partNumValue === null) {
|
||||||
|
this.$message.error('请先选择一个零件')
|
||||||
|
} else {
|
||||||
|
this.Result1 = ' 长:' + this.Length + ' 宽:' + this.Width + ' 高:' + this.height1 + ' 重量:' + parseInt(this.Length) * parseInt(this.Width) * parseFloat(this.height1)
|
||||||
|
WeightCopy(this.partNumValue, this.Result1).then(response => {
|
||||||
|
console.log(response.data)
|
||||||
|
}).then(() => {
|
||||||
|
this.searchDetail()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 直径高计算
|
||||||
|
Calculation2() {
|
||||||
|
if (this.partNumValue === '' || this.partNumValue === null) {
|
||||||
|
this.$message.error('请先选择一个零件')
|
||||||
|
} else {
|
||||||
|
this.Result2 = Math.pow(parseInt(this.diameter) / 2, 2) * parseFloat(this.height2) * Math.PI
|
||||||
|
this.Result2 = this.Result2.toFixed(2)
|
||||||
|
console.log(this.Result2)
|
||||||
|
console.log(Math.PI)
|
||||||
|
}
|
||||||
|
},
|
||||||
clearDetail() {
|
clearDetail() {
|
||||||
this.checked = false
|
this.checked = false
|
||||||
this.partNumValue = ''
|
this.partNumValue = ''
|
||||||
@@ -785,10 +862,9 @@ export default {
|
|||||||
this.isShow = true
|
this.isShow = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
searchDetail() { // 查主表和上面显示的信息
|
// 查主表和上面显示的信息
|
||||||
if (this.partNumValue === '' || this.partNumValue === null) {
|
searchDetail() {
|
||||||
this.$message.error('请选择零件作为查询对象')
|
if (this.partNumValue !== '' && this.partNumValue !== null) {
|
||||||
} else {
|
|
||||||
this.loading0 = true
|
this.loading0 = true
|
||||||
detailInfo(this.partNumValue).then(response => {
|
detailInfo(this.partNumValue).then(response => {
|
||||||
if (response.data.length !== 0) {
|
if (response.data.length !== 0) {
|
||||||
@@ -963,7 +1039,8 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
processCopy1() { // 完艺工艺拷贝
|
// 完艺工艺拷贝
|
||||||
|
processCopy1() {
|
||||||
this.dialogFormVisible1 = false
|
this.dialogFormVisible1 = false
|
||||||
if (this.partNumValue === '') {
|
if (this.partNumValue === '') {
|
||||||
this.$message.error('请在主界面选择一个零件作为被拷贝对象')
|
this.$message.error('请在主界面选择一个零件作为被拷贝对象')
|
||||||
|
|||||||
@@ -128,8 +128,6 @@
|
|||||||
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<dialog :visible="true"/>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user