生产管理接口联调

dev-scheduling
zhangdi 2 months ago
parent ea323016ae
commit e770780d79
  1. 2
      src/api/productionManagement/frontTooling.js
  2. 2
      src/api/productionManagement/productionMonitoring.js
  3. 76
      src/views/productionManagement/components/outsourceDialog.vue
  4. 32
      src/views/productionManagement/components/productionMonitoringDialog.vue
  5. 6
      src/views/productionManagement/frontTooling.vue
  6. 20
      src/views/productionManagement/productionMonitoring.vue
  7. 3
      src/views/productionManagement/sinTerWorkOrder/index.vue
  8. 6
      src/views/productionManagement/sjKitPreparation/index.vue

@ -16,6 +16,6 @@ export const setReadStatus = (params) => {
return request({
url: '/blade-desk/sjWorkOrder/setReadStatus',
method: 'post',
data: params,
params: params,
});
};

@ -15,7 +15,7 @@ export const getList = (current, size, params) => {
// 调整优先级 /
export const updatePrioritye = data => {
return request({
url: '/blade-desk/workOrder/updatePrioritye',
url: '/blade-desk/workOrder/updatePriority',
method: 'post',
data: data,
});

@ -6,7 +6,6 @@
:modelValue="showDialog"
width="60%"
@close="closeDialog"
@open="handleOpen"
>
<el-form :model="outsourceForm" :rules="outsourceRules" label-width="70px">
<el-form-item label="备注:" prop="memo">
@ -20,7 +19,6 @@
</el-form>
<el-table :data="outsourceData">
<el-table-column align="center" type="selection"></el-table-column>
<el-table-column align="center" type="index"></el-table-column>
<el-table-column align="center" label="工序号" prop="prWorkPlan.orders"></el-table-column>
<el-table-column
align="center"
@ -33,9 +31,9 @@
prop="prWorkPlan.procedureSet.ppsName"
></el-table-column>
<el-table-column align="center" label="工艺能力" prop="bsCraftAbility.caId">
<el-table-column align="center" label="工艺能力" prop="caId">
<template #default="scope">
<el-select v-model="scope.row.bsCraftAbility.caId">
<el-select v-model="scope.row.caId">
<el-option
v-for="item in craftData"
:key="item.caId"
@ -122,7 +120,9 @@ export default {
],
};
},
mounted() {},
mounted() {
this.getListProProcess();
},
methods: {
getListProProcess() {
let params = {
@ -130,46 +130,18 @@ export default {
runType: 1, //1-2-
};
getListProProcess(params).then(res => {
this.outsourceData = res.data;
this.outsourceData = res.data.data;
});
},
closeDialog() {
this.$emit('closeDialog');
},
//
changeEndTime(val, index) {
console.log('val-------------', val);
console.log('index-------------', index);
if (val) {
if (this.outsourceData.length > index) {
this.outsourceData[index + 1].startTime = val;
}
}
},
//
turnOem() {
if (this.outsourceData.length == 0) {
this.$message.error('当前数据列表为空');
return;
}
var bool = false;
var isCheck = false;
this.outsourceData.forEach(item => {
if (item.handle && (!item.startTime || !item.endTime)) {
bool = true;
}
if (item.handle) {
isCheck = true;
}
});
if (bool) {
this.$message.error('请维护外协工序的计划开始/结束日期!');
return;
}
if (!isCheck) {
this.$message.error('请勾选需要外协的工序');
return;
}
let query={
workOrderRuns:this.itemData,
@ -181,42 +153,6 @@ export default {
this.closeDialog();
});
},
handleOpen() {
this.outsourceData = [
{
// //
prWorkPlan: {
orders: 'GX001',
procedureSet: {
ppsCode: 'PCS001',
ppsName: '粗加工',
},
},
//
bsCraftAbility: {
caId: 1,
},
//
makeMemo: '该工序完成零件外圆粗车加工',
//
reason: '外协无成本优势',
},
{
prWorkPlan: {
orders: 'GX002',
procedureSet: {
ppsCode: 'PCS002',
ppsName: '精加工',
},
},
bsCraftAbility: {
caId: 2,
},
makeMemo: '需使用硬质合金刀具',
reason: '外协厂商无对应高精度铣床',
},
];
},
},
};
</script>

