Commit 2d46ea56 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 0f26b924 19d69f13
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
.ivu-btn { .ivu-btn {
padding: 4px 15px 4px; padding: 4px 15px 4px;
} }
.ivu-layout{ .ivu-layout-content{
background-color: #fff !important; background-color: #fff ;
} }
.ivu-modal-wrap * { .ivu-modal-wrap * {
box-sizing: border-box; box-sizing: border-box;
......
...@@ -362,8 +362,8 @@ export default { ...@@ -362,8 +362,8 @@ export default {
} }
.product-layout { .product-layout {
.i-layout-content { .i-layout-content {
padding: 5px 10px; padding: 5px 10px 0 10px;
height: calc(100vh - 100px); height: calc(100vh - 90px);
} }
.i-tabs { .i-tabs {
width: 100% !important; width: 100% !important;
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<Option <Option
v-for="(item,index) in listCal" v-for="(item,index) in listCal"
:key="index" :key="index"
:value="item.id" :value="item.calid"
:label="item.calname" :label="item.calname"
></Option> ></Option>
</Select> </Select>
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
opTaskPk: 0, opTaskPk: 0,
taskSeq: "", taskSeq: "",
flog: 5, //参数应用范围 flog: 5, //参数应用范围
calId: -1, calId:"",
planState: false, planState: false,
planMethod: "重叠", // 平行 重叠 planMethod: "重叠", // 平行 重叠
over: false, over: false,
...@@ -364,7 +364,7 @@ export default { ...@@ -364,7 +364,7 @@ export default {
opTaskPk: this.row.op_task_pk, opTaskPk: this.row.op_task_pk,
taskSeq: this.row.task_seq, taskSeq: this.row.task_seq,
flog: 0, //参数应用范围 flog: 0, //参数应用范围
calId: parseInt(this.row.cal_id), calId: this.row.cal_id,
planState: this.row.plan_method == "平行", planState: this.row.plan_method == "平行",
planMethod: this.row.plan_method, // 平行 重叠 planMethod: this.row.plan_method, // 平行 重叠
over: this.row.over_time == "加班", over: this.row.over_time == "加班",
......
<template> <template>
<div class="home"> <div class="home">
<Card class="card-user"> <Card>
<div class="img-header"> <div class="flex">
<div class="user">
<img src="@/assets/images/home/user.png" /> <img src="@/assets/images/home/user.png" />
</div>
<div class="user-text"> <div class="user-text">
<p>你好:张飞,欢迎登录MES系统!</p> <p>你好:张飞,欢迎登录MES系统!</p>
<p> <p>
...@@ -11,244 +11,53 @@ ...@@ -11,244 +11,53 @@
<span>工艺技术员</span> <span>工艺技术员</span>
</p> </p>
</div> </div>
<div class="incon-carousel">
<div class="bg-b">
<Icon type="ios-arrow-back" />
</div>
<div class="bg bg0">
<Icon type="ios-cube" />
<p>电子对账单</p>
</div>
<div class="bg bg1">
<Icon type="md-mail" />
<p>站内邮件</p>
</div>
<div class="bg bg2">
<Icon type="md-map" />
<p>站内邮件</p>
</div>
<div class="bg bg3">
<Icon type="ios-cube" />
<p>电子对账单</p>
</div>
<div class="bg bg0">
<Icon type="ios-cube" />
<p>电子对账单</p>
</div> </div>
<div class="bg bg1"> <div class="fg flex">
<Icon type="md-mail" /> <div class="left">
<p>站内邮件</p> <Icon type="ios-arrow-back" size="32" />
</div> </div>
<div class="bg bg2"> <div class="fg"></div>
<Icon type="md-mail" /> <div class="right">
<p>站内邮件</p> <Icon type="ios-arrow-forward" size="32" />
</div> </div>
<div class="bg-l">
<Icon type="ios-arrow-forward" />
</div> </div>
</div> </div>
</Card> </Card>
<div class="card-list">
<div class="bg-b">
<Icon type="ios-arrow-back" />
</div>
<Card
v-for="(item,index) in listTask"
:key="index"
:class="item.name=='物料复验' ? 'img_bg02':(item.name=='产品合格证' ? 'img_bg03':(item.name=='生产执行' ? 'img_bg04' : 'img_bg01'))"
@click.native="goPage(item)"
>
<div class="leftIco">
<img class="img_icon" src="@/assets/imgicon/u1640.png" alt />
</div>
<div class="text-p">
<p>{{item.totalUrl}}</p>
<p>{{item.name}}</p>
</div>
</Card>
<div class="bg-l">
<Icon type="ios-arrow-forward" />
</div>
</div>
<Row class="table" :gutter="16">
<Col :span="12">
<Approval ref="approval" />
</Col>
<Col :span="12">
<UnreadMessage />
</Col>
</Row>
<div class="url-img"></div>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api";
import Approval from "./component/approval";
import UnreadMessage from "./component/unreadMessage";
export default { export default {
components: { name: "",
Approval,
UnreadMessage
},
data() { data() {
return { return {};
listTask: [],
imgUrl: iconImg
};
},
created() {
this.get();
},
methods: {
get() {
let list = [];
let url = `${systemUrl}/backlog/get`;
this.$api.get(url).then(r => {
list = r.result;
list.forEach(data => {
// console.log(data.totalUrl)
let ulrt = `http://${address}:` + data.totalUrl;
data.totalUrl = 0;
this.$api.get(ulrt).then(r => {
return (data.totalUrl = r.result);
});
});
console.log(list);
this.listTask = list;
});
},
goPage(u) {
// alert(u.menuUrl)
this.$router.push(u.menuUrl);
}
} }
}; };
</script> </script>
<style lang="less" scoped>
<style lang="less">
.home { .home {
padding: 10px 0; background: rgba(245, 246, 250, 1);
.card-user { margin: -5px -10px -50px -10px;
height: 100px; height: 100%;
.img-header { padding: 5px 10px;
margin-top: -8px; .flex{
float: left; height: 90px;
} .user{
.user-text { width: 600px;
img{
float: left; float: left;
p {
margin: 10px;
} }
} }
.incon-carousel { .fg {
float: right; .left,.right{
// margin-top: 8px; width: 50px;
width: 800px; line-height: 90px;
.bg-b {
float: left;
margin-top: 10px;
font-size: 30px;
color: #dcdfe6;
}
.bg-l {
float: right;
margin-top: 10px;
font-size: 30px;
color: #dcdfe6;
}
.bg {
text-align: center; text-align: center;
width: 100px; color: #A7B8CC;
float: left;
.ivu-icon {
font-size: 35px;
}
p {
margin-top: 8px;
} }
} }
.bg0 {
.ivu-icon {
color: #ffc300;
}
}
.bg1 {
.ivu-icon {
color: #0099ff;
}
}
.bg2 {
.ivu-icon {
color: #ff7a8b;
}
}
.bg3 {
.ivu-icon {
color: #ffc300;
}
}
}
}
.card-list {
display: flex;
display: -webkit-flex;
margin-top: 15px;
justify-content: space-around;
.bg-b {
margin-top: 18px;
font-size: 30px;
color: #dcdfe6;
width: 35px;
}
.bg-l {
margin-top: 18px;
font-size: 30px;
color: #dcdfe6;
width: 35px;
}
.img_bg01 {
background-color: #ff9100;
width: 200px;
cursor: pointer;
background: linear-gradient(to left, #ff9100, #ffcf87);
}
.img_bg02 {
width: 200px;
cursor: pointer;
background: linear-gradient(to left, #003fd4, #8ac7fc);
}
.img_bg03 {
cursor: pointer;
width: 200px;
background: linear-gradient(to left, #fe1b1b, #fc9c92);
}
.img_bg04 {
cursor: pointer;
width: 200px;
background: linear-gradient(to left, #249e91, #79ece0);
}
.img_icon {
width: 24px;
margin: 23% 0 0 0;
}
.text-p {
text-align: center;
color: #fff;
p:first-child {
font-size: 20px;
font-weight: bold;
margin-bottom: 5px;
}
}
}
.url-img {
width: 100%;
height: 370px;
background: url("../../assets/images/home/echars.png") no-repeat;
background-size: 100% 100%;
}
.table {
margin-top: 15px;
} }
} }
</style> </style>
\ No newline at end of file
<template>
<div class="home">
<Card class="card-user">
<div class="img-header">
<img src="@/assets/images/home/user.png" />
</div>
<div class="user-text">
<p>你好:张飞,欢迎登录MES系统!</p>
<p>
<span>xx公司/xx车间xx班组</span> &nbsp &nbsp
<span>工艺技术员</span>
</p>
</div>
<div class="incon-carousel">
<div class="bg-b">
<Icon type="ios-arrow-back" />
</div>
<div class="bg bg0">
<Icon type="ios-cube" />
<p>电子对账单</p>
</div>
<div class="bg bg1">
<Icon type="md-mail" />
<p>站内邮件</p>
</div>
<div class="bg bg2">
<Icon type="md-map" />
<p>站内邮件</p>
</div>
<div class="bg bg3">
<Icon type="ios-cube" />
<p>电子对账单</p>
</div>
<div class="bg bg0">
<Icon type="ios-cube" />
<p>电子对账单</p>
</div>
<div class="bg bg1">
<Icon type="md-mail" />
<p>站内邮件</p>
</div>
<div class="bg bg2">
<Icon type="md-mail" />
<p>站内邮件</p>
</div>
<div class="bg-l">
<Icon type="ios-arrow-forward" />
</div>
</div>
</Card>
<div class="card-list">
<div class="bg-b">
<Icon type="ios-arrow-back" />
</div>
<Card
v-for="(item,index) in listTask"
:key="index"
:class="item.name=='物料复验' ? 'img_bg02':(item.name=='产品合格证' ? 'img_bg03':(item.name=='生产执行' ? 'img_bg04' : 'img_bg01'))"
@click.native="goPage(item)"
>
<div class="leftIco">
<img class="img_icon" src="@/assets/imgicon/u1640.png" alt />
</div>
<div class="text-p">
<p>{{item.totalUrl}}</p>
<p>{{item.name}}</p>
</div>
</Card>
<div class="bg-l">
<Icon type="ios-arrow-forward" />
</div>
</div>
<Row class="table" :gutter="16">
<Col :span="12">
<Approval ref="approval" />
</Col>
<Col :span="12">
<UnreadMessage />
</Col>
</Row>
<div class="url-img"></div>
</div>
</template>
<script>
import Api from "./api";
import Approval from "./component/approval";
import UnreadMessage from "./component/unreadMessage";
export default {
components: {
Approval,
UnreadMessage
},
data() {
return {
listTask: [],
imgUrl: iconImg
};
},
created() {
this.get();
},
methods: {
get() {
let list = [];
let url = `${systemUrl}/backlog/get`;
this.$api.get(url).then(r => {
list = r.result;
list.forEach(data => {
// console.log(data.totalUrl)
let ulrt = `http://${address}:` + data.totalUrl;
data.totalUrl = 0;
this.$api.get(ulrt).then(r => {
return (data.totalUrl = r.result);
});
});
console.log(list);
this.listTask = list;
});
},
goPage(u) {
// alert(u.menuUrl)
this.$router.push(u.menuUrl);
}
}
};
</script>
<style lang="less" scoped>
.home {
padding: 10px 0;
.card-user {
height: 100px;
.img-header {
margin-top: -8px;
float: left;
}
.user-text {
float: left;
p {
margin: 10px;
}
}
.incon-carousel {
float: right;
// margin-top: 8px;
width: 800px;
.bg-b {
float: left;
margin-top: 10px;
font-size: 30px;
color: #dcdfe6;
}
.bg-l {
float: right;
margin-top: 10px;
font-size: 30px;
color: #dcdfe6;
}
.bg {
text-align: center;
width: 100px;
float: left;
.ivu-icon {
font-size: 35px;
}
p {
margin-top: 8px;
}
}
.bg0 {
.ivu-icon {
color: #ffc300;
}
}
.bg1 {
.ivu-icon {
color: #0099ff;
}
}
.bg2 {
.ivu-icon {
color: #ff7a8b;
}
}
.bg3 {
.ivu-icon {
color: #ffc300;
}
}
}
}
.card-list {
display: flex;
display: -webkit-flex;
margin-top: 15px;
justify-content: space-around;
.bg-b {
margin-top: 18px;
font-size: 30px;
color: #dcdfe6;
width: 35px;
}
.bg-l {
margin-top: 18px;
font-size: 30px;
color: #dcdfe6;
width: 35px;
}
.img_bg01 {
background-color: #ff9100;
width: 200px;
cursor: pointer;
background: linear-gradient(to left, #ff9100, #ffcf87);
}
.img_bg02 {
width: 200px;
cursor: pointer;
background: linear-gradient(to left, #003fd4, #8ac7fc);
}
.img_bg03 {
cursor: pointer;
width: 200px;
background: linear-gradient(to left, #fe1b1b, #fc9c92);
}
.img_bg04 {
cursor: pointer;
width: 200px;
background: linear-gradient(to left, #249e91, #79ece0);
}
.img_icon {
width: 24px;
margin: 23% 0 0 0;
}
.text-p {
text-align: center;
color: #fff;
p:first-child {
font-size: 20px;
font-weight: bold;
margin-bottom: 5px;
}
}
}
.url-img {
width: 100%;
height: 370px;
background: url("../../assets/images/home/echars.png") no-repeat;
background-size: 100% 100%;
}
.table {
margin-top: 15px;
}
}
</style>
\ No newline at end of file
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<Form :model="orderSearchForm" :label-width="95" :rules="ruleValidate" ref="formValidate"> <Form :model="orderSearchForm" :label-width="95" :rules="ruleValidate" ref="formValidate">
<Row> <Row>
<Col span="8"> <Col span="8">
<FormItem label="产品名称" style="width:100%" prop="bomId"> <FormItem label="产品名称" style="width:100%" prop="productId">
<Select <Select
v-model="orderSearchForm.bomId" v-model="orderSearchForm.productId"
:placeholder="placeholdeinfo" :placeholder="placeholdeinfo"
style="width:240px;" style="width:240px;"
> >
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
v-for="(item,index) in list" v-for="(item,index) in list"
:key="item.index" :key="item.index"
:value="item.value" :value="item.value"
style="display:none"
:label="item.label" :label="item.label"
style="display:none"
></Option> ></Option>
<Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree> <Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree>
</Select> </Select>
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<FormItem label="产品图号" style="width:100%"> <FormItem label="产品图号" style="width:100%">
<Input v-model="orderSearchForm.drawnNumber" style="width:240px" disabled /> <Input v-model="orderSearchForm.drawnNumber" style="width:240px" disabled />
<Input v-model="orderSearchForm.productName" style="width:240px" v-show="false" /> <Input v-model="orderSearchForm.productName" style="width:240px" v-show="false" />
<Input v-model="orderSearchForm.bomId" style="width:240px" v-show="false" />
</FormItem> </FormItem>
</Col> </Col>
<Col span="8"> <Col span="8">
...@@ -146,7 +147,7 @@ export default { ...@@ -146,7 +147,7 @@ export default {
bomId: null bomId: null
}, },
ruleValidate: { ruleValidate: {
bomId: [ productId: [
{ {
required: true, required: true,
message: "请选择产品名称", message: "请选择产品名称",
...@@ -231,7 +232,7 @@ export default { ...@@ -231,7 +232,7 @@ export default {
this.selectdata = data; this.selectdata = data;
this.list = []; this.list = [];
this.list.push({ label: data[0].title, value: data[0].id }); this.list.push({ label: data[0].title, value: data[0].id });
if (data[0].isProduct == "1") { if (data[0].isProduct == 1) {
this.orderSearchForm.productName = data[0].title; this.orderSearchForm.productName = data[0].title;
this.orderSearchForm.productId = data[0].productId; this.orderSearchForm.productId = data[0].productId;
this.orderSearchForm.drawnNumber = data[0].drawingNo; this.orderSearchForm.drawnNumber = data[0].drawingNo;
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
<FormItem label="订单编号" style="width:100%">{{this.orderSearchForm.mesCode}}</FormItem> <FormItem label="订单编号" style="width:100%">{{this.orderSearchForm.mesCode}}</FormItem>
</Col> </Col>
<Col span="8"> <Col span="8">
<FormItem :label="l('productName')" style="width:100%" prop="bomId"> <FormItem :label="l('productName')" style="width:100%" prop="productId">
<Select <Select
v-model="orderSearchForm.bomId" v-model="orderSearchForm.productId"
:placeholder="placeholdeinfo" :placeholder="placeholdeinfo"
style="width:240px;" style="width:240px;"
> >
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<FormItem :label="l('drawnNumber')" style="width:100%"> <FormItem :label="l('drawnNumber')" style="width:100%">
<Input v-model="orderSearchForm.drawnNumber" style="width:240px" disabled /> <Input v-model="orderSearchForm.drawnNumber" style="width:240px" disabled />
<Input v-model="orderSearchForm.productName" style="width:240px" v-show="false" /> <Input v-model="orderSearchForm.productName" style="width:240px" v-show="false" />
<Input v-model="orderSearchForm.bomId" style="width:240px" v-show="false" />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -120,7 +121,7 @@ export default { ...@@ -120,7 +121,7 @@ export default {
disabled: false, disabled: false,
orderSearchForm: {}, orderSearchForm: {},
ruleValidate: { ruleValidate: {
bomId: [ productId: [
{ {
required: true, required: true,
message: "请选择产品名称", message: "请选择产品名称",
...@@ -213,6 +214,7 @@ export default { ...@@ -213,6 +214,7 @@ export default {
return this.$t(key); return this.$t(key);
}, },
handleSelect(data) { handleSelect(data) {
this.placeholdeinfo="";
if (data.length > 0) { if (data.length > 0) {
this.selectdata = []; this.selectdata = [];
this.selectdata = data; this.selectdata = data;
...@@ -242,7 +244,7 @@ export default { ...@@ -242,7 +244,7 @@ export default {
projectNumber: "", //项目号 projectNumber: "", //项目号
batchNumber: "", //批次号 batchNumber: "", //批次号
urgencyLevel: null, //紧急程度 urgencyLevel: null, //紧急程度
bomId:'', bomId: ""
}; };
}, },
loadTree() { loadTree() {
...@@ -261,14 +263,23 @@ export default { ...@@ -261,14 +263,23 @@ export default {
}); });
}, },
renderContent(h, { root, node, data }) { renderContent(h, { root, node, data }) {
//渲染树的样式 let type = "md-folder";
let title = data.title;
if (data.isProduct != 0) {
let version = this.$store.getters.dictionaryByCode(
"material.main.version",
data.version
);
type = "ios-image";
if (version) {
title = data.title + "(" + data.mmcode + "/" + version.name + ")";
} else {
title = data.title + "(" + data.mmcode + ")";
}
}
return h( return h(
"span", "span",
{ {
style: {
color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: "pointer"
},
on: { on: {
click: () => { click: () => {
let arrTree = []; let arrTree = [];
...@@ -277,7 +288,25 @@ export default { ...@@ -277,7 +288,25 @@ export default {
} }
} }
}, },
data.title [
h("Icon", {
props: {
type: type
},
style: {
marginRight: "8px"
}
}),
h(
"span",
{
style: {
color: data.isProduct == 0 ? "#000" : "rgba(38, 128, 235, 1)"
}
},
title
)
]
); );
}, },
//时间相关start //时间相关start
...@@ -328,7 +357,9 @@ export default { ...@@ -328,7 +357,9 @@ export default {
row(v) { row(v) {
if (v != null) { if (v != null) {
this.orderSearchForm = this.$u.clone(this.row); this.orderSearchForm = this.$u.clone(this.row);
this.placeholdeinfo = this.orderSearchForm.productName; //this.placeholdeinfo = this.orderSearchForm.productName;
this.list = [];
this.list.push({ label:this.orderSearchForm.productName, value: this.orderSearchForm.productId });
} }
} }
} }
......
...@@ -438,67 +438,6 @@ export default { ...@@ -438,67 +438,6 @@ export default {
]); ]);
} }
} }
// //传list数据时的判断
// {
// title: "操作",
// key: "action",
// width: 180,
// align: "left",
// render: (h, params) => {
// return h("div", { class: "action" }, [
// h(
// "op",
// {
// attrs: { oprate: "detail" },
// on: { click: () => this.detail(params.row) }
// },
// "查看"
// ),
// h(
// "op",
// {
// attrs: { oprate: "edit" },
// on: { click: () => this.edit(params.row) },
// style:
// (params.row.rootId == 0 && params.row.divideMark == 1) ||
// params.row.rootId != 0 ||
// params.row.status != 1
// ? "display:none"
// : ""
// },
// "编辑"
// ),
// h(
// "op",
// {
// attrs: { oprate: "remove" },
// on: { click: () => this.remove(params.row) },
// style:
// (params.row.rootId == 0 && params.row.divideMark == 1) ||
// params.row.status != 1
// ? // ||(params.row.id != params.row.rootId && this.sondeletecheck1(params.row.rootId)>0)
// "display:none"
// : ""
// },
// "删除"
// ),
// h(
// "op",
// {
// attrs: { oprate: "detail" },
// on: { click: () => this.split(params.row) },
// style:
// params.row.divideMark == 1 ||
// params.row.status != 1 ||
// params.row.quantity <= 1
// ? "display:none"
// : ""
// },
// "分解"
// )
// ]);
// }
// }
], ],
treeData: [], treeData: [],
treeInputSearch: "", treeInputSearch: "",
......
...@@ -171,7 +171,8 @@ export default { ...@@ -171,7 +171,8 @@ export default {
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
wfstatu: 1
}; };
}, },
props: { props: {
...@@ -194,24 +195,20 @@ export default { ...@@ -194,24 +195,20 @@ export default {
Api.GetCodeByType(parma) Api.GetCodeByType(parma)
.then(res => { .then(res => {
this.entity.changeorderCode = res.result; this.entity.changeorderCode = res.result;
})
.cathc(err => {
this.$Message.error("数据连接错误");
});
ApiWorkflow.getbyid({ ApiWorkflow.getbyid({
id: "d0cdafe3-2341-4499-a4f5-278ef0f30740" id: "d0cdafe3-2341-4499-a4f5-278ef0f30740"
}) })
.then(res1 => { .then(res1 => {
alret(JSON.stringify(res1))
if (res1.success) { if (res1.success) {
let wfStatus = res1.result.status; let wfStatus = res1.result.status;
if (wfStatus == 0) { if (wfStatus == 0) {
this.submitShow = true; this.submitShow = true;
this.wfstatu = 1;
// this.entity.approvalStatus = 4; // this.entity.approvalStatus = 4;
} else { } else {
// this.entity.approvalStatus = 1; // this.entity.approvalStatus = 1;
this.submitShow = false; this.submitShow = false;
this.wfstatu = 3;
} }
} }
}) })
...@@ -219,6 +216,10 @@ export default { ...@@ -219,6 +216,10 @@ export default {
this.$Message.error("操作失败"); this.$Message.error("操作失败");
console.warn(err); console.warn(err);
}); });
})
.cathc(err => {
this.$Message.error("数据连接错误");
});
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
...@@ -226,13 +227,14 @@ export default { ...@@ -226,13 +227,14 @@ export default {
this.disabled = true; this.disabled = true;
this.entity.handlingOpinions = this.entity.handlingOpinionsId; this.entity.handlingOpinions = this.entity.handlingOpinionsId;
this.entity.routingHeaderId = this.headid; this.entity.routingHeaderId = this.headid;
this.entity.status = 1; this.entity.status = this.wfstatu;
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
if (this.wfstatu == 1) {
if (this.checked) { if (this.checked) {
let params = { let params = {
changeorder_code: this.entity.changeorderCode, changeorder_code: this.entity.changeorderCode,
...@@ -246,6 +248,7 @@ export default { ...@@ -246,6 +248,7 @@ export default {
}); });
this.$refs.changeSendReview.modalInfo = true; this.$refs.changeSendReview.modalInfo = true;
} }
}
} else { } else {
this.$Message.error("保存失败"); this.$Message.error("保存失败");
} }
......
...@@ -135,7 +135,8 @@ export default { ...@@ -135,7 +135,8 @@ export default {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
wfstatu: 1
}; };
}, },
props: { props: {
...@@ -150,13 +151,34 @@ export default { ...@@ -150,13 +151,34 @@ export default {
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.entity = r.result; this.entity = r.result;
ApiWorkflow.getbyid({
id: "d0cdafe3-2341-4499-a4f5-278ef0f30740"
})
.then(res1 => {
if (res1.success) {
let wfStatus = res1.result.status;
if (wfStatus == 0) {
this.submitShow = true;
this.wfstatu=1
// this.entity.approvalStatus = 4;
} else {
// this.entity.approvalStatus = 1;
this.submitShow = false;
this.wfstatu=3
}
}
})
.catch(err => {
this.$Message.error("操作失败");
console.warn(err);
});
}); });
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.status = 1;//修改后(未通过审核或新建的)的状态都为待送审 this.entity.status = this.wfstatu; //修改后(未通过审核或新建的)的状态都为待送审
Api.update(this.entity) Api.update(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment