Commit bdef2da3 authored by renjintao's avatar renjintao

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

parents 47a22507 f32ccce7
......@@ -89,11 +89,12 @@
}
.img_box {
text-align: center;
margin: auto;
line-height: 350px;
font-size: 32px;
width: 750px;
height: 350px;
background: #ddd;
// background: #ddd;
margin: 10px 0 0 170px;
}
}
......
<template>
<div>
<div class="star" v-if="dispatchStatus==12">
<a class="start" @click="starFun">
<Icon type="md-play" />开工
</a>
<div class="star" v-if="dispatchStatus == 12">
<a class="start" @click="starFun"> <Icon type="md-play" />开工 </a>
</div>
<div class="star" v-else>
<div class="flex fc-b">
<Button class="button" size="large" type="primary" @click="pauseFun" v-show="btnTextStatus">
<Button
class="button"
size="large"
type="primary"
@click="pauseFun"
v-show="btnTextStatus"
>
<Icon type="ios-pause" />
{{btnText}}
{{ btnText }}
</Button>
<Button class="button" size="large" type="primary" @click="goPage(8,'数据填报')">
<Button
class="button"
size="large"
type="primary"
@click="goPage(8, '数据填报')"
>
<Icon type="logo-angular" />数据填报
</Button>
<Button class="button" size="large" type="primary" @click="goPage(7,'质量判定')">
<Button
class="button"
size="large"
type="primary"
@click="goPage(7, '质量判定')"
>
<Icon type="ios-checkmark-circle-outline" />质量判定
</Button>
<Button class="button" size="large" type="primary" @click="transferFn">
......@@ -24,7 +38,7 @@
</div>
<div class="star_step" v-if="false">
<div class="step_item" v-for="i of 6" :key="i">
<p class="icon_A" v-if="i>=4">
<p class="icon_A" v-if="i >= 4">
<Icon type="md-checkmark-circle" />
</p>
<p class="icon_B" v-else>
......@@ -49,43 +63,64 @@
<div class="footer_box">
<div class="ul_box fl">
<ul>
<li>产品名称:{{entity.productName}}</li>
<li>图号:{{entity.drawnNumber}}</li>
<li>产品名称:{{ entity.productName }}</li>
<li>图号:{{ entity.drawnNumber }}</li>
<li>
状态:
<state code="plan.order.status" ref="state" :value="entity.status" type="text" ></state>
<state
code="plan.order.status"
ref="state"
:value="entity.status"
type="text"
></state>
</li>
<li>订单编号:{{entity.mesCode}}</li>
<li>批次号:{{entity.batchNumber}}</li>
<li>计划数量:{{entity.quantity}}</li>
<li>节点日期:{{entity.demandFinishDate}}</li>
<li>订单编号:{{ entity.mesCode }}</li>
<li>批次号:{{ entity.batchNumber }}</li>
<li>计划数量:{{ entity.quantity }}</li>
<li>节点日期:{{ entity.demandFinishDate }}</li>
</ul>
</div>
<div class="ul_box fl">
<ul>
<li>工序名称:{{entity.seqName}}</li>
<li>工序序号:{{entity.seqNo}}</li>
<li>派工数量:{{entity.dispatchQuantity}}</li>
<li>人员信息:{{entity.userNames}}</li>
<li>准备工时:{{entity.setupTime}}</li>
<li>工序名称:{{ entity.seqName }}</li>
<li>工序序号:{{ entity.seqNo }}</li>
<li>派工数量:{{ entity.dispatchQuantity }}</li>
<li>人员信息:{{ entity.userNames }}</li>
<li>准备工时:{{ entity.setupTime }}</li>
<li>
工单状态:
<state code="taskList.status" ref="state1" :value="dispatchStatus" type="text"></state>
<state
code="taskList.status"
ref="state1"
:value="dispatchStatus"
type="text"
></state>
</li>
</ul>
</div>
<div class="img_box fl bgDDD">
<ViewerImg :images="images" />
<div class="img_box fl">
<ViewerImg :images="images" v-if="images" />
<img src="@/assets/imgicon/chan_Pin.png" width="70%" height="100%" />
</div>
</div>
<Modal v-model="ransferModal" :title="transferTitle" fullscreen style="z-index:99999" :footer-hide="cardlist.length==0">
<Modal
v-model="ransferModal"
:title="transferTitle"
fullscreen
style="z-index: 99999"
:footer-hide="cardlist.length == 0"
>
<div class="wu_bgModal">
<div class="mass_box">
<div class="mass_list">
<h2 class="btn_play tl">
选择产品({{cardlist.length}}
<Button class="button" type="primary" @click="allcheck">全选</Button>
<Button class="button" type="primary" @click="rechecked">反选</Button>
选择产品({{ cardlist.length }}
<Button class="button" type="primary" @click="allcheck"
>全选</Button
>
<Button class="button" type="primary" @click="rechecked"
>反选</Button
>
</h2>
<div class="list01 tl">
<Tag
......@@ -93,22 +128,28 @@
:checkable="true"
class="tag_card"
size="large"
v-for="(item,index) in cardlist"
v-for="(item, index) in cardlist"
:name="item.id"
:key="index"
:checked="item.checked"
color="primary"
@on-change="changeCards"
>{{item.product_code}}</Tag>
>{{ item.product_code }}</Tag
>
</div>
</div>
</div>
<div class="mass_box">
<UserSelect ref="userSelected" :datas="userlist" v-model="user" v-width="300" />
<UserSelect
ref="userSelected"
:datas="userlist"
v-model="user"
v-width="300"
/>
</div>
</div>
<div slot="footer">
<Button class="button" @click="ransferModal=false">取消</Button>
<Button class="button" @click="ransferModal = false">取消</Button>
<Button class="button" type="primary" @click="ransOk">确定</Button>
</div>
</Modal>
......@@ -131,8 +172,8 @@ export default {
iamges1: [
{
thumbnail: iconImg + "noPic_product.png",
source: iconImg + "noPic_product.png"
}
source: iconImg + "noPic_product.png",
},
],
entity: {},
id: Number(this.$route.query.id),
......@@ -156,14 +197,14 @@ export default {
nextDetailId: null,
operatorId: null,
userlist: [],
user: null
user: null,
};
},
created() {
// this.treeHeight = window.innerHeight - 120;
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary");
await store.dispatch("loadDictionary");
},
mounted() {
this.load(this.id);
......@@ -179,10 +220,10 @@ export default {
//开工
let params = {
id: this.id,
orderid: this.orderId + ""
orderid: this.orderId + "",
};
Api.entrystart(params)
.then(res => {
.then((res) => {
if (res.success) {
this.$Message.success("开工成功!");
this.dispatchStatus = 14;
......@@ -191,7 +232,7 @@ export default {
this.$Message.error("开工失败!");
}
})
.catch(err => {
.catch((err) => {
this.$Message.error("连接错误");
});
},
......@@ -199,11 +240,11 @@ export default {
//暂停or继续
let params = {
id: this.id,
orderid: this.orderId + ""
orderid: this.orderId + "",
};
if (this.btnText == "暂停") {
Api.entrypause(params)
.then(res => {
.then((res) => {
if (res.success) {
this.$Message.success("暂停成功!");
this.dispatchStatus = 5;
......@@ -213,12 +254,12 @@ export default {
this.$Message.error("暂停失败!");
}
})
.catch(err => {
.catch((err) => {
this.$Message.error("连接错误");
});
} else if (this.btnText == "继续") {
Api.entrentrycontinuestart(params)
.then(res => {
.then((res) => {
if (res.success) {
this.$Message.success("继续成功!");
this.dispatchStatus = 14;
......@@ -228,7 +269,7 @@ export default {
this.$Message.error("继续失败!");
}
})
.catch(err => {
.catch((err) => {
this.$Message.error("连接错误");
});
}
......@@ -253,14 +294,14 @@ export default {
load(v) {
//加载基础数据
let params = {
id: v
id: v,
};
Api.orderanddispatchinfos(params)
.then(r => {
.then((r) => {
if (r.success && r.result) {
this.entity = r.result;
if (r.result.productId && r.result.productId > 0) {
ApiTech.get({ id: r.result.productId }).then(res => {
ApiTech.get({ id: r.result.productId }).then((res) => {
if (res.success && res.result) {
if (
res.result.productUrlList &&
......@@ -275,14 +316,14 @@ export default {
app: "technology",
eid: this.eid,
name: "",
field: ""
field: "",
};
this.$http.sysUser
.getFile(parms)
.then(res1 => {
.then((res1) => {
if (res1.data != [] && res1.data.length > 0) {
this.images.splice(0);
res1.data.forEach(datas => {
res1.data.forEach((datas) => {
let objImag = {};
objImag.thumbnail = this.downUrl + datas.downloadPath;
objImag.source = this.downUrl + datas.downloadPath;
......@@ -292,7 +333,7 @@ export default {
this.images = this.iamges1;
}
})
.catch(err => {
.catch((err) => {
this.images = this.iamges1;
});
}
......@@ -300,7 +341,7 @@ export default {
}
}
})
.catch(e => {
.catch((e) => {
this.$Message.error("连接错误");
});
},
......@@ -318,43 +359,43 @@ export default {
let pid = Number(this.$route.query.id); // JSON.stringify()
let params = {
id: Number(this.$route.query.id),
executeId: Number(this.$route.query.executeId)
executeId: Number(this.$route.query.executeId),
};
Api.productsandoperators(params)
.then(res => {
.then((res) => {
if (res.success && res.result) {
this.detailId = res.result.detailId;
this.nextDetailId = res.result.nextDetailId;
let users = res.result.users;
this.userlist = [];
users.forEach(u => {
users.forEach((u) => {
(u.value = u.id), (u.label = u.userName);
this.userlist.push(u);
});
let resoult = res.result.products;
resoult.filter(u => {
resoult.filter((u) => {
u.checked = false;
this.cardlist.push(u);
});
}
})
.catch(e => {
.catch((e) => {
this.$Message.error("连接错误");
});
},
// 全选
allcheck() {
let cardslist = this.cardlist;
cardslist.map(a => {
cardslist.map((a) => {
a.checked = true;
});
},
// 反选
rechecked() {
let cardslist = this.cardlist;
cardslist.map(b => {
cardslist.map((b) => {
b.checked = !b.checked;
});
},
......@@ -391,23 +432,22 @@ export default {
nextDetailId: this.nextDetailId,
productIds: upList,
operatorId: userInfo[0].id,
operator: userInfo[0].userName
operator: userInfo[0].userName,
};
Api.confirmproductsandoperator(params)
.then(res => {
.then((res) => {
if (res.success && res.result) {
this.$Message.success("转续成功");
this.ransferModal=false
}
else{
this.$Message.error("转续失败");
this.ransferModal = false;
} else {
this.$Message.error("转续失败");
}
})
.catch(e => {
.catch((e) => {
this.$Message.error("连接错误");
});
}
},
},
watch: {
"$route.query.id"(v1) {
......@@ -433,7 +473,7 @@ export default {
},
images(v) {
this.images = v;
}
}
},
},
};
</script>
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