Commit 8a9f5109 authored by renjintao's avatar renjintao

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

parents 106462c3 a7cbee4c
...@@ -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">
<img src="@/assets/images/home/user.png" /> <div class="user">
</div> <img src="@/assets/images/home/user.png" />
<div class="user-text"> <div class="user-text">
<p>你好:张飞,欢迎登录MES系统!</p> <p>你好:张飞,欢迎登录MES系统!</p>
<p> <p>
<span>xx公司/xx车间xx班组</span> &nbsp &nbsp <span>xx公司/xx车间xx班组</span> &nbsp &nbsp
<span>工艺技术员</span> <span>工艺技术员</span>
</p> </p>
</div> </div>
<div class="incon-carousel"> </div>
<div class="bg-b"> <div class="fg flex">
<Icon type="ios-arrow-back" /> <div class="left">
</div> <Icon type="ios-arrow-back" size="32" />
<div class="bg bg0"> </div>
<Icon type="ios-cube" /> <div class="fg"></div>
<p>电子对账单</p> <div class="right">
</div> <Icon type="ios-arrow-forward" size="32" />
<div class="bg bg1"> </div>
<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>
</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;
float: left; img{
p { float: left;
margin: 10px; }
} }
} .fg {
.incon-carousel { .left,.right{
float: right; width: 50px;
// margin-top: 8px; line-height: 90px;
width: 800px; text-align: center;
.bg-b { color: #A7B8CC;
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> </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
...@@ -2,13 +2,14 @@ ...@@ -2,13 +2,14 @@
<div class="photosensitive"> <div class="photosensitive">
<Modal <Modal
v-model="modalShow" v-model="modalShow"
title="订单报价" title="订单报价5"
width="90%" width="90%"
:mask-closable="false" :mask-closable="false"
@on-cancel="cancel" @on-cancel="cancel"
fullscreen fullscreen
footer-hide footer-hide
> >
{{status}}
<Form :model="formItem" :label-width="80"> <Form :model="formItem" :label-width="80">
<Row type="flex" justify="space-between"> <Row type="flex" justify="space-between">
<Col span="8"> <Col span="8">
...@@ -122,6 +123,7 @@ export default { ...@@ -122,6 +123,7 @@ export default {
zPhotosensitive: { zPhotosensitive: {
result: [] result: []
}, },
status: 0,
row: {}, row: {},
index: "", index: "",
newList: [], newList: [],
...@@ -130,7 +132,8 @@ export default { ...@@ -130,7 +132,8 @@ export default {
contactUser: "", contactUser: "",
contactTel: "", contactTel: "",
quotationType: "AlSi10Mg", quotationType: "AlSi10Mg",
remark: "" remark: "",
status: ""
}, },
values1: "", values1: "",
values2: "", values2: "",
...@@ -265,7 +268,17 @@ export default { ...@@ -265,7 +268,17 @@ export default {
] ]
}; };
}, },
mounted() {}, mounted() {
var data = {
id: "cf192e27-1e81-4000-98ee-392eeb539616"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, data).then(res => {
//流程判断
if (res.success) {
this.status = res.result.status;
}
});
},
watch: { watch: {
gmData: { gmData: {
...@@ -335,6 +348,13 @@ export default { ...@@ -335,6 +348,13 @@ export default {
quotationBox() { quotationBox() {
//订单报价 //订单报价
// console.log(this.newList) // console.log(this.newList)
if (this.status == 0) {
this.formItem.status = 1;
alert(this.formItem.status);
} else {
this.formItem.status = 3;
alert(this.formItem.status);
}
let item = []; let item = [];
let quotationMain = {}; let quotationMain = {};
let data = { let data = {
...@@ -348,21 +368,26 @@ export default { ...@@ -348,21 +368,26 @@ export default {
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true; if (this.status == 1) {
let id = res.result.id; this.modalShow = false;
this.$http.quotation this.$emit("update");
.orderList({ } else {
id: id this.$refs.photosensitive.modalShow = true;
}) let id = res.result.id;
.then(res => { this.$http.quotation
res.result.forEach((data, index) => { .orderList({
res.result[index].quotationId = id; id: id
})
.then(res => {
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
}); });
this.zPhotosensitive.result = res.result; }
})
.catch(error => {
this.$Message.error("请求失败");
});
} }
}) })
.catch(error => { .catch(error => {
...@@ -476,8 +501,8 @@ export default { ...@@ -476,8 +501,8 @@ export default {
} }
}); });
}, },
cancel() { cancel() {
this.$emit('update') this.$emit("update");
} }
} }
}; };
......
...@@ -85,6 +85,7 @@ export default { ...@@ -85,6 +85,7 @@ export default {
zPhotosensitive: { zPhotosensitive: {
result: [] result: []
}, },
status: 0,
row: {}, row: {},
index: "", index: "",
newList: [], newList: [],
...@@ -93,7 +94,8 @@ export default { ...@@ -93,7 +94,8 @@ export default {
contactUser: "", contactUser: "",
contactTel: "", contactTel: "",
quotationType: "光敏树脂", quotationType: "光敏树脂",
remark: "" remark: "",
status: ""
}, },
values1: "", values1: "",
values2: "", values2: "",
...@@ -190,7 +192,17 @@ export default { ...@@ -190,7 +192,17 @@ export default {
// deep: true // deep: true
// } // }
// }, // },
mounted() {}, mounted() {
var data = {
id: "cf192e27-1e81-4000-98ee-392eeb539616"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, data).then(res => {
//流程判断
if (res.success) {
this.status = res.result.status;
}
});
},
computed: { computed: {
Order3D() { Order3D() {
//计算3D打印费=重量(g)*单价(元/g) //计算3D打印费=重量(g)*单价(元/g)
...@@ -215,6 +227,13 @@ export default { ...@@ -215,6 +227,13 @@ export default {
}, },
quotationBox() { quotationBox() {
//订单报价 //订单报价
if (this.status == 0) {
this.formItem.status = 1;
alert(this.formItem.status);
} else {
this.formItem.status = 3;
alert(this.formItem.status);
}
let item = []; let item = [];
let quotationMain = {}; let quotationMain = {};
let data = { let data = {
...@@ -227,22 +246,27 @@ export default { ...@@ -227,22 +246,27 @@ export default {
.then(res => { .then(res => {
if (res.success) { if (res.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$refs.photosensitive.modalShow = true; if (this.status == 1) {
let id = res.result.id; this.modalShow = false;
this.$http.quotation this.$emit("update");
.orderList({ } else {
id: id this.$refs.photosensitive.modalShow = true;
}) let id = res.result.id;
.then(res => { this.$http.quotation
console.log(res); .orderList({
res.result.forEach((data, index) => { id: id
res.result[index].quotationId = id; })
.then(res => {
console.log(res);
res.result.forEach((data, index) => {
res.result[index].quotationId = id;
});
this.zPhotosensitive.result = res.result;
})
.catch(error => {
this.$Message.error("请求失败");
}); });
this.zPhotosensitive.result = res.result; }
})
.catch(error => {
this.$Message.error("请求失败");
});
} }
}) })
.catch(error => { .catch(error => {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="quotation-box"> <div class="quotation-box">
<Modal <Modal
v-model="modalShow" v-model="modalShow"
title="订单报价" title="订单报价1"
width="90%" width="90%"
:mask-closable="false" :mask-closable="false"
@on-cancel="cancel" @on-cancel="cancel"
......
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