生产管理接口联调

dev-scheduling
jinna 3 months ago
parent 33450c06d0
commit 5519ec49e8
  1. 52
      src/api/productionManagement/productionMonitoring.js
  2. 112
      src/views/productionManagement/components/closedDialog.vue
  3. 150
      src/views/productionManagement/components/productionMonitoringDialog.vue
  4. 125
      src/views/productionManagement/productionMonitoring.vue

@ -12,4 +12,54 @@ export const getList = (current, size, params) => {
}); });
}; };
// // 调整优先级 /
export const updatePrioritye = data => {
return request({
url: '/blade-desk/workOrder/updatePrioritye',
method: 'post',
data: data,
});
};
// 分批
export const inBatches = data => {
return request({
url: '/blade-desk/workOrder/inBatches',
method: 'post',
data: data,
});
};
// 获取分批详情
export const batchesPrepare = woId => {
return request({
url: `/blade-desk/workOrder/batchesPrepare/${woId}`,
method: 'get',
});
};
// 获取转外协所需数据
export const getListProProcess = data => {
return request({
url: '/blade-desk/workOrder/listProProcess',
method: 'post',
data: data,
});
};
// 转外协 /
export const transferBill = data => {
return request({
url: '/blade-desk/workOrder/transferBill',
method: 'post',
data: data,
});
};
// 关闭 /
export const updateStatus = data => {
return request({
url: '/blade-desk/workOrder/updateStatus',
method: 'post',
data: data,
});
};

@ -1,45 +1,91 @@
<template> <template>
<el-dialog title="关闭" append-to-body :modelValue="showClose" @close="closeDialog"> <el-dialog title="关闭" append-to-body :modelValue="showClose" @close="closeDialog" width="30%">
<el-form :model="closeForm" :rules="closeRules" label-width="100px"> <!-- <el-form :model="closeForm" :rules="closeRules" label-width="70px" ref="form">
<el-form-item label="备注" prop="memo"> <el-form-item label="备注" prop="memo">
<el-input type="textarea" placeholder="请输入备注" v-model="closeForm.memo"></el-input> <el-input type="textarea" placeholder="请输入备注" v-model="closeForm.memo" :rows="4"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form> -->
<template #footer> <avue-form :option="option" v-model="closeForm" ref="form"></avue-form>
<span class="dialog-footer"> <template #footer>
<el-button @click="closeDialog"> </el-button> <span class="dialog-footer">
<el-button type="primary" @click="closeDialog"> </el-button> <el-button @click="closeDialog"> </el-button>
</span> <el-button type="primary" @click="submit()" :loading="loadingBtn"> </el-button>
</template> </span>
</el-dialog> </template>
</el-dialog>
</template> </template>
<script> <script>
import { updateStatus } from '@/api/productionManagement/productionMonitoring';
export default { export default {
props: { props: {
showClose: { showClose: {
type: Boolean, type: Boolean,
default: false default: false,
},
}, },
data() { itemData: {
return { type: Array,
closeForm: {}, default: [],
closeRules: {
memo:[{required:true,message:'请输入备注',trigger:'blur'}],
}
}
}, },
mounted() { },
data() {
return {
loadingBtn: false,
closeForm: {},
closeRules: {
memo: [{ required: true, message: '请输入备注', trigger: 'blur' }],
},
option: {
submitBtn: false,
emptyBtn: false,
column: [
{
label: '备注',
prop: 'memo',
type: 'textarea',
span: 24,
rows: 2,
rules: [
{
required: true,
message: '请输入',
trigger: 'blur',
},
],
},
],
},
};
},
mounted() {},
methods: {
//
closeDialog() {
this.$emit('closeDialog');
},
submit() {
this.$refs.form.validate((valid, done, msg) => {
if (valid) {
this.loadingBtn = true;
let query = {
idArr: this.itemData.map(item => item.woId),
status: 0,
memo: this.closeForm.memo,
};
updateStatus(query).then(res => {
this.$message.success('操作成功!');
this.loadingBtn = false;
this.$emit('closeDialog',true);
});
} else {
console.log('error submit!!');
return false;
}
});
}, },
methods: { },
// };
closeDialog() {
this.$emit('closeDialog');
},
}
}
</script> </script>
<style></style> <style></style>

@ -1,73 +1,97 @@
<template> <template>
<el-dialog title="优先级调整" append-to-body :modelValue="openShow" width="30%" @close="closeDialog"> <el-dialog
<el-form ref="form" :model="form" label-width="120px"> title="优先级调整"
<el-form-item label="当前优先级:">一级</el-form-item> append-to-body
<el-form-item label="设置优先级:" prop="value1" required> :modelValue="openShow"
<el-select v-model="form.value1" placeholder="请选择" > width="30%"
<el-option @close="closeDialog"
label="一级" >
:value="1"> <!-- <el-form ref="form" :model="form" label-width="120px">
</el-option> <el-form-item label="设置优先级:" prop="value1" required>
<el-option <el-select v-model="form.value1" placeholder="请选择">
label="二级" <el-option label="一级" :value="1"> </el-option>
:value="2"> <el-option label="二级" :value="2"> </el-option>
</el-option> <el-option label="三级" :value="3"> </el-option>
<el-option </el-select>
label="三级" </el-form-item>
:value="3"> </el-form> -->
</el-option> <avue-form :option="option" ref="form"></avue-form>
</el-select>
</el-form-item> <template #footer>
</el-form> <span class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<template #footer> <el-button type="primary" @click="submit"> </el-button>
<span class="dialog-footer"> </span>
<el-button @click="closeDialog"> </el-button> </template>
<el-button type="primary" @click="submit"> </el-button> </el-dialog>
</span>
</template>
</el-dialog>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
showDialog: { showDialog: {
type: Boolean, type: Boolean,
default: false default: false,
},
}, },
data() { },
return { data() {
openShow:false, return {
form:{ openShow: false,
value1:'' form: {
} value1: '',
} },
}, option: {
mounted(){ submitBtn: false,
this.openShow = this.showDialog emptyBtn: false,
column: [
{
label: '优先级',
prop: 'name',
type: 'select',
span:24,
dicUrl: '/blade-system/dict/dictionary?code=orderPriority',
props: {
label: 'dictValue',
value: 'dictKey',
},
rules: [
{
required: true,
message: '请选择',
trigger: 'blur',
},
],
},
],
},
};
},
mounted() {
this.openShow = this.showDialog;
},
methods: {
closeDialog() {
this.openShow = false;
this.$emit('closeDialog');
}, },
methods:{ submit() {
closeDialog(){ //msg
this.openShow = false this.$refs.form.validate((valid, done, msg) => {
this.$emit('closeDialog'); if (valid) {
}, this.$emit('submitPriority', this.form);
submit() { this.closeDialog();
if (!this.form.value1) { } else {
this.$message.warning('请选择优先级'); console.log('error submit!!');
return; return false;
}
this.$emit('submitPriority', {
priority: this.form.value1
});
this.closeDialog();
} }
});
},
},
watch: {
showDialog(val) {
this.openShow = val;
}, },
},
watch:{ };
showDialog(val){
this.openShow = val
} }
}
</script> </script>
<style lang="scss" scoped></style> <style lang="scss" scoped></style>

