项目管理 页面调整 ->查看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 { export default {
name: "Details", name: "Details",
props: ['params'],
computed: { computed: {
align() { align() {
return align return align
}, },
upload() { // upload() {
return upload // return upload
} // }
}, },
data() { data() {
return { return {
@ -376,10 +377,11 @@ export default {
}; };
}, },
created() { created() {
const totalWeight = this.$route.query.productionOrderNo; this.queryParams.totalWeight = "";
if (totalWeight) { if (this.params && this.params.productionOrderNo) {
this.queryParams.totalWeight = totalWeight; this.queryParams.totalWeight = this.params.productionOrderNo;
}else {} }
this.getList(); 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="id" v-if="true"/> -->
<el-table-column label="生产令号" align="center" prop="productionOrderNo"> <el-table-column label="生产令号" align="center" prop="productionOrderNo">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="productionCodeHandle(scope.row)" type="primary"> <el-link @click="productionCodeHandle(scope.row)" type="primary">
{{ scope.row.productionOrderNo }} {{ scope.row.productionOrderNo }}
</el-button> </el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="项目名称" align="center" prop="productionName"/> <el-table-column label="项目名称" align="center" prop="productionName"/>
@ -178,7 +178,16 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <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" size="mini"
type="primary" type="primary"
icon="el-icon-edit" icon="el-icon-edit"
@ -209,7 +218,9 @@
@click="handleBOM(scope.row.productionOrderNo)" @click="handleBOM(scope.row.productionOrderNo)"
v-hasPermi="['system:orderPro:viewBom']" v-hasPermi="['system:orderPro:viewBom']"
>查看BOM >查看BOM
</el-button> </el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -399,6 +410,21 @@
</div> </div>
</el-drawer> </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-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
@ -448,6 +474,18 @@
</div> </div>
</template> </template>
<style>
.el-dropdown {
vertical-align: top;
}
.el-dropdown + .el-dropdown {
margin-left: 15px;
}
.el-icon-arrow-down {
font-size: 12px;
}
</style>
<script> <script>
import { import {
listOrderPro, listOrderPro,
@ -469,10 +507,16 @@ import { listConfigIni } from '@/api/system/configIni';
import ImageUpload from '@/components/ImageUpload'; import ImageUpload from '@/components/ImageUpload';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import bomInfo from '@/views/system/details/index.vue'; //bom
import processInfo from '@/views/system/route/test.vue'; //
export default { export default {
name: "OrderPro", name: "OrderPro",
components: { components: {
ImageUpload ImageUpload,
bomInfo,
processInfo,
}, },
data() { data() {
return { return {
@ -523,6 +567,13 @@ export default {
}, },
// //
form: {}, form: {},
//bom
bomDrawer: false,
bomParams:{},
//
processDrawer: false,
processParams:{},
// //
drawingTypeOptions: [], drawingTypeOptions: [],
// //
@ -646,6 +697,17 @@ export default {
} }
}, },
methods: { methods: {
handleCommand(command, row) {
if("工艺" === command){
this.handleDetail(row.productionOrderNo)
}
if("修改" === command){
this.handleUpdate(row)
}
if("删除" === command){
this.handleDelete(row)
}
},
handleClose(done) { handleClose(done) {
done(); done();
}, },
@ -725,18 +787,25 @@ export default {
this.resetForm("form"); this.resetForm("form");
}, },
handleDetail(productionOrderNo) { handleDetail(productionOrderNo) {
this.processParams={productionOrderNo: productionOrderNo};
this.processDrawer = true
// //
this.$router.push({ // this.$router.push({
path: '/route/route', // // path: '/route/route', //
query: {productionOrderNo: productionOrderNo} // query // query: {productionOrderNo: productionOrderNo} // query
}); // });
}, },
handleBOM(productionOrderNo) { handleBOM(productionOrderNo) {
this.bomParams={productionOrderNo: productionOrderNo};
this.bomDrawer = true
// //
this.$router.push({ // this.$router.push({
path: '/bom/details', // // path: '/bom/details', //
query: {productionOrderNo: productionOrderNo} // query // query: {productionOrderNo: productionOrderNo} // query
}); // });
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {

View File

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