序间外协

This commit is contained in:
zhangdingyu
2019-11-21 09:30:35 +08:00
parent ca0ccecf47
commit 55a2bb592a
5 changed files with 50 additions and 4 deletions

View File

@@ -529,7 +529,8 @@ import {
TableAddLi,
getPartnames3,
getPartnames4,
modifyRemark
modifyRemark,
detailInfo
} from '@/api/ManufacturingCenter/ProcessPlanningNew'
import elInput from 'element-ui/packages/input'
import { mapGetters } from 'vuex'
@@ -1192,6 +1193,21 @@ export default {
searchDetail() {
if (this.partNumValue !== '' && this.partNumValue !== null) {
this.loading0 = true
detailInfo(this.partNumValue).then(response => {
if (response.data.length !== 0) {
this.typeValue = response.data[0].零件类型名称
this.partName = response.data[0].零件名称
this.batchNum = response.data[0].批次数量
this.material = response.data[0].材料流水号
this.materialName = response.data[0].材料
this.spec = response.data[0].原材料规格
if (response.data[0].重量 === null) {
this.weight = ''
} else {
this.weight = response.data[0].重量
}
}
})
mainTable(this.partNumValue).then(response => {
this.tableData = []
for (let i = 0; i < response.data.length; i++) {

View File

@@ -68,7 +68,8 @@
</el-col>
<el-col :span="14">
<el-card>
<el-table v-loading="loading2" :data="tableData2" :row-class-name="tableData1ClassName" height="635" style="width: 100%;" border element-loading-text="拼命加载中" size="small">
<el-button size="small" type="primary" style="margin: 10px" @click="saveRowPrice()">保存</el-button>
<el-table v-loading="loading2" :data="tableData2" :row-class-name="tableData1ClassName" height="580" style="width: 100%;" border element-loading-text="拼命加载中" size="small">
<el-table-column label="序号" type="index" align="center" width="50"/>
<el-table-column label="加工状态" width="100" align="center">
<template slot-scope="scope">
@@ -111,7 +112,7 @@
</template>
<script>
import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2 } from '@/api/Outsourcing/PreorderAssociation'
import { machine, getToolNum, getNum, searchTable, searchTable2, edit, edit2, saveRowPrice } from '@/api/Outsourcing/PreorderAssociation'
export default {
data() {
return {
@@ -324,6 +325,23 @@ export default {
})
}
},
// 保存行价格
saveRowPrice() {
if (this.tableData2.length === 0) {
this.$message.error('请选择零件')
} else {
this.a = 0
for (let i = 0; i < this.tableData2.length; i++) {
saveRowPrice(this.tableData2[i].工序流水号, 0, this.tableData2[i].工艺计划流水号, 0).then(response => {
this.a += parseInt(response.data[0].result)
if (this.a === this.tableData2.length) {
this.$message.success('保存成功')
this.searchTable()
}
})
}
}
},
handleSizeChange1(val) {
this.pageCurrent1 = 1
this.pageSize1 = val