更新
This commit is contained in:
@@ -162,8 +162,8 @@
|
||||
type="danger"
|
||||
icon="el-icon-position"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="forceFinish(crud.selections[0])"
|
||||
:disabled="is_finished(crud.selections)"
|
||||
@click="forceFinish(crud.selections)"
|
||||
>
|
||||
强制完成
|
||||
</el-button>
|
||||
@@ -266,8 +266,8 @@
|
||||
style="width: 200px"
|
||||
clearable
|
||||
filterable
|
||||
@change="change"
|
||||
placeholder="请选择"
|
||||
@change="change"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.PDM_BI_SHIFTTYPE"
|
||||
@@ -623,11 +623,24 @@ export default {
|
||||
}
|
||||
},
|
||||
// 强制完成
|
||||
forceFinish(data) {
|
||||
forceFinish(rows) {
|
||||
var i = Number(0)
|
||||
rows.forEach((item) => {
|
||||
crudProduceshiftorder.forceFinish({ row: item }).then(res => {
|
||||
i = i + 1
|
||||
if (i === rows.length) {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
/*
|
||||
|
||||
crudProduceshiftorder.forceFinish({ row: data }).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
})*/
|
||||
},
|
||||
// 取两位小数点
|
||||
rounding(row, column) {
|
||||
@@ -651,6 +664,25 @@ export default {
|
||||
return true
|
||||
}
|
||||
},
|
||||
|
||||
// 强制完成禁用条件
|
||||
is_finished(rows) {
|
||||
var length = rows.length
|
||||
if (length > 1) {
|
||||
var flag = false
|
||||
for (let i = 0; i < rows.length; i++) {
|
||||
if (rows[i].order_status === '04') {
|
||||
flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
return flag
|
||||
} else if (length === 1 && rows[0].order_status !== '04') {
|
||||
return false
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
// 新增编辑给form表单物料相关信息赋值
|
||||
setMaterValue(row) {
|
||||
this.form.material_id = row.material_id
|
||||
@@ -666,13 +698,17 @@ export default {
|
||||
},
|
||||
// 下发
|
||||
submits(rows) {
|
||||
var i = Number(0)
|
||||
rows.forEach((item) => {
|
||||
var produceorder_id = item.produceorder_id
|
||||
crudProduceshiftorder.submits({ produceorder_id: produceorder_id }).then(res => {
|
||||
i = i + 1
|
||||
if (i === rows.length) {
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
}
|
||||
})
|
||||
})
|
||||
this.crud.notify('下发成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
},
|
||||
add() {
|
||||
this.addShow = true
|
||||
|
||||
Reference in New Issue
Block a user