生产追溯维护接口联调

dev-scheduling
zhangdi 4 days ago
parent 0f0a26124c
commit 4f4eb1f1f1
  1. 17
      src/api/zhgd-work/retrospectDefend.js
  2. 64
      src/views/zhgd-work/retrospectDefend/components/oneRetrospectDefend.vue
  3. 44
      src/views/zhgd-work/retrospectDefend/components/twoRetrospectDefend.vue

@ -35,3 +35,20 @@ export const getDataByMtnCodeRb = (params) => {
});
};
// 加载当前工序检验数据
export const loadPrMacToolUseByMtnCode = (params) => {
return request({
url: '/blade-desk/processMaintenance/loadPrMacToolUseByMtnCode',
method: 'get',
params:params
});
};
// 根据工序查询电子档案的数据
export const remarryRedeemRetrospectDefend = (params) => {
return request({
url: '/blade-desk/processMaintenance/remarryRedeemRetrospectDefend',
method: 'get',
params:params
});
};

@ -47,8 +47,8 @@
<el-table-column label="批次号" align="center" prop="batchNo" />
<el-table-column label="当前工序" align="center" prop="currentWpTitle" />
<el-table-column align="center" width="100" fixed="right" label="操作">
<template #scope="scope">
<el-button type="text" size="mini" @click="deleteRow(scope.row.currentWpId)"
<template #default="scope">
<el-button type="text" @click="deleteRow(scope.row.currentWpId)"
>删除</el-button
>
</template>
@ -56,17 +56,16 @@
</el-table>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span style="color: rgb(85, 85, 243)">维护电子档案</span>
<span style="color: rgb(85, 85, 243);">维护电子档案</span>
</div>
<el-form ref="form" :model="formData" :rules="rulesMold" inline>
<el-form ref="form" :model="formData" :rules="rulesMold" inline style="margin-top: 10px;">
<el-row>
<el-col :span="6">
<el-form-item label="设备编码:" prop="ecId">
<!-- <equipment-card v-model="formData.ecId" clearable /> -->
<jhSelect
:value="ecId"
@input="val => (ecId = val)"
:value="formData.ecId"
@input="val => (formData.ecId = val)"
placeholder="请搜索选择"
api-url="/blade-desk/processMaintenance/queryEquipmentCard"
echo-api="/blade-desk/processMaintenance/queryEquipmentCard"
@ -93,16 +92,16 @@
>
<el-option
v-for="item in dsRbFilePreserveList"
:key="item.rfpId"
:key="item.id"
:label="item.name"
:value="item.rfpId"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="tableBox">
<div class="tableBoxs">
<table
v-if="preserveSlotList.length > 0"
id="cus-table"
@ -152,6 +151,8 @@ export default {
line: true,
formData: { ecId: null, rfpId: null },
rulesMold: {
ecId: [{ required: true, message: '请选择设备编码' }],
rfpId: [{ required: true, message: '请选择模板' }],
// ecId: [this.$validation.required],
// rfpId: [this.$validation.required],
},
@ -350,14 +351,14 @@ export default {
if (item) {
loadCurrentWp({ cardNo: item }).then(res => {
const obj = this.wpList.find(item => {
return item.currentWpId == res.data.data.currentWpId;
return item.wpId == res.data.data.wpId;
});
if (obj != null) {
return this.$message.warning('此订单已存在');
}
this.dsRbFilePreserveList = [];
this.wpList.push(res.data);
this.getRbFilePreserve(res.data.currentWpId);
this.wpList.push(res.data.data);
this.getRbFilePreserve(res.data.data.wpId);
});
// this.$ajax.get('prMakeRec/loadCurrentWp/' + item).then(res => {
// if (this.$ifAjax(res)) {
@ -376,15 +377,21 @@ export default {
},
codeKeyUpMtnCode() {
if (this.mtnCode) {
this.$ajax.get('prMacToolUse/loadPrMacToolUseByMtnCode/' + this.mtnCode).then(res => {
if (this.$ifAjax(res)) {
console.log(res);
const list = res.data;
for (var i = 0; i < list.length; i++) {
this.commonMethod(list[i]);
}
loadPrMacToolUseByMtnCode({ mtnCode: this.mtnCode }).then(res => {
const list = res.data.data;
for (var i = 0; i < list.length; i++) {
this.commonMethod(list[i]);
}
});
// this.$ajax.get('prMacToolUse/loadPrMacToolUseByMtnCode/' + this.mtnCode).then(res => {
// if (this.$ifAjax(res)) {
// console.log(res);
// const list = res.data;
// for (var i = 0; i < list.length; i++) {
// this.commonMethod(list[i]);
// }
// }
// });
}
},
//
@ -405,9 +412,9 @@ export default {
// });
},
rbFilePreserveChange() {
getByRfpId({ rfpId: this.rfpId }).then(res => {
getByRfpId({ rfpId: this.formData.rfpId }).then(res => {
this.mtnCode = null;
this.preserveSlotList = res.data.data;
this.preserveSlotList = res.data.data.preserveSlotList
});
// this.$ajax.get('dsRbFilePreserveSlot/getByRfpId/' + this.formData.rfpId).then(res => {
// if (this.$ifAjax(res)) {
@ -429,7 +436,7 @@ export default {
ecId: this.formData.ecId,
rfpId: this.formData.rfpId,
line: this.line,
preserveSlotList: this.preserveSlotList,
produceMonitorFileSlotVOList: this.preserveSlotList,
};
saveRetrospectDefend(query).then(res => {
this.$message.success('保存成功');
@ -464,12 +471,12 @@ export default {
};
</script>
<style lang="scss" scoped>
.content-box{
<style lang="scss">
.content-box {
height: calc(100vh - 40px - 40px - 20px - 10px - 51px - 60px);
overflow-y: auto;
}
.tableBox {
.tableBoxs {
min-height: 100%;
padding-bottom: 30px;
table {
@ -498,3 +505,8 @@ export default {
margin-top: 10px !important;
}
</style>
<style lang="scss" scoped>
:deep(.el-form--inline .el-form-item){
margin-bottom: 5px;
}
</style>

@ -63,6 +63,7 @@ import {
loadCurrentWp,
remarryRedeemSaveRetrospectDefend,
getDataByMtnCodeRb,
remarryRedeemRetrospectDefend,
} from '@/api/zhgd-work/retrospectDefend.js';
import { getByRfpId, getRbFilePreserveByWpId } from '@/api/zhgd-work/eleFilesEdit.js';
import Templates from '../../../qualityTemplate/index.js';
@ -259,20 +260,27 @@ export default {
},
codeKeyUp() {
if (this.cardNo) {
this.$ajax
.post('prMakeRec/remarryRedeemRetrospectDefend', {
cardNo: this.cardNo,
line: this.line,
})
.then(res => {
if (this.$ifAjax(res)) {
if (res.data != null && res.data.dsRbFilePreserveSlotList.length <= 0) {
return this.$message.warning('暂未查到对应的数据');
}
this.preserveSlotList = res.data.dsRbFilePreserveSlotList;
this.obj = res.data;
}
});
remarryRedeemRetrospectDefend({ cardNo: this.cardNo, line: this.line }).then(res => {
if (res.data != null && res.data.dsRbFilePreserveSlotList.length <= 0) {
return this.$message.warning('暂未查到对应的数据');
}
this.preserveSlotList = res.data.dsRbFilePreserveSlotList;
this.obj = res.data;
});
// this.$ajax
// .post('prMakeRec/remarryRedeemRetrospectDefend', {
// cardNo: this.cardNo,
// line: this.line,
// })
// .then(res => {
// if (this.$ifAjax(res)) {
// if (res.data != null && res.data.dsRbFilePreserveSlotList.length <= 0) {
// return this.$message.warning('');
// }
// this.preserveSlotList = res.data.dsRbFilePreserveSlotList;
// this.obj = res.data;
// }
// });
}
},
@ -280,7 +288,7 @@ export default {
let query = {
mtuId: this.obj.mtuId,
line: this.line,
preserveSlotList: this.preserveSlotList,
produceMonitorFileSlotVOList: this.preserveSlotList,
};
remarryRedeemSaveRetrospectDefend(query).then(res => {
this.$message.success('保存成功');
@ -310,7 +318,7 @@ export default {
</script>
<style lang="scss" scoped>
.content-box{
.content-box {
height: calc(100vh - 40px - 40px - 20px - 10px - 51px - 60px);
overflow-y: auto;
}
@ -339,5 +347,9 @@ export default {
}
}
}
:deep(.el-form-item){
margin-bottom: 10px;
margin-top: 10px;
}
}
</style>
Loading…
Cancel
Save