生产管理接口联调

dev-scheduling
zhangdi 3 months ago
parent c8f5dad79d
commit d439bbd2c3
  1. 197
      src/views/productionManagement/components/abnormalDialog.vue
  2. 204
      src/views/productionManagement/components/batchesDialog.vue
  3. 7330
      src/views/productionManagement/components/outsourceDialog.vue
  4. 130
      src/views/productionManagement/productionMonitoring.vue

@ -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>

@ -20,76 +20,42 @@
<template #menu-left>
<el-button type="primary" @click="handlePrintTags">过程记录打印</el-button>
<el-button type="primary" @click="handlePrintTags">打印标签</el-button>
<el-button type="primary" @click="priorityFnBatch">优先级调整</el-button>
<!-- <el-button type="primary" icon="el-icon-printer" plain @click="handlePrint">打印</el-button>
<el-button type="primary" icon="el-icon-monitor" @click="handleOutsource(null, 'all')">批量外协</el-button> -->
<!-- <el-button type="success" icon="el-icon-download">导出</el-button> -->
</template>
<template #menu-right>
<el-button type="success" plain @click="queryOrdersHandle('3,4,5,6')">在制品</el-button>
<el-button type="primary" plain @click="queryOrdersHandle('3,4,5,6')">在制品</el-button>
<el-button type="warning" plain @click="queryOrdersHandle('3')">加工中</el-button>
<el-button type="danger" plain @click="queryOrdersHandle('4')">检验中</el-button>
<el-button type="success" plain @click="queryOrdersHandle('15')">已完工</el-button>
<el-button type="primary" @click="queryOrdersHandle('')">全部</el-button>
</template>
<template #menu="scope">
<el-button type="text" @click="clickProduction(scope.row)">生产监控</el-button>
<el-button type="text" @click="handleClose(scope.row)" v-show="scope.row.runStatus < 15"
>关闭</el-button
<el-button type="text" @click="priorityFn(scope.row)" v-if="scope.row.runStatus === 2"
>优先级调整</el-button
>
<el-button
type="text"
@click="handleBatches(scope.row)"
v-if="[2, 3, 4, 6].includes(scope.row.runStatus)"
>分批</el-button
>
<el-button
type="text"
@click="handleAbnormal(scope.row)"
v-if="scope.row.runStatus === 3 || scope.row.runStatus === 4"
>异常申报</el-button
>
<el-button
type="text"
@click="handleOutsource(scope.row)"
v-if="scope.row.runStatus <= 6 && scope.row.runStatus !== 5"
>转外协</el-button
>
<!-- <el-button type="text">打印</el-button> -->
<el-dropdown
@command="handleCommand"
style="margin-top: 4px; margin-left: 12px"
v-show="
scope.row.approvalStatus != 2 &&
scope.row.oemType === -1 &&
scope.row.runStatus < 15 &&
scope.row.runStatus !== 5
"
<el-button type="text" @click="handleClose(scope.row)" v-if="scope.row.runStatus < 15"
>关闭</el-button
>
<span class="el-dropdown-link" style="color: #284c89; cursor: pointer">
更多<i class="el-icon-arrow-down el-icon--right" />
</span>
<template #dropdown>
<el-dropdown-menu>
<!-- <el-dropdown-item @click="handleIssued(scope.row)"
v-show="scope.row.runStatus === 1">下达</el-dropdown-item> -->
<!-- 分批按钮状态2346显示 -->
<el-dropdown-item
@click="handleBatches(scope.row)"
v-if="[2, 3, 4, 6].includes(scope.row.runStatus)"
>分批</el-dropdown-item
>
<el-dropdown-item
@click="handleOutsource(scope.row)"
v-if="scope.row.runStatus <= 6 && scope.row.runStatus !== 5"
>外协</el-dropdown-item
>
<!-- <el-dropdown-item @click="handleReturn(scope.row)"
v-show="scope.row.runStatus === 2">退货</el-dropdown-item> -->
<!-- <el-dropdown-item @click="handleScheduling(scope.row)"
v-show="scope.row.runStatus < 15 && scope.row.priority != 5">调度标注</el-dropdown-item> -->
<!-- <el-dropdown-item @click="handleClose(scope.row)" v-show="scope.row.runStatus < 15">关闭</el-dropdown-item> -->
<!-- <el-dropdown-item @click="handleSintering(scope.row)"
v-show="scope.row.runStatus < 15">转烧结</el-dropdown-item> -->
<el-dropdown-item @click="priorityFn(scope.row)" v-if="scope.row.runStatus === 2"
>优先级调整</el-dropdown-item
>
<el-dropdown-item
@click="handleAbnormal(scope.row)"
v-if="scope.row.runStatus === 3 || scope.row.runStatus === 4"
>异常申报</el-dropdown-item
>
</el-dropdown-menu>
</template>
<!-- <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-show="scope.row.runStatus === 1"
:command="composeValue('send', scope.row)">下达</el-dropdown-item>
</el-dropdown-menu> -->
</el-dropdown>
</template>
</avue-crud>
<!-- 打印标签 -->
@ -112,8 +78,10 @@
</el-dialog>
<!-- 转外协弹窗 -->
<outsource-dialog
:show-dialog="showDialog"
v-if="showOemDialog"
:show-dialog="showOemDialog"
:show-radio="showRadio"
:itemData="itemData"
@closeDialog="closeDialog"
></outsource-dialog>
<!-- 生产监控 -->
@ -123,24 +91,25 @@
@closeDialog="closeDialog"
></production-dialog>
<!-- 分批弹窗 -->
<batches-dialog :show-batches="showBatches" @closeDialog="closeDialog"></batches-dialog>
<batches-dialog
v-if="showBatches"
:show-batches="showBatches"
:itemData="itemData"
@closeDialog="closeDialog"
></batches-dialog>
<!-- 关闭弹窗 -->
<closed-dialog
v-if="showClose"
:show-close="showClose"
@closeDialog="closeDialog"
:itemData="itemData"
></closed-dialog>
<!-- 退货弹窗 -->
<return-dialog :show-return="showReturn" @closeDialog="closeDialog"></return-dialog>
<!-- 调度标注 -->
<scheduling-dialog
:show-scheduling="showScheduling"
@closeDialog="closeDialog"
></scheduling-dialog>
<!-- 异常处理 -->
<abnormalDialog :show-abnormal="showAbnormal" @closeDialog="closeDialog"></abnormalDialog>
<abnormalDialog
v-if="showAbnormal"
:show-abnormal="showAbnormal"
@closeDialog="closeDialog"
></abnormalDialog>
<!-- 优先级调整 -->
<productionMonitoringDialog
:showDialog="isPriorityOpen"
@ -161,9 +130,7 @@ import schedulingDialog from './components/schedulingDialog.vue';
import abnormalDialog from './components/abnormalDialog.vue';
import productionMonitoringDialog from './components/productionMonitoringDialog.vue';
import {
getList,
} from '@/api/productionManagement/productionMonitoring';
import { getList } from '@/api/productionManagement/productionMonitoring';
export default {
components: {
@ -180,7 +147,7 @@ export default {
return {
isPriorityOpen: false,
showAbnormal: false,
showDialog: false,
showOemDialog: true,
showRadio: true,
monitorDialog: false,
showBatches: false,
@ -562,9 +529,13 @@ export default {
value: -1,
label: '场内',
},
{
value: 1,
label: '整单',
},
{
value: 2,
label: '外协',
label: '协',
},
],
},
@ -648,10 +619,12 @@ export default {
if (this.selectionList.length == 0) {
this.$message.error('请先选择数据');
} else {
this.showDialog = true;
this.itemData = this.selectionList;
this.showOemDialog = true;
}
} else {
this.showDialog = true;
this.itemData = [row];
this.showOemDialog = true;
}
},
// 退
@ -667,7 +640,8 @@ export default {
}).then(() => {});
},
//
handleBatches() {
handleBatches(row) {
this.itemData = [row];
this.showBatches = true;
},
//
@ -733,7 +707,7 @@ export default {
},
//
closeDialog(type) {
this.showDialog = false;
this.showOemDialog = false;
this.monitorDialog = false;
this.showBatches = false;
this.showClose = false;

Loading…
Cancel
Save