生产计划下达
This commit is contained in:
@@ -164,6 +164,7 @@
|
||||
<el-table-column label="操作" width="200px" fixed="right" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="checked_hebing"
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handleEdit(scope.$index, scope.row, 'form')">分批投产</el-button>
|
||||
@@ -185,8 +186,8 @@
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
<!--<el-checkbox v-model="checked_baitu" style="margin-top:0px">是否白图</el-checkbox>-->
|
||||
<!--<el-checkbox v-model="checked_gaonandu">是否高难度</el-checkbox>-->
|
||||
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;margin-top:10px" @click="production">投产</el-button>
|
||||
<el-button :loading="listLoading3" type="primary" size="small" style="float:right;" @click="production">投产</el-button>
|
||||
<el-checkbox v-model="checked_hebing" style="float:right;margin-top:10px;margin-right:10px">合并生产</el-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
@@ -331,12 +332,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEntryNameValue, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele } from '@/api/ManufacturingCenter/InitialProduction'
|
||||
import { getEntryNameValue, getToolNum, getNum, getTable, production, getTable1, revisionBatch, editList, dele, production2 } from '@/api/ManufacturingCenter/InitialProduction'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
checked_hebing: true,
|
||||
maxmax: '',
|
||||
clearTable: 0,
|
||||
readonly: true,
|
||||
@@ -801,52 +803,102 @@ export default {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.error('请至少选择一个零件')
|
||||
} else {
|
||||
this.listLoading3 = true
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
if (this.multipleSelection[i].checked_waixie === false) {
|
||||
this.multipleSelection[i].checked_waixie = 1
|
||||
} else {
|
||||
this.multipleSelection[i].checked_waixie = 2
|
||||
}
|
||||
if (this.multipleSelection[i].checked_zhaoji === false) {
|
||||
this.multipleSelection[i].checked_zhaoji = 0
|
||||
} else {
|
||||
this.multipleSelection[i].checked_zhaoji = 1
|
||||
}
|
||||
if (this.multipleSelection[i].checked_dailiao === true) {
|
||||
this.multipleSelection[i].checked_dailiao = 2
|
||||
} else {
|
||||
this.multipleSelection[i].checked_dailiao = 1
|
||||
}
|
||||
if (this.checked_gaonandu === false) {
|
||||
this.checked_gaonandu = 0
|
||||
} else {
|
||||
this.checked_gaonandu = 1
|
||||
}
|
||||
if (this.checked_baitu === false) {
|
||||
this.checked_baitu = 0
|
||||
} else {
|
||||
this.checked_baitu = 1
|
||||
}
|
||||
production(this.multipleSelection[i].组件零件基本件流水号, this.multipleSelection[i].投产类型流水号, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
this.$message.success('投产成功')
|
||||
this.total = 0
|
||||
this.pageList = 1
|
||||
this.getTable()
|
||||
this.checked_baitu = false
|
||||
this.checked_gaonandu = false
|
||||
this.tableData1 = []
|
||||
this.listLoading3 = false
|
||||
} else if (response.data[0].result === '0') {
|
||||
this.listLoading3 = false
|
||||
this.$message.error('投产失败')
|
||||
if (this.checked_hebing === true) {
|
||||
this.listLoading3 = true
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
if (this.multipleSelection[i].checked_waixie === false) {
|
||||
this.multipleSelection[i].checked_waixie = 1
|
||||
} else {
|
||||
this.multipleSelection[i].checked_waixie = 2
|
||||
}
|
||||
})
|
||||
this.shijiancuo1 = 0
|
||||
this.shijiancuo = 0
|
||||
this.jieguo = 0
|
||||
if (this.multipleSelection[i].checked_zhaoji === false) {
|
||||
this.multipleSelection[i].checked_zhaoji = 0
|
||||
} else {
|
||||
this.multipleSelection[i].checked_zhaoji = 1
|
||||
}
|
||||
if (this.multipleSelection[i].checked_dailiao === true) {
|
||||
this.multipleSelection[i].checked_dailiao = 2
|
||||
} else {
|
||||
this.multipleSelection[i].checked_dailiao = 1
|
||||
}
|
||||
if (this.checked_gaonandu === false) {
|
||||
this.checked_gaonandu = 0
|
||||
} else {
|
||||
this.checked_gaonandu = 1
|
||||
}
|
||||
if (this.checked_baitu === false) {
|
||||
this.checked_baitu = 0
|
||||
} else {
|
||||
this.checked_baitu = 1
|
||||
}
|
||||
production2(this.multipleSelection[i].组件零件基本件流水号, this.multipleSelection[i].投产类型流水号, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
this.$message.success('投产成功')
|
||||
this.total = 0
|
||||
this.pageList = 1
|
||||
this.getTable()
|
||||
this.checked_baitu = false
|
||||
this.checked_gaonandu = false
|
||||
this.tableData1 = []
|
||||
this.listLoading3 = false
|
||||
} else if (response.data[0].result === '0') {
|
||||
this.listLoading3 = false
|
||||
this.$message.error('投产失败')
|
||||
}
|
||||
})
|
||||
this.shijiancuo1 = 0
|
||||
this.shijiancuo = 0
|
||||
this.jieguo = 0
|
||||
}
|
||||
} else {
|
||||
this.listLoading3 = true
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
if (this.multipleSelection[i].checked_waixie === false) {
|
||||
this.multipleSelection[i].checked_waixie = 1
|
||||
} else {
|
||||
this.multipleSelection[i].checked_waixie = 2
|
||||
}
|
||||
if (this.multipleSelection[i].checked_zhaoji === false) {
|
||||
this.multipleSelection[i].checked_zhaoji = 0
|
||||
} else {
|
||||
this.multipleSelection[i].checked_zhaoji = 1
|
||||
}
|
||||
if (this.multipleSelection[i].checked_dailiao === true) {
|
||||
this.multipleSelection[i].checked_dailiao = 2
|
||||
} else {
|
||||
this.multipleSelection[i].checked_dailiao = 1
|
||||
}
|
||||
if (this.checked_gaonandu === false) {
|
||||
this.checked_gaonandu = 0
|
||||
} else {
|
||||
this.checked_gaonandu = 1
|
||||
}
|
||||
if (this.checked_baitu === false) {
|
||||
this.checked_baitu = 0
|
||||
} else {
|
||||
this.checked_baitu = 1
|
||||
}
|
||||
production(this.multipleSelection[i].组件零件基本件流水号, this.multipleSelection[i].投产类型流水号, this.multipleSelection[i].数据类型, this.multipleSelection[i].投产总数量, this.time_planStart, this.time_planFinish, this.time_gongyiStart, this.time_gongyiFinish, this.time_dingeStart, this.time_dingeFinish, this.time_planpinghengStart, this.time_planpinghengFinish, this.time_machiningStart, this.time_machiningFinish, this.time_planStart, this.multipleSelection[i].checked_waixie, this.multipleSelection[i].checked_dailiao, this.id, this.multipleSelection[i].材料流水号, this.radio, this.checked_gaonandu, this.multipleSelection[i].checked_zhaoji, this.checked_baitu).then(response => {
|
||||
this.result += parseInt(response.data[0].result)
|
||||
if (this.result === this.multipleSelection.length) {
|
||||
this.$message.success('投产成功')
|
||||
this.total = 0
|
||||
this.pageList = 1
|
||||
this.getTable()
|
||||
this.checked_baitu = false
|
||||
this.checked_gaonandu = false
|
||||
this.tableData1 = []
|
||||
this.listLoading3 = false
|
||||
} else if (response.data[0].result === '0') {
|
||||
this.listLoading3 = false
|
||||
this.$message.error('投产失败')
|
||||
}
|
||||
})
|
||||
this.shijiancuo1 = 0
|
||||
this.shijiancuo = 0
|
||||
this.jieguo = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user