@ -20,7 +20,7 @@
<template #menu-left> <template #menu-left>
<el-button type="primary" @click="handlePrintTags">过程记录打印</el-button> <el-button type="primary" @click="handlePrintTags">过程记录打印</el-button>
<el-button type="primary" @click="handlePrintTags">打印标签</el-button> <el-button type="primary" @click="handlePrintTags">打印标签</el-button>
<el-button type="primary" @click="priorityFn">优先级调整</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-printer" plain @click="handlePrint">打印</el-button>
<el-button type="primary" icon="el-icon-monitor" @click="handleOutsource(null, 'all')">批量外协</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> --> <!-- <el-button type="success" icon="el-icon-download">导出</el-button> -->
@ -92,8 +92,6 @@
</el-dropdown-menu> --> </el-dropdown-menu> -->
</el-dropdown> </el-dropdown>
</template> </template>
</avue-crud> </avue-crud>
<!-- 打印标签 --> <!-- 打印标签 -->
<el-dialog append-to-body v-model="printDialog" title="打印标签"> <el-dialog append-to-body v-model="printDialog" title="打印标签">
@ -128,7 +126,12 @@
<!-- 分批弹窗 --> <!-- 分批弹窗 -->
<batches-dialog :show-batches="showBatches" @closeDialog="closeDialog"></batches-dialog> <batches-dialog :show-batches="showBatches" @closeDialog="closeDialog"></batches-dialog>
<!-- 关闭弹窗 --> <!-- 关闭弹窗 -->
<closed-dialog :show-close="showClose" @closeDialog="closeDialog"></closed-dialog> <closed-dialog
v-if="showClose"
:show-close="showClose"
@closeDialog="closeDialog"
:itemData="itemData"
></closed-dialog>
<!-- 退货弹窗 --> <!-- 退货弹窗 -->
<return-dialog :show-return="showReturn" @closeDialog="closeDialog"></return-dialog> <return-dialog :show-return="showReturn" @closeDialog="closeDialog"></return-dialog>
<!-- 调度标注 --> <!-- 调度标注 -->
@ -138,6 +141,7 @@
></scheduling-dialog> ></scheduling-dialog>
<!-- 异常处理 --> <!-- 异常处理 -->
<abnormalDialog :show-abnormal="showAbnormal" @closeDialog="closeDialog"></abnormalDialog> <abnormalDialog :show-abnormal="showAbnormal" @closeDialog="closeDialog"></abnormalDialog>
<!-- 优先级调整 -->
<productionMonitoringDialog <productionMonitoringDialog
:showDialog="isPriorityOpen" :showDialog="isPriorityOpen"
v-if="isPriorityOpen" v-if="isPriorityOpen"
@ -157,7 +161,11 @@ import schedulingDialog from './components/schedulingDialog.vue';
import abnormalDialog from './components/abnormalDialog.vue'; import abnormalDialog from './components/abnormalDialog.vue';
import productionMonitoringDialog from './components/productionMonitoringDialog.vue'; import productionMonitoringDialog from './components/productionMonitoringDialog.vue';
import { getList } from '@/api/productionManagement/productionMonitoring'; import {
getList,
updatePrioritye,
updateStatus,
} from '@/api/productionManagement/productionMonitoring';
export default { export default {
components: { components: {
@ -272,42 +280,12 @@ export default {
search: true, search: true,
sortable: true, sortable: true,
overHidden: true, overHidden: true,
width: 200, width: 200, //order_status
dicUrl: '/blade-system/dict/dictionary?code=order_status',
dicData: [ props: {
{ label: 'dictValue',
value: 2, value: 'dictKey',
label: '待生产', },
},
{
value: 3,
label: '生产中',
},
{
value: 4,
label: '检验中',
},
{
value: 6,
label: '审理中',
},
{
value: 5,
label: '工艺变更',
},
{
value: 19,
label: '已返工',
},
{
value: 15,
label: '已完成',
},
{
value: 21,
label: '已作废',
},
],
}, },
{ {
label: '车间订单号', label: '车间订单号',
@ -472,28 +450,11 @@ export default {
overHidden: true, overHidden: true,
width: 200, width: 200,
searchLabelWidth: 100, searchLabelWidth: 100,
dicData: [ dicUrl: '/blade-system/dict/dictionary?code=orderPriority',
{ props: {
value: 1, label: 'dictValue',
label: '正常-白色', value: 'dictKey',
}, },
{
value: 2,
label: '项目要求日期急件-橙色',
},
{
value: 3,
label: '合同急件-黄色',
},
{
value: 4,
label: '绩效零件-青色',
},
{
value: 5,
label: '调度标注急件-蓝色',
},
],
}, },
{ {
label: '需求部门', label: '需求部门',
@ -653,21 +614,32 @@ export default {
}, },
], ],
}, },
itemData: [], //
}; };
}, },
mounted() {}, mounted() {},
methods: { methods: {
// //
priorityFn(row) { priorityFn(row) {
this.rowItem = row; this.itemData = [row];
console.log(row.runStatus, 123); this.isPriorityOpen = true;
},
priorityFnBatch() {
if (this.selectionList.length == 0) {
return this.$message.error('请先选择数据');
}
this.itemData = this.selectionList;
this.isPriorityOpen = true; this.isPriorityOpen = true;
// console.log(runStatus,123)
}, },
handlePrioritySubmit(data) { handlePrioritySubmit(data) {
this.$message.success( console.log('优先级调整', this.itemData);
`优先级已调整为${data.priority === 1 ? '一级' : data.priority === 2 ? '二级' : '三级'}` // updatePrioritye().then(res=>{
);
// })
// this.$message.success(
// `${data.priority === 1 ? '' : data.priority === 2 ? '' : ''}`
// );
}, },
selectionChange(val) { selectionChange(val) {
this.selectionList = val; this.selectionList = val;
@ -705,9 +677,11 @@ export default {
this.showScheduling = true; this.showScheduling = true;
}, },
// //
handleClose() { handleClose(row) {
this.itemData = [row];
this.showClose = true; this.showClose = true;
}, },
// //
handleSintering() { handleSintering() {
this.$confirm('确定将此订单转到烧结中心吗?', '是否继续', { this.$confirm('确定将此订单转到烧结中心吗?', '是否继续', {
@ -760,7 +734,7 @@ export default {
this.showAbnormal = true; this.showAbnormal = true;
}, },
// //
closeDialog() { closeDialog(type) {
this.showDialog = false; this.showDialog = false;
this.monitorDialog = false; this.monitorDialog = false;
this.showBatches = false; this.showBatches = false;
@ -769,6 +743,9 @@ export default {
this.showScheduling = false; this.showScheduling = false;
this.showAbnormal = false; this.showAbnormal = false;
this.isPriorityOpen = false; this.isPriorityOpen = false;
if (type) {
this.onLoad(this.page, this.query);
}
}, },
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
@ -799,7 +776,11 @@ export default {
}, },
onLoad(page, params = {}) { onLoad(page, params = {}) {
// this.loading = true; // this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { getList(
page.currentPage,
page.pageSize,
Object.assign(params, this.query, { yieldType: 1 })
).then(res => {
this.data = res.data.data.records; this.data = res.data.data.records;
// this.loading = false; // this.loading = false;
this.page.total = res.data.data.total; this.page.total = res.data.data.total;

Loading…
Cancel
Save