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