生产计划

This commit is contained in:
Vergil
2020-04-27 15:11:00 +08:00
parent 568100be44
commit bb585e5d1b

View File

@@ -186,13 +186,13 @@
<el-checkbox v-model="checked_UrgentItem" style="margin-top:10px;margin-right:10px">是否加急</el-checkbox> <el-checkbox v-model="checked_UrgentItem" style="margin-top:10px;margin-right:10px">是否加急</el-checkbox>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="选中零件进行备料投产" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="选中零件进行备料投产" placement="top">
<el-button :loading="listLoading3" type="primary" size="small" plain @click="production10">备料投产</el-button> <el-button :loading="production10_Loading" type="primary" size="small" plain @click="production10">备料投产</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="选中零件进行投产" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="选中零件进行投产" placement="top">
<el-button :loading="listLoading3" type="warning" size="small" plain @click="production">投产</el-button> <el-button :loading="production_Loading" type="warning" size="small" plain @click="production">投产</el-button>
</el-tooltip> </el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="打回到零件分配" placement="top"> <el-tooltip :open-delay="1200" effect="dark" content="打回到零件分配" placement="top">
<el-button :loading="listLoading3" type="danger" size="small" style="margin-left: 10px" plain @click="back">打回</el-button> <el-button :loading="back_Loading" type="danger" size="small" style="margin-left: 10px" plain @click="back">打回</el-button>
</el-tooltip> </el-tooltip>
<el-button icon="el-icon-circle-plus-outline" type="distribution" size="small" style="float:right;" @click="openUrgentItem()">加急件</el-button> <el-button icon="el-icon-circle-plus-outline" type="distribution" size="small" style="float:right;" @click="openUrgentItem()">加急件</el-button>
</div> </div>
@@ -394,6 +394,9 @@ import Cookie from 'js-cookie'
export default { export default {
data() { data() {
return { return {
production10_Loading: false,
production_Loading: false,
back_Loading: false, // 20200427↑
openUrgentItem_disable: false, openUrgentItem_disable: false,
checked_hebing: true, checked_hebing: true,
checked_UrgentItem: false, checked_UrgentItem: false,
@@ -984,18 +987,26 @@ export default {
}, },
// 投产 // 投产
production() { production() {
this.production_Loading = true
var that = this
setTimeout(function() {
that.production_Loading = false
}, 5000)
this.result = 0 this.result = 0
this.UrgentItem = 0 this.UrgentItem = 0
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) { if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
this.production_Loading = false
this.$message.error('请输入加工结束时间') this.$message.error('请输入加工结束时间')
} else { } else {
this.shijiancuo1 = Date.parse(this.time_machiningStart) this.shijiancuo1 = Date.parse(this.time_machiningStart)
this.shijiancuo = Date.parse(this.time_machiningFinish) this.shijiancuo = Date.parse(this.time_machiningFinish)
this.jieguo = this.shijiancuo1 - this.shijiancuo this.jieguo = this.shijiancuo1 - this.shijiancuo
if (this.jieguo >= 0) { if (this.jieguo >= 0) {
this.production_Loading = false
this.$message.error('加工结束时间应大于开始时间') this.$message.error('加工结束时间应大于开始时间')
} else { } else {
if (this.multipleSelection.length === 0) { if (this.multipleSelection.length === 0) {
this.production_Loading = false
this.$message.error('请至少选择一个零件') this.$message.error('请至少选择一个零件')
} else { } else {
if (this.checked_UrgentItem === true) { if (this.checked_UrgentItem === true) {
@@ -1104,18 +1115,26 @@ export default {
}, },
// 备料投产 // 备料投产
production10() { production10() {
this.production10_Loading = true
var that = this
setTimeout(function() {
that.production10_Loading = false
}, 5000)
this.result = 0 this.result = 0
this.UrgentItem = 0 this.UrgentItem = 0
if (this.time_machiningFinish === '' || this.time_machiningFinish === null) { if (this.time_machiningFinish === '' || this.time_machiningFinish === null) {
this.production10_Loading = false
this.$message.error('请输入加工结束时间') this.$message.error('请输入加工结束时间')
} else { } else {
this.shijiancuo1 = Date.parse(this.time_machiningStart) this.shijiancuo1 = Date.parse(this.time_machiningStart)
this.shijiancuo = Date.parse(this.time_machiningFinish) this.shijiancuo = Date.parse(this.time_machiningFinish)
this.jieguo = this.shijiancuo1 - this.shijiancuo this.jieguo = this.shijiancuo1 - this.shijiancuo
if (this.jieguo >= 0) { if (this.jieguo >= 0) {
this.production10_Loading = false
this.$message.error('加工结束时间应大于开始时间') this.$message.error('加工结束时间应大于开始时间')
} else { } else {
if (this.multipleSelection.length === 0) { if (this.multipleSelection.length === 0) {
this.production10_Loading = false
this.$message.error('请至少选择一个零件') this.$message.error('请至少选择一个零件')
} else { } else {
if (this.checked_UrgentItem === true) { if (this.checked_UrgentItem === true) {
@@ -1223,7 +1242,13 @@ export default {
} }
}, },
back() { back() {
this.back_Loading = true
var that = this
setTimeout(function() {
that.back_Loading = false
}, 5000)
if (this.multipleSelection.length === 0) { if (this.multipleSelection.length === 0) {
this.back_Loading = false
this.$message.error('请至少选择一个零件') this.$message.error('请至少选择一个零件')
} else { } else {
this.a = 0 this.a = 0