Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
d190c47c3b
|
@ -49,26 +49,32 @@
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="批号追加设备" min-width="60">
|
<el-table-column label="批号追加设备" min-width="60">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-icon
|
<el-tag type="success" v-if="scope.row.batch_append_equip">
|
||||||
v-if="scope.row.batch_append_equip"
|
是
|
||||||
color="green"
|
</el-tag>
|
||||||
>
|
<!-- <el-icon v-if="scope.row.batch_append_equip" color="green">
|
||||||
<CircleCheckFilled />
|
<CircleCheckFilled />
|
||||||
</el-icon>
|
</el-icon> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="交接到工段" min-width="60">
|
<el-table-column label="交接到工段" min-width="60">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-icon v-if="scope.row.into_wm_mgroup" color="green">
|
<el-tag type="success" v-if="scope.row.into_wm_mgroup">
|
||||||
|
是
|
||||||
|
</el-tag>
|
||||||
|
<!-- <el-icon v-if="scope.row.into_wm_mgroup" color="green">
|
||||||
<CircleCheckFilled />
|
<CircleCheckFilled />
|
||||||
</el-icon>
|
</el-icon> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="不合格品是否入库" min-width="60">
|
<el-table-column label="不合格品是否入库" min-width="60">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-icon v-if="scope.row.store_notok" color="green">
|
<el-tag type="success" v-if="scope.row.store_notok">
|
||||||
|
是
|
||||||
|
</el-tag>
|
||||||
|
<!-- <el-icon v-if="scope.row.store_notok" color="green">
|
||||||
<CircleCheckFilled />
|
<CircleCheckFilled />
|
||||||
</el-icon>
|
</el-icon> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="排序" prop="sort" min-width="60">
|
<el-table-column label="排序" prop="sort" min-width="60">
|
||||||
|
|
|
@ -0,0 +1,229 @@
|
||||||
|
<template>
|
||||||
|
<el-drawer
|
||||||
|
v-model="visible"
|
||||||
|
:title="workflowName"
|
||||||
|
:size="600">
|
||||||
|
<svg id="mySvg" v-if="visible"></svg>
|
||||||
|
</el-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import dagreD3 from "dagre-d3";
|
||||||
|
import * as d3 from "d3";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "index",
|
||||||
|
props: {
|
||||||
|
workflowName: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
workFlowId: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
mySvgHeight: null,
|
||||||
|
visible:false,
|
||||||
|
isSaving: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
// this.handleWatch();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open(){
|
||||||
|
this.visible = true;
|
||||||
|
this.handleWatch();
|
||||||
|
},
|
||||||
|
handleWatch() {
|
||||||
|
let that = this;
|
||||||
|
that.limitedWatch = true;
|
||||||
|
that.$nextTick(() => {
|
||||||
|
var g = new dagreD3.graphlib.Graph().setGraph({
|
||||||
|
rankdir: "DL",
|
||||||
|
nodesep: 40,
|
||||||
|
edgesep: 25, //两条线之间的距离
|
||||||
|
ranksep: 20, //节点之间的距离
|
||||||
|
marginx: 80,
|
||||||
|
marginy: 10,
|
||||||
|
});
|
||||||
|
//获取state得到节点
|
||||||
|
that.$API.wf.workflow.states.req(that.workFlowId).then((response) => {
|
||||||
|
if (!response.err_msg) {
|
||||||
|
let nodes = response;
|
||||||
|
// 添加节点
|
||||||
|
nodes.forEach((item) => {
|
||||||
|
if(item.id&&item.name){
|
||||||
|
g.setNode(item.id, {
|
||||||
|
// 节点标签
|
||||||
|
label: item.name,
|
||||||
|
// 节点形状
|
||||||
|
shape: "rect",
|
||||||
|
toolText: item.name,
|
||||||
|
//节点样式
|
||||||
|
style: "fill:#fff;stroke:#000",
|
||||||
|
labelStyle: "fill:#000;",
|
||||||
|
rx: 5, //矩形节点圆角度
|
||||||
|
ry: 5,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//获取流转得到线 链接关系
|
||||||
|
that.$API.wf.workflow.transitions.req(that.workFlowId).then((res) => {
|
||||||
|
let transitionList = res;
|
||||||
|
transitionList.forEach((transition0) => {
|
||||||
|
let condition_expression = transition0.condition_expression;
|
||||||
|
if (condition_expression.length > 0) {
|
||||||
|
let newNodeId = transition0.id
|
||||||
|
g.setNode(newNodeId, {
|
||||||
|
label: "条件流转",
|
||||||
|
style: "stroke: #000;fill: #afa",
|
||||||
|
shape: "diamond",
|
||||||
|
});
|
||||||
|
g.setEdge(
|
||||||
|
transition0.source_state,
|
||||||
|
newNodeId,
|
||||||
|
{
|
||||||
|
// 边标签
|
||||||
|
label: transition0.name,
|
||||||
|
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
condition_expression.forEach((condition_expression0) => {
|
||||||
|
g.setEdge(
|
||||||
|
newNodeId,
|
||||||
|
condition_expression0.target_state,
|
||||||
|
{
|
||||||
|
label: condition_expression0.label,
|
||||||
|
style:
|
||||||
|
"fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}else {
|
||||||
|
g.setEdge(
|
||||||
|
transition0.source_state,
|
||||||
|
transition0.destination_state,
|
||||||
|
{
|
||||||
|
// 边标签
|
||||||
|
label: transition0.name,
|
||||||
|
// 边样式
|
||||||
|
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 根据后台数据来改变连线的颜色
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// g.nodes().length - 1;
|
||||||
|
// 创建渲染器
|
||||||
|
let render = new dagreD3.render();
|
||||||
|
// 选择 svg 并添加一个g元素作为绘图容器.
|
||||||
|
let svg = d3.select("#mySvg");
|
||||||
|
let inner = svg.append("g");
|
||||||
|
// 在绘图容器上运行渲染器生成流程图.
|
||||||
|
render(inner, g);
|
||||||
|
let mySvgHeight =document.getElementsByClassName("nodes")[0].getBoundingClientRect().height + 50;
|
||||||
|
let mySvgWdith =document.getElementsByClassName("output")[0].getBoundingClientRect().innerwidth ;
|
||||||
|
console.log('mySvgWdith',mySvgWdith);
|
||||||
|
document.getElementById('mySvg').setAttribute("height", mySvgHeight);
|
||||||
|
document.getElementById('mySvg').setAttribute("width", mySvgWdith);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
closeMark() {
|
||||||
|
this.limitedWatch = false;
|
||||||
|
},
|
||||||
|
scaleUp() {
|
||||||
|
var svg = document.getElementById("mySvg");
|
||||||
|
svg.style.transform = "scale(0.5)";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.treeMain {
|
||||||
|
height: 280px;
|
||||||
|
overflow: auto;
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
|
||||||
|
background-color: #fefefe;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: 5px;
|
||||||
|
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.svgMark {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
overflow: auto;
|
||||||
|
margin: 0;
|
||||||
|
z-index: 2000;
|
||||||
|
background: rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.svgWrapper {
|
||||||
|
background: #fff;
|
||||||
|
width: 800px;
|
||||||
|
margin: 5vh auto;
|
||||||
|
height: 90vh;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 2px;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
.svgItem {
|
||||||
|
padding: 20px 40px 0;
|
||||||
|
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
|
||||||
|
Microsoft YaHei, Arial, sans-serif;
|
||||||
|
font-size: 18px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.node rect {
|
||||||
|
stroke: #606266;
|
||||||
|
fill: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.edgePath path {
|
||||||
|
stroke: #606266;
|
||||||
|
fill: #333;
|
||||||
|
stroke-width: 1.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
g.conditions > rect {
|
||||||
|
fill: #00ffd0;
|
||||||
|
stroke: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-icon-close {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
link
|
link
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="handleWatch(scope)"
|
@click="handleWatch(scope.row)"
|
||||||
>
|
>
|
||||||
流程图
|
流程图
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -106,23 +106,14 @@
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
<div class="svgMark" v-if="limitedWatch" @click="closeMark">
|
<degraDialog
|
||||||
<div class="svgWrapper">
|
v-if="limitedWatch"
|
||||||
<div class="svgItem">
|
ref="degraDialogs"
|
||||||
工作流流程图<i
|
:workflowName="workflowName"
|
||||||
class="el-dialog__close el-icon el-icon-close"
|
:workFlowId="workFlowId"
|
||||||
@click="closeMark"
|
@closeDialog="limitedWatch = false"
|
||||||
></i>
|
>
|
||||||
</div>
|
</degraDialog>
|
||||||
<div style="width: 100%; margin: auto">
|
|
||||||
<svg
|
|
||||||
:height="mySvgHeight"
|
|
||||||
id="mySvg"
|
|
||||||
style="width: 100% !important"
|
|
||||||
></svg>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-dialog :title="titleMap[type]" v-model="limitedVisible">
|
<el-dialog :title="titleMap[type]" v-model="limitedVisible">
|
||||||
<el-form
|
<el-form
|
||||||
:model="addForm"
|
:model="addForm"
|
||||||
|
@ -181,19 +172,21 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import dagreD3 from "dagre-d3";
|
import degraDialog from "./degraD3.vue";
|
||||||
import * as d3 from "d3";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "index",
|
name: "index",
|
||||||
|
components: {
|
||||||
|
degraDialog
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
workflowName:"",
|
||||||
|
workFlowId:'',
|
||||||
apiObj: this.$API.wf.workflow.list,
|
apiObj: this.$API.wf.workflow.list,
|
||||||
selection: [],
|
selection: [],
|
||||||
checkList: [],
|
checkList: [],
|
||||||
choiceOption: [],
|
choiceOption: [],
|
||||||
query: {},
|
query: {},
|
||||||
mySvgHeight: null,
|
|
||||||
editId: null,
|
editId: null,
|
||||||
isSaving: false,
|
isSaving: false,
|
||||||
limitedVisible: false,
|
limitedVisible: false,
|
||||||
|
@ -339,128 +332,23 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleWatch(scope) {
|
handleWatch(row) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let workFlow = scope.row.id;
|
that.workFlowId = row.id;
|
||||||
|
that.workflowName = row.name;
|
||||||
that.limitedWatch = true;
|
that.limitedWatch = true;
|
||||||
that.$nextTick(() => {
|
that.$nextTick(() => {
|
||||||
var g = new dagreD3.graphlib.Graph().setGraph({
|
that.$refs.degraDialogs.open();
|
||||||
rankdir: "DL",
|
|
||||||
nodesep: 80,
|
|
||||||
edgesep: 50, //两条线之间的距离
|
|
||||||
ranksep: 40, //节点之间的距离
|
|
||||||
marginx: 160,
|
|
||||||
marginy: 20,
|
|
||||||
});
|
|
||||||
//获取state得到节点
|
|
||||||
that.$API.wf.workflow.states.req(workFlow).then((response) => {
|
|
||||||
if (!response.err_msg) {
|
|
||||||
let nodes = response;
|
|
||||||
// 添加节点
|
|
||||||
nodes.forEach((item) => {
|
|
||||||
if(item.id&&item.name){
|
|
||||||
if(item.id===1548915292174946304){
|
|
||||||
debugger;
|
|
||||||
}
|
|
||||||
g.setNode(item.id, {
|
|
||||||
// 节点标签
|
|
||||||
label: item.name,
|
|
||||||
// 节点形状
|
|
||||||
shape: "rect",
|
|
||||||
toolText: item.name,
|
|
||||||
//节点样式
|
|
||||||
style: "fill:#fff;stroke:#000",
|
|
||||||
labelStyle: "fill:#000;",
|
|
||||||
rx: 5, //矩形节点圆角度
|
|
||||||
ry: 5,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//获取流转得到线 链接关系
|
|
||||||
that.$API.wf.workflow.transitions.req(workFlow).then((res) => {
|
|
||||||
if (!res.err_msg) {
|
|
||||||
let transitionList = res;
|
|
||||||
transitionList.forEach((transition0) => {
|
|
||||||
if (transition0.condition_expression.length > 0) {
|
|
||||||
g.setNode(transition0.source_state_.id + 100000, {
|
|
||||||
label: "条件表达式",
|
|
||||||
style: "stroke: #000;fill: #afa",
|
|
||||||
shape: "diamond",
|
|
||||||
});
|
|
||||||
g.setEdge(
|
|
||||||
transition0.source_state_.id,
|
|
||||||
transition0.source_state_.id + 100000,
|
|
||||||
{
|
|
||||||
// 边标签
|
|
||||||
label: transition0.name,
|
|
||||||
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
let condition_expression = transition0.condition_expression;
|
|
||||||
condition_expression.forEach((condition_expression0) => {
|
|
||||||
g.setEdge(
|
|
||||||
transition0.source_state_.id + 100000,
|
|
||||||
condition_expression0.target_state,
|
|
||||||
{
|
|
||||||
label: condition_expression0.label,
|
|
||||||
style:
|
|
||||||
"fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px",
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}else {
|
|
||||||
|
|
||||||
g.setEdge(
|
|
||||||
transition0.source_state_.id,
|
|
||||||
transition0.destination_state_.id,
|
|
||||||
{
|
|
||||||
// 边标签
|
|
||||||
label: transition0.name,
|
|
||||||
// 边样式
|
|
||||||
style: "fill:#ffffff;stroke:#c0c1c3;stroke-width:1.5px", // 根据后台数据来改变连线的颜色
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// let nodess = g._nodes;
|
|
||||||
// let newObj = {};
|
|
||||||
// for(let item in nodess){
|
|
||||||
// if(nodess[item]===undefined){
|
|
||||||
// }else{
|
|
||||||
// newObj[item] = nodess[item];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// debugger;
|
|
||||||
// console.log(newObj)
|
|
||||||
// // let list = Object.keys(nodess)
|
|
||||||
// // .filter((key) => nodess[key] !== null && nodess[key] !== undefined)
|
|
||||||
// // .reduce((acc, key) => ({ ...acc, [key]: nodess[key] }), {});
|
|
||||||
// // debugger;
|
|
||||||
// // console.log(list)
|
|
||||||
// g._nodes = newObj;
|
|
||||||
console.log(g)
|
|
||||||
g.nodes().length - 1;
|
|
||||||
// 创建渲染器
|
|
||||||
let render = new dagreD3.render();
|
|
||||||
// 选择 svg 并添加一个g元素作为绘图容器.
|
|
||||||
let svg = d3.select("#mySvg");
|
|
||||||
let svgGroup = svg.append("g");
|
|
||||||
// 在绘图容器上运行渲染器生成流程图.
|
|
||||||
render(d3.select("svg g"), g);
|
|
||||||
that.mySvgHeight =
|
|
||||||
document
|
|
||||||
.getElementsByClassName("nodes")[0]
|
|
||||||
.getBoundingClientRect().height + 50;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
closeMark() {
|
closeMark() {
|
||||||
this.limitedWatch = false;
|
this.limitedWatch = false;
|
||||||
},
|
},
|
||||||
|
scaleUp() {
|
||||||
|
var svg = document.getElementById("mySvg");
|
||||||
|
svg.style.transform = "scale(0.5)";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -487,44 +375,6 @@ export default {
|
||||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.svgMark {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
left: 0;
|
|
||||||
overflow: auto;
|
|
||||||
margin: 0;
|
|
||||||
z-index: 2000;
|
|
||||||
background: rgba(0, 0, 0, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.svgWrapper {
|
|
||||||
background: #fff;
|
|
||||||
width: 800px;
|
|
||||||
margin: 5vh auto;
|
|
||||||
height: 90vh;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 2px;
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
.svgItem {
|
|
||||||
padding: 20px 40px 0;
|
|
||||||
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
|
|
||||||
Microsoft YaHei, Arial, sans-serif;
|
|
||||||
font-size: 18px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
svg {
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.node rect {
|
.node rect {
|
||||||
stroke: #606266;
|
stroke: #606266;
|
||||||
fill: #fff;
|
fill: #fff;
|
||||||
|
|
|
@ -131,8 +131,7 @@
|
||||||
<el-form-item label="领用数量">
|
<el-form-item label="领用数量">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count_use"
|
v-model="form.count_use"
|
||||||
:min="1"
|
:min="0"
|
||||||
:max="materialCount"
|
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
class="width100"
|
class="width100"
|
||||||
@change = "countUseChange"
|
@change = "countUseChange"
|
||||||
|
@ -159,14 +158,13 @@
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
disabled
|
disabled
|
||||||
/>
|
/>
|
||||||
<!-- countChanges -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :md="12" :sm="24">
|
<el-col :md="12" :sm="24">
|
||||||
<el-form-item label="合格数量">
|
<el-form-item label="合格数量">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count_ok"
|
v-model="form.count_ok"
|
||||||
:min="0"
|
disabled
|
||||||
class="width100"
|
class="width100"
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
|
@ -176,9 +174,8 @@
|
||||||
<el-form-item label="不合格数量">
|
<el-form-item label="不合格数量">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="form.count_notok"
|
v-model="form.count_notok"
|
||||||
:min="0"
|
disabled
|
||||||
class="width100"
|
class="width100"
|
||||||
@change="countChanges"
|
|
||||||
controls-position="right"
|
controls-position="right"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -397,7 +394,7 @@ export default {
|
||||||
work_end_time:[{required: true,message: "请选择生产开始时间",trigger: "blur",},],
|
work_end_time:[{required: true,message: "请选择生产开始时间",trigger: "blur",},],
|
||||||
route: [{required: true,message: "请选择工艺路线",trigger: "blur",},]
|
route: [{required: true,message: "请选择工艺路线",trigger: "blur",},]
|
||||||
},
|
},
|
||||||
materialCount:1,
|
materialCount:1,//领料批次现有库存数
|
||||||
material_in:'',
|
material_in:'',
|
||||||
material_out:'',
|
material_out:'',
|
||||||
shiftOtions:[],
|
shiftOtions:[],
|
||||||
|
@ -475,8 +472,21 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.materialOptions.forEach(item=>{
|
that.materialOptions.forEach(item=>{
|
||||||
if(item.id == val){
|
if(item.id == val){
|
||||||
that.materialCount = item.count;
|
that.form.count_n_hs =
|
||||||
that.form.count_use = item.count;
|
that.form.count_n_qp =
|
||||||
|
that.form.count_n_swen =
|
||||||
|
that.form.count_n_bb =
|
||||||
|
that.form.count_n_xbb =
|
||||||
|
that.form.count_n_md =
|
||||||
|
that.form.count_n_xh =
|
||||||
|
that.form.count_n_ps =
|
||||||
|
that.form.count_n_zq =
|
||||||
|
that.form.count_n_qt =
|
||||||
|
that.form.count_n_wm=0;
|
||||||
|
that.materialCount =
|
||||||
|
that.form.count_use =
|
||||||
|
that.form.count_real =
|
||||||
|
that.form.count_ok = item.count;
|
||||||
that.form.count_real = item.count-that.form.count_pn_jgqbl;
|
that.form.count_real = item.count-that.form.count_pn_jgqbl;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -512,9 +522,9 @@ export default {
|
||||||
this.form.count_n_wm;
|
this.form.count_n_wm;
|
||||||
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
||||||
},
|
},
|
||||||
countChanges(){
|
// countChanges(){
|
||||||
this.form.count_ok = this.form.count_real - this.form.count_notok;
|
// this.form.count_ok = this.form.count_real - this.form.count_notok;
|
||||||
},
|
// },
|
||||||
//表单提交方法
|
//表单提交方法
|
||||||
submit() {
|
submit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add(20)"
|
@click="table_add(20)"
|
||||||
v-auth="'handover.create'"
|
v-auth="'handover.create'"
|
||||||
|
v-if="mgroupName!=='切片'"
|
||||||
>返工</el-button
|
>返工</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
|
|
|
@ -317,7 +317,10 @@ export default {
|
||||||
this.dialog.scrap = false;
|
this.dialog.scrap = false;
|
||||||
this.$refs.table.refresh();
|
this.$refs.table.refresh();
|
||||||
},
|
},
|
||||||
handleinmSuccess(){},
|
//出入库后刷新页面
|
||||||
|
handleinmSuccess(){
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
},
|
||||||
//搜索
|
//搜索
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.$refs.table.queryData(this.query);
|
this.$refs.table.queryData(this.query);
|
||||||
|
|
|
@ -2,13 +2,13 @@ import ehsUserSelect from './components/ehsSelect/userselect'
|
||||||
import ehsEpSelect from './components/ehsSelect/epselect'
|
import ehsEpSelect from './components/ehsSelect/epselect'
|
||||||
import ehsSelect from './components/ehsSelect/select'
|
import ehsSelect from './components/ehsSelect/select'
|
||||||
import ehsTableSelect from './components/ehsSelect/tableSelect'
|
import ehsTableSelect from './components/ehsSelect/tableSelect'
|
||||||
import xSelect from './components/xSelect/index.vue'
|
import xtSelect from './components/xtSelect/index.vue'
|
||||||
export default {
|
export default {
|
||||||
install(app) {
|
install(app) {
|
||||||
app.component('ehsUserSelect', ehsUserSelect);
|
app.component('ehsUserSelect', ehsUserSelect);
|
||||||
app.component('ehsEpSelect', ehsEpSelect);
|
app.component('ehsEpSelect', ehsEpSelect);
|
||||||
app.component('ehsSelect', ehsSelect);
|
app.component('ehsSelect', ehsSelect);
|
||||||
app.component('ehsTableSelect', ehsTableSelect);
|
app.component('ehsTableSelect', ehsTableSelect);
|
||||||
app.component('xSelect', xSelect);
|
app.component('xtSelect', xtSelect);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue