parent
c8f5dad79d
commit
d439bbd2c3
4 changed files with 467 additions and 7394 deletions
@ -1,98 +1,137 @@ |
|||||||
<template> |
<template> |
||||||
<el-dialog title="异常申报" append-to-body :modelValue="showAbnormal" @close="closeDialog" class="dialog"> |
<el-dialog |
||||||
|
title="异常申报" |
||||||
<el-form :model="batchesForm" :rules="batchesRules" label-width="100px" class="form" ref="batchesFormRef"> |
append-to-body |
||||||
<el-form-item class="icon-right"> |
:modelValue="showAbnormal" |
||||||
<el-popover placement="right-start" :width="200" trigger="hover" append-to-body="false" |
@close="closeDialog" |
||||||
content="需要重新排产订单会释放已排产资源,在人工处理异常后进行排产"> |
class="dialog" |
||||||
<template #reference> |
width="30%" |
||||||
<img src="@/assets/question_mark.png" alt="说明" class="img" /> |
> |
||||||
</template> |
<el-form |
||||||
</el-popover> |
:model="batchesForm" |
||||||
</el-form-item> |
:rules="batchesRules" |
||||||
<el-form-item label="异常描述" prop="memo"> |
label-width="100px" |
||||||
<el-input type="textarea" placeholder="请输入异常描述" v-model="batchesForm.memo"></el-input> |
class="form" |
||||||
</el-form-item> |
ref="batchesFormRef" |
||||||
<el-form-item label="重新排产" prop="radio"> |
> |
||||||
<el-radio-group v-model="batchesForm.radio"> |
<el-form-item class="icon-right"> |
||||||
<el-radio v-model="radio" label="1">需要</el-radio> |
<el-popover |
||||||
<el-radio v-model="radio" label="2">不需要</el-radio> |
placement="right-start" |
||||||
</el-radio-group> |
:width="200" |
||||||
</el-form-item> |
trigger="hover" |
||||||
<el-form-item label="当前工序" prop="currentProcess"> |
append-to-body="false" |
||||||
<el-radio-group v-model="batchesForm.currentProcess"> |
content="需要重新排产订单会释放已排产资源,在人工处理异常后进行排产" |
||||||
<el-radio v-model="radio" label="1">已完成</el-radio> |
> |
||||||
<el-radio v-model="radio" label="2">未完成</el-radio> |
<template #reference> |
||||||
</el-radio-group> |
<img src="@/assets/question_mark.png" alt="说明" class="img" /> |
||||||
</el-form-item> |
</template> |
||||||
</el-form> |
</el-popover> |
||||||
<template #footer> |
</el-form-item> |
||||||
<span class="dialog-footer"> |
<el-form-item label="异常描述" prop="memo"> |
||||||
<el-button @click="closeDialog">取 消</el-button> |
<el-input |
||||||
<el-button type="primary" @click="closeDialog">确 认</el-button> |
type="textarea" |
||||||
</span> |
placeholder="请输入异常描述" |
||||||
</template> |
v-model="batchesForm.memo" |
||||||
</el-dialog> |
></el-input> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="重新排产" prop="radio"> |
||||||
|
<el-radio-group v-model="batchesForm.radio"> |
||||||
|
<el-radio v-model="radio" label="1">需要</el-radio> |
||||||
|
<el-radio v-model="radio" label="2">不需要</el-radio> |
||||||
|
</el-radio-group> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="当前工序" prop="currentProcess"> |
||||||
|
<el-radio-group v-model="batchesForm.currentProcess"> |
||||||
|
<el-radio v-model="radio" label="1">已完成</el-radio> |
||||||
|
<el-radio v-model="radio" label="2">未完成</el-radio> |
||||||
|
</el-radio-group> |
||||||
|
</el-form-item> |
||||||
|
</el-form> |
||||||
|
<template #footer> |
||||||
|
<span class="dialog-footer"> |
||||||
|
<el-button @click="closeDialog">取 消</el-button> |
||||||
|
<el-button type="primary" @click="submit()">确 认</el-button> |
||||||
|
</span> |
||||||
|
</template> |
||||||
|
</el-dialog> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
|
import { inBatches } from '@/api/productionManagement/productionMonitoring'; |
||||||
|
|
||||||
export default { |
export default { |
||||||
props: { |
props: { |
||||||
showAbnormal: { |
showAbnormal: { |
||||||
type: Boolean, |
type: Boolean, |
||||||
default: false |
default: false, |
||||||
}, |
|
||||||
}, |
}, |
||||||
data() { |
itemData: { |
||||||
return { |
type: Array, |
||||||
isOpen: false, |
default: () => [], |
||||||
batchesForm: {}, |
|
||||||
batchesRules: { |
|
||||||
memo: [{ required: true, message: '请输入异常描述', trigger: 'blur' }], |
|
||||||
radio: [{ required: true, message: '请选择分批原因', trigger: 'blur' }], |
|
||||||
currentProcess: [{ required: true, message: '请选择当前工序', trigger: 'blur' }], |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
}, |
||||||
mounted() { |
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
isOpen: false, |
||||||
|
batchesForm: {}, |
||||||
|
batchesRules: { |
||||||
|
memo: [{ required: true, message: '请输入异常描述', trigger: 'blur' }], |
||||||
|
radio: [{ required: true, message: '请选择分批原因', trigger: 'blur' }], |
||||||
|
currentProcess: [{ required: true, message: '请选择当前工序', trigger: 'blur' }], |
||||||
|
}, |
||||||
|
}; |
||||||
|
}, |
||||||
|
mounted() {}, |
||||||
|
methods: { |
||||||
|
// 关闭弹窗 |
||||||
|
closeDialog() { |
||||||
|
this.$emit('closeDialog'); |
||||||
|
this.$refs.batchesForm.resetFields(); |
||||||
|
this.$refs.batchesForm.clearValidate(); |
||||||
}, |
}, |
||||||
methods: { |
submit() { |
||||||
// 关闭弹窗 |
this.$refs.batchesForm.validate(valid => { |
||||||
closeDialog() { |
if (valid) { |
||||||
this.$emit('closeDialog'); |
// inBatches(this.batchesForm).then((res) => { |
||||||
this.$refs.batchesForm.resetFields() |
// if (res.code == 200) { |
||||||
this.$refs.batchesForm.clearValidate() |
// this.$message.success('操作成功'); |
||||||
}, |
// this.closeDialog(); |
||||||
} |
// } |
||||||
} |
// }); |
||||||
|
} else { |
||||||
|
console.log('error submit!!'); |
||||||
|
return false; |
||||||
|
} |
||||||
|
}); |
||||||
|
}, |
||||||
|
}, |
||||||
|
}; |
||||||
</script> |
</script> |
||||||
|
|
||||||
<style scoped> |
<style scoped> |
||||||
.icon-right { |
.icon-right { |
||||||
position: relative !important; |
position: relative !important; |
||||||
display: block !important; |
display: block !important; |
||||||
text-align: left !important; |
text-align: left !important; |
||||||
height: auto !important; |
height: auto !important; |
||||||
overflow: visible !important; |
overflow: visible !important; |
||||||
} |
} |
||||||
|
|
||||||
.icon-right .img { |
.icon-right .img { |
||||||
position: absolute !important; |
position: absolute !important; |
||||||
right: 10px !important; |
right: 10px !important; |
||||||
top: 50% !important; |
top: 50% !important; |
||||||
transform: translateY(-50%) !important; |
transform: translateY(-50%) !important; |
||||||
width: 20px !important; |
width: 20px !important; |
||||||
height: 20px !important; |
height: 20px !important; |
||||||
cursor: pointer; |
cursor: pointer; |
||||||
display: inline-block !important; |
display: inline-block !important; |
||||||
background: #fff; |
background: #fff; |
||||||
} |
} |
||||||
|
|
||||||
.icon-right .el-form-item__content { |
.icon-right .el-form-item__content { |
||||||
margin-left: 0 !important; |
margin-left: 0 !important; |
||||||
width: 100% !important; |
width: 100% !important; |
||||||
text-align: left !important; |
text-align: left !important; |
||||||
} |
} |
||||||
|
</style> |
||||||
</style> |
|
||||||
|
|||||||
@ -1,110 +1,132 @@ |
|||||||
<template> |
<template> |
||||||
<el-dialog title="分批" append-to-body :modelValue="showBatches" @close="closeDialog" class="dialog"> |
<el-dialog |
||||||
|
title="分批" |
||||||
<el-form :model="batchesForm" :rules="batchesRules" label-width="100px" class="form" ref="batchesForm"> |
append-to-body |
||||||
<el-form-item class="icon-right"> |
:modelValue="showBatches" |
||||||
<el-popover placement="right-start" :width="200" trigger="hover" append-to-body="false"> |
@close="closeDialog" |
||||||
<p>(1)返工:分批后剩余数量零件依据返工订单进行生产</p> |
class="dialog" |
||||||
<p>(2)关闭:分批后自动关闭剩余数量零件的生产</p> |
width="25%" |
||||||
<p>(3)其他:分批后剩余数量零件排产后进行生产</p> |
> |
||||||
<template #reference> |
<el-form |
||||||
<img src="@/assets/question_mark.png" alt="说明" class="img" /> |
:model="batchesForm" |
||||||
</template> |
:rules="batchesRules" |
||||||
</el-popover> |
label-width="100px" |
||||||
</el-form-item> |
class="form" |
||||||
<el-form-item label="分批数量" prop="makeQty"> |
ref="batchesForm" |
||||||
<el-input placeholder="请输入分批数量" v-model="batchesForm.makeQty" type="number" |
> |
||||||
oninput="value=value.replace(/[^\d]/g,'')"></el-input> |
<el-form-item class="icon-right"> |
||||||
</el-form-item> |
<el-popover placement="right-start" :width="200" trigger="hover" append-to-body="false"> |
||||||
<!-- <el-form-item label="车间订单号" prop="woCode"> |
<p>(1)返工:分批后剩余数量零件依据返工订单进行生产</p> |
||||||
<el-input disabled placeholder="请输入车间订单号" v-model="batchesForm.woCode"></el-input> |
<p>(2)关闭:分批后自动关闭剩余数量零件的生产</p> |
||||||
</el-form-item> |
<p>(3)其他:分批后剩余数量零件排产后进行生产</p> |
||||||
<el-form-item label="流程卡号" prop="cardNo"> |
<template #reference> |
||||||
<el-input disabled placeholder="请输入流程卡号" v-model="batchesForm.cardNo"></el-input> |
<img src="@/assets/question_mark.png" alt="说明" class="img" /> |
||||||
</el-form-item> |
</template> |
||||||
<el-form-item label="批次号" prop="batchNo"> |
</el-popover> |
||||||
<el-input disabled placeholder="请输入批次号" v-model="batchesForm.batchNo"></el-input> |
</el-form-item> |
||||||
</el-form-item> |
<el-form-item label="分批数量" prop="makeQty"> |
||||||
<el-form-item label="备注" prop="memo"> |
<!-- <el-input |
||||||
<el-input type="textarea" placeholder="请输入备注" v-model="batchesForm.memo"></el-input> |
placeholder="请输入分批数量" |
||||||
</el-form-item> --> |
v-model="batchesForm.makeQty" |
||||||
<el-form-item label="分批原因" prop="reason"> |
type="number" |
||||||
<el-select placeholder="请选择分批原因" v-model="batchesForm.reason"> |
oninput="value=value.replace(/[^\d]/g,'')" |
||||||
<el-option value="1" label="返工"></el-option> |
></el-input> --> |
||||||
<el-option value="2" label="关闭"></el-option> |
<el-input-number |
||||||
<el-option value="3" label="其他"></el-option> |
v-model="batchesForm.makeQty" |
||||||
</el-select> |
controls-position="right" |
||||||
</el-form-item> |
:min="1" |
||||||
</el-form> |
></el-input-number> |
||||||
<template #footer> |
</el-form-item> |
||||||
<span class="dialog-footer"> |
<el-form-item label="分批原因" prop="reason"> |
||||||
<el-button @click="closeDialog">取 消</el-button> |
<el-select placeholder="请选择分批原因" v-model="batchesForm.reason"> |
||||||
<el-button type="primary" @click="closeDialog">确 认</el-button> |
<el-option value="1" label="返工"></el-option> |
||||||
</span> |
<el-option value="2" label="关闭"></el-option> |
||||||
</template> |
<el-option value="3" label="其他"></el-option> |
||||||
</el-dialog> |
</el-select> |
||||||
|
</el-form-item> |
||||||
|
</el-form> |
||||||
|
<template #footer> |
||||||
|
<span class="dialog-footer"> |
||||||
|
<el-button @click="closeDialog">取 消</el-button> |
||||||
|
<el-button type="primary" @click="submit()">确 认</el-button> |
||||||
|
</span> |
||||||
|
</template> |
||||||
|
</el-dialog> |
||||||
</template> |
</template> |
||||||
|
|
||||||
<script> |
<script> |
||||||
|
import { inBatches } from '@/api/productionManagement/productionMonitoring'; |
||||||
export default { |
export default { |
||||||
props: { |
props: { |
||||||
showBatches: { |
showBatches: { |
||||||
type: Boolean, |
type: Boolean, |
||||||
default: false |
default: false, |
||||||
}, |
|
||||||
}, |
}, |
||||||
data() { |
itemData: { |
||||||
return { |
type: Array, |
||||||
isOpen: false, |
default: () => [], |
||||||
batchesForm: {}, |
|
||||||
batchesRules: { |
|
||||||
makeQty: [{ required: true, message: '请输入分批数量', trigger: 'blur' }], |
|
||||||
reason: [{ required: true, message: '请选择分批原因', trigger: 'blur' }], |
|
||||||
// woCode:[{required:true,message:'请输入车间订单号',trigger:'blur'}], |
|
||||||
// cardNo:[{required:true,message:'请输入流程卡号',trigger:'blur'}], |
|
||||||
// batchNo:[{required:true,message:'请输入批次号',trigger:'blur'}], |
|
||||||
} |
|
||||||
} |
|
||||||
}, |
}, |
||||||
mounted() { |
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
isOpen: false, |
||||||
|
batchesForm: {}, |
||||||
|
batchesRules: { |
||||||
|
makeQty: [{ required: true, message: '请输入分批数量', trigger: 'blur' }], |
||||||
|
reason: [{ required: true, message: '请选择分批原因', trigger: 'blur' }], |
||||||
|
}, |
||||||
|
}; |
||||||
|
}, |
||||||
|
mounted() {}, |
||||||
|
methods: { |
||||||
|
// 关闭弹窗 |
||||||
|
closeDialog() { |
||||||
|
this.$emit('closeDialog'); |
||||||
|
this.$refs.batchesForm.resetFields(); |
||||||
}, |
}, |
||||||
methods: { |
submit() { |
||||||
// 关闭弹窗 |
this.$refs.batchesForm.validate(valid => { |
||||||
closeDialog() { |
if (valid) { |
||||||
this.$emit('closeDialog') |
// inBatches(this.batchesForm).then((res) => { |
||||||
this.$refs.batchesForm.resetFields() |
// if (res.code == 200) { |
||||||
}, |
// this.$message.success('操作成功'); |
||||||
} |
// this.closeDialog(); |
||||||
} |
// } |
||||||
|
// }); |
||||||
|
} else { |
||||||
|
console.log('error submit!!'); |
||||||
|
return false; |
||||||
|
} |
||||||
|
}); |
||||||
|
}, |
||||||
|
}, |
||||||
|
}; |
||||||
</script> |
</script> |
||||||
|
|
||||||
|
|
||||||
<style scoped> |
<style scoped> |
||||||
.icon-right { |
.icon-right { |
||||||
position: relative !important; |
position: relative !important; |
||||||
display: block !important; |
display: block !important; |
||||||
text-align: left !important; |
text-align: left !important; |
||||||
height: auto !important; |
height: auto !important; |
||||||
overflow: visible !important; |
overflow: visible !important; |
||||||
} |
} |
||||||
|
|
||||||
.icon-right .img { |
.icon-right .img { |
||||||
position: absolute !important; |
position: absolute !important; |
||||||
right: 10px !important; |
right: 10px !important; |
||||||
top: 50% !important; |
top: 50% !important; |
||||||
transform: translateY(-50%) !important; |
transform: translateY(-50%) !important; |
||||||
width: 20px !important; |
width: 20px !important; |
||||||
height: 20px !important; |
height: 20px !important; |
||||||
cursor: pointer; |
cursor: pointer; |
||||||
display: inline-block !important; |
display: inline-block !important; |
||||||
background: #fff; |
background: #fff; |
||||||
} |
} |
||||||
|
|
||||||
.icon-right .el-form-item__content { |
.icon-right .el-form-item__content { |
||||||
margin-left: 0 !important; |
margin-left: 0 !important; |
||||||
width: 100% !important; |
width: 100% !important; |
||||||
text-align: left !important; |
text-align: left !important; |
||||||
} |
} |
||||||
|
</style> |
||||||
</style> |
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue