项目管理 页面调整 ->查看bom明细, 方式调整 -> 查看工艺方式调整
This commit is contained in:
parent
7466fcf08f
commit
b989162b2a
@ -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();
|
||||
},
|
||||
|
||||
|
||||
@ -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() {
|
||||
|
||||
@ -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; // 按10、20、30...排序
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
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; // 按10、20、30...排序
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// 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 方法
|
||||
|
||||
Loading…
Reference in New Issue
Block a user