序间外协
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user