|
|
|
@ -298,6 +298,18 @@
|
|
|
|
|
title="上传图纸"
|
|
|
|
|
width="30%"
|
|
|
|
|
@before-close="blueprintModel = false">
|
|
|
|
|
<el-form ref="form">
|
|
|
|
|
<el-form-item label="通知用户">
|
|
|
|
|
<el-select v-model="userNoticeList" placeholder="请选择通知用户" multiple filterable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in userList"
|
|
|
|
|
:key="item.userName"
|
|
|
|
|
:label="item.nickName"
|
|
|
|
|
:value="item.userName"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-upload
|
|
|
|
|
single
|
|
|
|
|
ref="drawingUpload"
|
|
|
|
@ -360,6 +372,18 @@
|
|
|
|
|
title="上传SOP附件"
|
|
|
|
|
width="30%"
|
|
|
|
|
@before-close="sopViewModel = false">
|
|
|
|
|
<el-form ref="form">
|
|
|
|
|
<el-form-item label="通知用户">
|
|
|
|
|
<el-select v-model="userNoticeList" placeholder="请选择通知用户" multiple filterable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in userList"
|
|
|
|
|
:key="item.userName"
|
|
|
|
|
:label="item.nickName"
|
|
|
|
|
:value="item.userName"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-upload
|
|
|
|
|
single
|
|
|
|
|
ref="drawingUpload"
|
|
|
|
@ -439,7 +463,7 @@ import {
|
|
|
|
|
delMaterialBom,
|
|
|
|
|
addMaterialBom,
|
|
|
|
|
updateMaterialBom,
|
|
|
|
|
changeBomStatus
|
|
|
|
|
changeBomStatus, updateBomAttachInfo
|
|
|
|
|
} from "@/api/mes/materialBom";
|
|
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
|
@ -448,6 +472,7 @@ import {verifyBOMIsProduction} from "@//api/mes/productOrder";
|
|
|
|
|
import {getToken} from "@/utils/auth";
|
|
|
|
|
import {getDispatchDrawingList, getDispatchSOPAttachList, uploadFile} from "@/api/mes/productplan";
|
|
|
|
|
import {selectByAttachIds} from "@/api/mes/baseAttachInfo";
|
|
|
|
|
import {findUserList} from "@/api/system/user";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "MaterialBom",
|
|
|
|
@ -599,6 +624,10 @@ export default {
|
|
|
|
|
headers: {
|
|
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
|
|
},
|
|
|
|
|
//用户List
|
|
|
|
|
userList: [],
|
|
|
|
|
//通知用户List
|
|
|
|
|
userNoticeList: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
@ -621,6 +650,9 @@ export default {
|
|
|
|
|
/** 查询物料BOM信息列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
findUserList({}).then(response => {
|
|
|
|
|
this.userList = response.data;
|
|
|
|
|
});
|
|
|
|
|
listMaterialBom(this.queryParams).then(response => {
|
|
|
|
|
this.materialBomList = this.handleTree(response.data, "materialBomId", "parentId");
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -888,6 +920,7 @@ export default {
|
|
|
|
|
/** 查看图纸 */
|
|
|
|
|
handleDrawing(row) {
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
this.userNoticeList = [];
|
|
|
|
|
if (row.attachId != null && row.attachId !== "") {
|
|
|
|
|
selectByAttachIds(row.attachId).then(res => {
|
|
|
|
|
let attachList = res.data;
|
|
|
|
@ -913,14 +946,19 @@ export default {
|
|
|
|
|
this.uploadAttachList = [];
|
|
|
|
|
let updateData = {
|
|
|
|
|
materialBomId: this.addProductPlanObject.materialBomId,
|
|
|
|
|
parentId: this.addProductPlanObject.parentId,
|
|
|
|
|
materialName: this.addProductPlanObject.materialName,
|
|
|
|
|
userNameList: this.userNoticeList,
|
|
|
|
|
attachType: "1",
|
|
|
|
|
attachId: this.addProductPlanObject.attachId
|
|
|
|
|
}
|
|
|
|
|
updateMaterialBom(updateData).then(response => {
|
|
|
|
|
updateBomAttachInfo(updateData).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("更新图纸成功");
|
|
|
|
|
this.addProductPlanObject = null;
|
|
|
|
|
this.blueprintModel = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.addProductPlanObject = null;
|
|
|
|
|
this.sopViewModel = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//图纸图片上传
|
|
|
|
@ -960,6 +998,7 @@ export default {
|
|
|
|
|
/** 查看sop */
|
|
|
|
|
handleSop(row) {
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
this.userNoticeList = [];
|
|
|
|
|
if (row.sopId != null && row.sopId !== "") {
|
|
|
|
|
selectByAttachIds(row.sopId).then(res => {
|
|
|
|
|
let attachList = res.data;
|
|
|
|
@ -985,14 +1024,19 @@ export default {
|
|
|
|
|
this.uploadSopList = [];
|
|
|
|
|
let updateData = {
|
|
|
|
|
materialBomId: this.addProductPlanObject.materialBomId,
|
|
|
|
|
parentId: this.addProductPlanObject.parentId,
|
|
|
|
|
materialName: this.addProductPlanObject.materialName,
|
|
|
|
|
userNameList: this.userNoticeList,
|
|
|
|
|
attachType: "2",
|
|
|
|
|
sopId: this.addProductPlanObject.sopId
|
|
|
|
|
}
|
|
|
|
|
updateMaterialBom(updateData).then(response => {
|
|
|
|
|
updateBomAttachInfo(updateData).then(response => {
|
|
|
|
|
this.$modal.msgSuccess("更新SOP成功");
|
|
|
|
|
this.addProductPlanObject = null;
|
|
|
|
|
this.sopViewModel = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
this.addProductPlanObject = null;
|
|
|
|
|
this.sopViewModel = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//Sop图片上传
|
|
|
|
|