项目管理 页面调整 ->查看bom明细, 方式调整 -> 查看工艺方式调整

This commit is contained in:
andy 2025-07-19 16:02:55 +08:00
parent 7466fcf08f
commit b989162b2a
3 changed files with 136 additions and 55 deletions

View File

@ -305,13 +305,14 @@ import {align} from "quill/ui/icons";
export default {
name: "Details",
props: ['params'],
computed: {
align() {
return align
},
upload() {
return upload
}
// upload() {
// return upload
// }
},
data() {
return {
@ -376,10 +377,11 @@ export default {
};
},
created() {
const totalWeight = this.$route.query.productionOrderNo;
if (totalWeight) {
this.queryParams.totalWeight = totalWeight;
}else {}
this.queryParams.totalWeight = "";
if (this.params && this.params.productionOrderNo) {
this.queryParams.totalWeight = this.params.productionOrderNo;
}
this.getList();
},

View File

@ -126,9 +126,9 @@
<!-- <el-table-column label="序号" align="center" prop="id" v-if="true"/> -->
<el-table-column label="生产令号" align="center" prop="productionOrderNo">
<template slot-scope="scope">
<el-button @click="productionCodeHandle(scope.row)" type="primary">
<el-link @click="productionCodeHandle(scope.row)" type="primary">
{{ scope.row.productionOrderNo }}
</el-button>
</el-link>
</template>
</el-table-column>
<el-table-column label="项目名称" align="center" prop="productionName"/>
@ -178,7 +178,16 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
<el-dropdown :split-button="true" size="small" type="primary" @click="handleBOM(scope.row.productionOrderNo)" @command="(command)=>handleCommand(command, scope.row)">
查看BOM
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="工艺" v-hasPermi="['system:orderPro:remove']">查看工艺</el-dropdown-item>
<el-dropdown-item :divided="true" command="修改" v-hasPermi="['system:orderPro:edit']">修改</el-dropdown-item>
<el-dropdown-item :divided="true" command="删除" v-hasPermi="['system:orderPro:remove']">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-button
size="mini"
type="primary"
icon="el-icon-edit"
@ -209,7 +218,9 @@
@click="handleBOM(scope.row.productionOrderNo)"
v-hasPermi="['system:orderPro:viewBom']"
>查看BOM
</el-button>
</el-button> -->
</template>
</el-table-column>
</el-table>
@ -399,6 +410,21 @@
</div>
</el-drawer>
<el-drawer
title="BOM明细 ":visible.sync="bomDrawer"direction="rtl" :size="1500">
<div style="padding: 20px;">
<bomInfo v-if="bomDrawer" :params="bomParams"/>
</div>
</el-drawer>
<el-drawer
title="工艺路线 ":visible.sync="processDrawer"direction="rtl" :size="1500">
<div style="padding: 20px;">
<processInfo v-if="processDrawer" :params="processParams"/>
</div>
</el-drawer>
<!-- 添加或修改项目令号对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
@ -448,6 +474,18 @@
</div>
</template>
<style>
.el-dropdown {
vertical-align: top;
}
.el-dropdown + .el-dropdown {
margin-left: 15px;
}
.el-icon-arrow-down {
font-size: 12px;
}
</style>
<script>
import {
listOrderPro,
@ -469,10 +507,16 @@ import { listConfigIni } from '@/api/system/configIni';
import ImageUpload from '@/components/ImageUpload';
import { getToken } from '@/utils/auth';
import bomInfo from '@/views/system/details/index.vue'; //bom
import processInfo from '@/views/system/route/test.vue'; //
export default {
name: "OrderPro",
components: {
ImageUpload
ImageUpload,
bomInfo,
processInfo,
},
data() {
return {
@ -523,6 +567,13 @@ export default {
},
//
form: {},
//bom
bomDrawer: false,
bomParams:{},
//
processDrawer: false,
processParams:{},
//
drawingTypeOptions: [],
//
@ -646,6 +697,17 @@ export default {
}
},
methods: {
handleCommand(command, row) {
if("工艺" === command){
this.handleDetail(row.productionOrderNo)
}
if("修改" === command){
this.handleUpdate(row)
}
if("删除" === command){
this.handleDelete(row)
}
},
handleClose(done) {
done();
},
@ -725,18 +787,25 @@ export default {
this.resetForm("form");
},
handleDetail(productionOrderNo) {
this.processParams={productionOrderNo: productionOrderNo};
this.processDrawer = true
//
this.$router.push({
path: '/route/route', //
query: {productionOrderNo: productionOrderNo} // query
});
// this.$router.push({
// path: '/route/route', //
// query: {productionOrderNo: productionOrderNo} // query
// });
},
handleBOM(productionOrderNo) {
this.bomParams={productionOrderNo: productionOrderNo};
this.bomDrawer = true
//
this.$router.push({
path: '/bom/details', //
query: {productionOrderNo: productionOrderNo} // query
});
// this.$router.push({
// path: '/bom/details', //
// query: {productionOrderNo: productionOrderNo} // query
// });
},
/** 搜索按钮操作 */
handleQuery() {

View File

@ -88,7 +88,7 @@
<el-form :inline="true" :model="form" ref="ruleForm" size="mini" :rules="rules">
<el-table v-if="showtable" v-loading="loading" row-key="id" ref="tree" v-drag:[config]="form.routeList"
:tree-props="{ children: 'children' }" :data="form.routeList" stripe :row-class-name="tableRowClassName"
:cell-style="columnStyle" border max-height="680px" @cell-click="cellhand" :default-expand-all="true"
border max-height="680px" @cell-click="cellhand" :default-expand-all="true"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
@ -453,7 +453,7 @@
</div>
</el-dialog>
<!-- 抽屉 -->
<el-drawer title="BOM信息" :visible.sync="BOMpop" :before-close="bomClose" :size="1100" :destroy-on-close="true">
<el-drawer title="BOM信息" :visible.sync="BOMpop" :before-close="bomClose" :size="1100" :destroy-on-close="true" :modal="false">
<div style="padding: 20px;">
<!-- BOM信息头部 -->
<div class="bom-header">
@ -646,11 +646,13 @@ DictData.install();
export default {
name: "",
dicts: ['work_center'],
components: {
Fromed,
Bomfrom
},
props: {
params:{},
showdel: {
type: Boolean,
default: true
@ -928,11 +930,18 @@ export default {
};
},
created() {
const productionOrderNo = this.$route.query.productionOrderNo;
if (productionOrderNo) {
this.queryParams.routeDescription = productionOrderNo;
} else {
this.queryParams.routeDescription = "";
console.log(this.params)
if (this.params && this.params.productionOrderNo) {
this.queryParams.routeDescription = this.params.productionOrderNo;
}
// const productionOrderNo = this.params.productionOrderNo;
// if (productionOrderNo) {
// this.queryParams.routeDescription = productionOrderNo;
// } else {
// }
this.getList();
},
watch: {
@ -961,6 +970,7 @@ export default {
}
},
methods: {
// dict,
getKindeeExcel() {
//
const loadingInstance = this.$loading({
@ -975,7 +985,7 @@ export default {
this.reset();
//
const rooteProdet = this.$route.query.productionOrderNo;
const rooteProdet = this.params.productionOrderNo;
// getKindeeExcel
getKindeeExcel(rooteProdet)
@ -994,7 +1004,7 @@ export default {
this.handleBomRefresh();
},
dict,
getAllRouteAndUse() {
//
const loadingInstance = this.$loading({
@ -1009,7 +1019,7 @@ export default {
this.reset();
//
const rooteProdet = this.$route.query.productionOrderNo;
const rooteProdet = this.params.productionOrderNo;
// getAllRouteAndUse
getAllRouteAndUse(rooteProdet)
@ -1146,26 +1156,26 @@ export default {
rowDrop() {
const tbody = document.querySelector('.el-table__body-wrapper tbody');
const _this = this;
Sortable.create(tbody, {
onEnd({newIndex, oldIndex}) {
const currRow = _this.form.routeList[oldIndex];
//
if (currRow.parentId) {
const parentIndex = _this.form.routeList.findIndex(item => item.id === currRow.parentId);
if (parentIndex > -1) {
const children = _this.form.routeList[parentIndex].children;
//
const targetRow = children.splice(oldIndex, 1)[0];
children.splice(newIndex, 0, targetRow);
//
children.forEach((item, index) => {
item.processNo = (index + 1) * 10; // 102030...
});
}
}
},
filter: ".filtered" //
});
// Sortable.create(tbody, {
// onEnd({newIndex, oldIndex}) {
// const currRow = _this.form.routeList[oldIndex];
// //
// if (currRow.parentId) {
// const parentIndex = _this.form.routeList.findIndex(item => item.id === currRow.parentId);
// if (parentIndex > -1) {
// const children = _this.form.routeList[parentIndex].children;
// //
// const targetRow = children.splice(oldIndex, 1)[0];
// children.splice(newIndex, 0, targetRow);
// //
// children.forEach((item, index) => {
// item.processNo = (index + 1) * 10; // 102030...
// });
// }
// }
// },
// filter: ".filtered" //
// });
},
reorderProcessNo() {
@ -1319,7 +1329,7 @@ export default {
this.currentMaterial = {
materialCode: row.materialCode,
materialName: row.materialName,
productionOrderNo: this.$route.query.productionOrderNo
productionOrderNo: this.params.productionOrderNo
};
// BOM
@ -1348,7 +1358,7 @@ export default {
setTotalWeight() {
const totalWeight = this.$route.query.productionOrderNo;
const totalWeight = this.params.productionOrderNo;
if (totalWeight) {
this.queryParams.totalWeight = totalWeight;
}
@ -1497,7 +1507,7 @@ export default {
/**推送工艺 */
async pushRouteBom() {
//
const productionOrderNo = this.$route.query.productionOrderNo;
const productionOrderNo = this.params.productionOrderNo;
if (!productionOrderNo) {
this.$modal.msgError("未获取到生产订单号,请检查!");
return;
@ -1587,7 +1597,7 @@ export default {
// reset
this.reset();
//
const rooteProdet = this.$route.query.productionOrderNo;
const rooteProdet = this.params.productionOrderNo;
console.log(rooteProdet);
// API
@ -1617,7 +1627,7 @@ export default {
// reset
this.reset();
//
const rooteProdet = this.$route.query.productionOrderNo;
const rooteProdet = this.params.productionOrderNo;
console.log(rooteProdet);
// API
@ -1646,7 +1656,7 @@ export default {
// reset
this.reset();
//
const rooteProdet = this.$route.query.productionOrderNo;
const rooteProdet = this.params.productionOrderNo;
console.log(rooteProdet);
// API