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 @@
.ivu-btn {
padding: 4px 15px 4px;
}
.ivu-layout{
background-color: #fff !important;
.ivu-layout-content{
background-color: #fff ;
}
.ivu-modal-wrap * {
box-sizing: border-box;
......
......@@ -362,8 +362,8 @@ export default {
}
.product-layout {
.i-layout-content {
padding: 5px 10px;
height: calc(100vh - 100px);
padding: 5px 10px 0 10px;
height: calc(100vh - 90px);
}
.i-tabs {
width: 100% !important;
......
......@@ -83,7 +83,7 @@
<Option
v-for="(item,index) in listCal"
:key="index"
:value="item.id"
:value="item.calid"
:label="item.calname"
></Option>
</Select>
......@@ -160,7 +160,7 @@ export default {
opTaskPk: 0,
taskSeq: "",
flog: 5, //参数应用范围
calId: -1,
calId:"",
planState: false,
planMethod: "重叠", // 平行 重叠
over: false,
......@@ -364,7 +364,7 @@ export default {
opTaskPk: this.row.op_task_pk,
taskSeq: this.row.task_seq,
flog: 0, //参数应用范围
calId: parseInt(this.row.cal_id),
calId: this.row.cal_id,
planState: this.row.plan_method == "平行",
planMethod: this.row.plan_method, // 平行 重叠
over: this.row.over_time == "加班",
......
<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" />
<Card>
<div class="flex">
<div class="user">
<img src="@/assets/images/home/user.png" />
<div class="user-text">
<p>你好:张飞,欢迎登录MES系统!</p>
<p>
<span>xx公司/xx车间xx班组</span> &nbsp &nbsp
<span>工艺技术员</span>
</p>
</div>
</div>
<div class="fg flex">
<div class="left">
<Icon type="ios-arrow-back" size="32" />
</div>
<div class="fg"></div>
<div class="right">
<Icon type="ios-arrow-forward" size="32" />
</div>
</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
},
name: "",
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);
}
return {};
}
};
</script>
<style lang="less" scoped>
<style lang="less">
.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;
}
background: rgba(245, 246, 250, 1);
margin: -5px -10px -50px -10px;
height: 100%;
padding: 5px 10px;
.flex{
height: 90px;
.user{
width: 600px;
img{
float: left;
}
}
.fg {
.left,.right{
width: 50px;
line-height: 90px;
text-align: center;
color: #A7B8CC;
}
}
.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
<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 @@
<Form :model="orderSearchForm" :label-width="95" :rules="ruleValidate" ref="formValidate">
<Row>
<Col span="8">
<FormItem label="产品名称" style="width:100%" prop="bomId">
<FormItem label="产品名称" style="width:100%" prop="productId">
<Select
v-model="orderSearchForm.bomId"
v-model="orderSearchForm.productId"
:placeholder="placeholdeinfo"
style="width:240px;"
>
......@@ -13,8 +13,8 @@
v-for="(item,index) in list"
:key="item.index"
:value="item.value"
style="display:none"
:label="item.label"
style="display:none"
></Option>
<Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree>
</Select>
......@@ -24,6 +24,7 @@
<FormItem label="产品图号" style="width:100%">
<Input v-model="orderSearchForm.drawnNumber" style="width:240px" disabled />
<Input v-model="orderSearchForm.productName" style="width:240px" v-show="false" />
<Input v-model="orderSearchForm.bomId" style="width:240px" v-show="false" />
</FormItem>
</Col>
<Col span="8">
......@@ -146,7 +147,7 @@ export default {
bomId: null
},
ruleValidate: {
bomId: [
productId: [
{
required: true,
message: "请选择产品名称",
......@@ -231,7 +232,7 @@ export default {
this.selectdata = data;
this.list = [];
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.productId = data[0].productId;
this.orderSearchForm.drawnNumber = data[0].drawingNo;
......
......@@ -5,9 +5,9 @@
<FormItem label="订单编号" style="width:100%">{{this.orderSearchForm.mesCode}}</FormItem>
</Col>
<Col span="8">
<FormItem :label="l('productName')" style="width:100%" prop="bomId">
<FormItem :label="l('productName')" style="width:100%" prop="productId">
<Select
v-model="orderSearchForm.bomId"
v-model="orderSearchForm.productId"
:placeholder="placeholdeinfo"
style="width:240px;"
>
......@@ -26,6 +26,7 @@
<FormItem :label="l('drawnNumber')" style="width:100%">
<Input v-model="orderSearchForm.drawnNumber" style="width:240px" disabled />
<Input v-model="orderSearchForm.productName" style="width:240px" v-show="false" />
<Input v-model="orderSearchForm.bomId" style="width:240px" v-show="false" />
</FormItem>
</Col>
</Row>
......@@ -120,7 +121,7 @@ export default {
disabled: false,
orderSearchForm: {},
ruleValidate: {
bomId: [
productId: [
{
required: true,
message: "请选择产品名称",
......@@ -148,7 +149,7 @@ export default {
placeholdeinfo: "",
list: [],
data1: [],
wfstatu: 1
wfstatu: 1
};
},
props: {
......@@ -160,7 +161,7 @@ export default {
}
},
mounted() {
let params = {
let params = {
id: "123327da-42b3-41f6-b785-cf933f137a95"
};
this.$api.get(`${workflowUrl}/schema/getbyid`, params).then(res => {
......@@ -213,6 +214,7 @@ export default {
return this.$t(key);
},
handleSelect(data) {
this.placeholdeinfo="";
if (data.length > 0) {
this.selectdata = [];
this.selectdata = data;
......@@ -242,7 +244,7 @@ export default {
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null, //紧急程度
bomId:'',
bomId: ""
};
},
loadTree() {
......@@ -261,14 +263,23 @@ export default {
});
},
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(
"span",
{
style: {
color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: "pointer"
},
on: {
click: () => {
let arrTree = [];
......@@ -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
......@@ -328,7 +357,9 @@ export default {
row(v) {
if (v != null) {
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 {
]);
}
}
// //传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: [],
treeInputSearch: "",
......
......@@ -171,7 +171,8 @@ export default {
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
}
},
wfstatu: 1
};
},
props: {
......@@ -194,31 +195,31 @@ export default {
Api.GetCodeByType(parma)
.then(res => {
this.entity.changeorderCode = res.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);
});
})
.cathc(err => {
this.$Message.error("数据连接错误");
});
ApiWorkflow.getbyid({
id: "d0cdafe3-2341-4499-a4f5-278ef0f30740"
})
.then(res1 => {
alret(JSON.stringify(res1))
if (res1.success) {
let wfStatus = res1.result.status;
if (wfStatus == 0) {
this.submitShow = true;
// this.entity.approvalStatus = 4;
} else {
// this.entity.approvalStatus = 1;
this.submitShow = false;
}
}
})
.catch(err => {
this.$Message.error("操作失败");
console.warn(err);
});
},
handleSubmit() {
this.$refs.form.validate(v => {
......@@ -226,25 +227,27 @@ export default {
this.disabled = true;
this.entity.handlingOpinions = this.entity.handlingOpinionsId;
this.entity.routingHeaderId = this.headid;
this.entity.status = 1;
this.entity.status = this.wfstatu;
Api.create(this.entity)
.then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
if (this.checked) {
let params = {
changeorder_code: this.entity.changeorderCode,
pageindex: 1,
pageSize: 10
};
Api.getpaged1(params).then(res => {
this.$refs.changeSendReview.info.changeInfo =
res.result.items[0];
this.$refs.changeSendReview.changeorder_code = this.entity.changeorderCode;
});
this.$refs.changeSendReview.modalInfo = true;
if (this.wfstatu == 1) {
if (this.checked) {
let params = {
changeorder_code: this.entity.changeorderCode,
pageindex: 1,
pageSize: 10
};
Api.getpaged1(params).then(res => {
this.$refs.changeSendReview.info.changeInfo =
res.result.items[0];
this.$refs.changeSendReview.changeorder_code = this.entity.changeorderCode;
});
this.$refs.changeSendReview.modalInfo = true;
}
}
} else {
this.$Message.error("保存失败");
......
......@@ -135,7 +135,8 @@ export default {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
}
},
wfstatu: 1
};
},
props: {
......@@ -150,13 +151,34 @@ export default {
load(v) {
Api.get({ id: v }).then(r => {
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() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
this.entity.status = 1;//修改后(未通过审核或新建的)的状态都为待送审
this.entity.status = this.wfstatu; //修改后(未通过审核或新建的)的状态都为待送审
Api.update(this.entity)
.then(r => {
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