@ -6,16 +6,7 @@
width="30%"
@close="closeDialog"
>
<!-- <el-form ref="form" :model="form" label-width="120px">
<el-form-item label="设置优先级:" prop="value1" required>
<el-select v-model="form.value1" placeholder="请选择">
<el-option label="一级" :value="1"> </el-option>
<el-option label="二级" :value="2"> </el-option>
<el-option label="三级" :value="3"> </el-option>
</el-select>
</el-form-item>
</el-form> -->
<avue-form :option="option" ref="form"></avue-form>
<avue-form v-model="form" :option="option" ref="form"></avue-form>
<template #footer>
<span class="dialog-footer">
@ -26,7 +17,6 @@
</el-dialog>
</template>
<script>
import { updatePrioritye } from '@/api/productionManagement/productionMonitoring';
export default {
props: {
@ -34,12 +24,16 @@ export default {
type: Boolean,
default: false,
},
itemData: {
type: Array,
default: () => [],
},
},
data() {
return {
openShow: false,
form: {
value1: '',
priority: '',
},
option: {
submitBtn: false,
@ -47,9 +41,9 @@ export default {
column: [
{
label: '优先级',
prop: 'name',
prop: 'priority',
type: 'select',
span:24,
span: 24,
dicUrl: '/blade-system/dict/dictionary?code=orderPriority',
props: {
label: 'dictValue',
@ -69,6 +63,7 @@ export default {
},
mounted() {
this.openShow = this.showDialog;
console.log(this.itemData, '传过来的数据');
},
methods: {
closeDialog() {
@ -80,11 +75,14 @@ export default {
this.$refs.form.validate((valid, done, msg) => {
if (valid) {
// this.$emit('submitPriority', this.form);
updatePrioritye().then((res) => {
updatePrioritye({
demandDate: this.form.demandDate,
priority: this.form.priority,
id: this.itemData[0].woId,
}).then(res => {
this.$message.success('操作成功');
this.closeDialog();
});
} else {
console.log('error submit!!');
return false;
@ -100,4 +98,4 @@ export default {
},
};
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped></style>

@ -43,7 +43,7 @@ export default {
height: 'auto',
align: 'center',
calcHeight: 32,
rowKey: 'rlsId',
rowKey: 'woId',
tip: false,
simplePage: true,
searchShow: true,
@ -314,12 +314,12 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
let arr = this.selectionList.map(item => item.id);
let arr = this.selectionList.map(item => item.woId);
let query = {
woIds: arr.join(','),
};
setReadStatus(query).then(res => {
this.$message.success('转烧结成功');
this.$message.success('操作成功');
this.onLoad(this.page, this.query);
});
});

@ -119,6 +119,7 @@
<productionMonitoringDialog
:showDialog="isPriorityOpen"
v-if="isPriorityOpen"
:itemData="itemData"
@closeDialog="closeDialog"
></productionMonitoringDialog>
</basic-container>
@ -132,7 +133,7 @@ import closedDialog from './components/closedDialog.vue';
import abnormalDialog from './components/abnormalDialog.vue';
import productionMonitoringDialog from './components/productionMonitoringDialog.vue';
import { getList } from '@/api/productionManagement/productionMonitoring';
import { getList,turnType } from '@/api/productionManagement/productionMonitoring';
export default {
components: {
@ -187,7 +188,7 @@ export default {
editBtnText: '修改',
viewBtnText: '详情',
labelWidth: 120,
menuWidth: 220,
menuWidth: 380,
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
@ -299,7 +300,7 @@ export default {
},
{
label: '计划单号',
prop: 'poCode',
prop: 'ypCode',
search: true,
sortable: true,
// hide: true,
@ -308,7 +309,7 @@ export default {
},
{
label: '返工单号',
prop: 'qcReworkCode',
prop: 'reworkCode',
search: false,
sortable: true,
overHidden: true,
@ -536,7 +537,6 @@ export default {
},
],
},
{
label: '生产数量',
prop: 'productionQuantity',
@ -634,12 +634,12 @@ export default {
}).then(() => {
let query = {
id: row.woId,
yieldType: 'sintering',
yieldType: '12001',
};
// turnType(query).then((res) => {
// this.$message.success('');
// this.onLoad(this.page, this.query);
// });
turnType(query).then((res) => {
this.$message.success('转烧结成功');
this.onLoad(this.page, this.query);
});
});
},
//

@ -98,6 +98,7 @@
<productionMonitoringDialog
:showDialog="isPriorityOpen"
v-if="isPriorityOpen"
:itemData="itemData"
@closeDialog="closeDialog"
></productionMonitoringDialog>
</basic-container>
@ -209,7 +210,7 @@ export default {
},
{
label: '订单状态',
prop: 'runStatusTitle',
prop: 'runStatus',
type: 'select',
search: true,
sortable: true,

@ -19,11 +19,11 @@
<template #menu-right> </template>
<template #menu="{ row }">
<!-- 石墨模准备完成 -->
<el-button type="text" @click="moldComplete(scope.row.yoId)">完成</el-button>
<el-button v-if="row.sjMoldPreparation==''||row.sjMoldPreparation==null||row.sjMoldPreparation!=2" type="text" @click="moldComplete(scope.row.yoId)">完成</el-button>
<!-- 齐套流转完成 -->
<el-button type="text" @click="sendKit(scope.row.yoId)">发送</el-button>
<el-button v-if="row.sjKitPreparation==''||row.sjKitPreparation==null||row.sjKitPreparation!=2" type="text" @click="sendKit(scope.row.yoId)">发送</el-button>
<!-- 车间订单生成 -->
<el-button type="text" @click="orderGen(scope.row.yoId)">车间订单生成</el-button>
<el-button v-if="row.sjKitPreparation==2" type="text" @click="orderGen(scope.row.yoId)">车间订单生成</el-button>
</template>
<template #heatTreat="scope">

Loading…
Cancel
Save