Commit f72ab564 authored by renjintao's avatar renjintao

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

parents f54bf6d8 773de260
<template>
<div class="scheduling">
<div class="aps-l">
<Row class="row-p">
<Col :span="6" class="chan-chi">排产池</Col>
<Col :span="18" class="l-ringht">
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">全部</Radio>
<Radio label="1">未排产</Radio>
<Radio label="2">已排查</Radio>
</RadioGroup>
</Col>
</Row>
<div
class="left-body"
v-for="(li,index) in list"
:key="index"
@click="listData(li.part_task_pk,index)"
:class="isactive == index ? 'addclass' : '' "
>
<Row class="title-i">
<Col :span="20" class="order-code">订单号:{{li.order_id}}</Col>
<Col :span="4" class="order-ringht">
<Icon type="md-close" @click="close" />
</Col>
</Row>
<div class="fa">{{li.routing_version}}</div>
<div class="time-s">
<span>工序:{{li.routing_schema}}</span>
</div>
<div class="time-s">{{li.demand_start}}{{li.demand_finish}}</div>
</div>
</div>
<div class="aps-r">
<Form :model="formItem" :label-width="100">
<FormItem label="工时">
<DatePicker
type="datetimerange"
format="yyyy-MM-dd HH:mm"
placeholder="请选择工时"
v-model="formItem.time"
style="width:300px"
></DatePicker>
</FormItem>
<FormItem label="类型">
<RadioGroup v-model="formItem.radio">
<Radio label="0">人员</Radio>
<Radio label="1">班组</Radio>
</RadioGroup>
</FormItem>
<FormItem label="人员分组形式" v-if="formItem.radio==0">
<Dictionary
disabled
code="aps.scheduling.groupingForm"
v-model="formItem.resourcesType"
type="radio"
></Dictionary>
</FormItem>
<FormItem label="班组" v-if="formItem.radio==1">
<Select v-model="formItem.model1" style="width:200px">
<Option v-for="item in cityList" :value="item.value" :key="item.value">{{ item.label }}</Option>
</Select>
</FormItem>
<FormItem>
<div v-for="(li,index) in listGroup" :key="index" class="list-check">
<!-- <Checkbox-List
:single-list="li"
ref="groups"
@changeData="setData"
:resourcesType="resourcesType"
></Checkbox-List>-->
</div>
</FormItem>
<FormItem label="已选择">
<Tag
closable
@on-close="handleClose"
:key="index"
v-for="(val, index) in tagGroup"
>{{val}}</Tag>
</FormItem>
<FormItem label="备注">
<Input
v-model="formItem.textarea"
type="textarea"
:autosize="{minRows: 2,maxRows: 5}"
placeholder="Enter something..."
></Input>
</FormItem>
<FormItem>
<Button style="margin-left: 8px">取消</Button>
<Button type="primary">下发</Button>
</FormItem>
</Form>
</div>
</div>
</template>
<script>
// import Set from './set'
// import Api from './api'
export default {
name: "list",
// components: {
// Set
// },
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
activeindex: 1,
list: [
{
part_task_pk: "euuei",
order_id: "hdhfk",
routing_version: "fsslllsl",
demand_start: "2020-3-30",
demand_finish: "2020-3-30"
},
{
part_task_pk: "euuei",
order_id: "hdhfk",
routing_version: "fsslllsl",
demand_start: "2020-3-30",
demand_finish: "2020-3-30"
}
],
status: "0", //全部排产0,1为未排产;2为已排查;
partTaskPk: "", //车间
result: [],
isactive: 0,
formItem: {
resourcesType: 0,
input: "",
select: "",
radio: "0",
checkbox: [],
switch: true,
date: "",
time: "",
slider: [20, 50],
textarea: "",
day: 0
},
tagdata: [],
listGroup: [],
tagGroup: [],
cityList: [
{
value: "New York",
label: "New York"
},
{
value: "London",
label: "London"
},
{
value: "Sydney",
label: "Sydney"
},
{
value: "Ottawa",
label: "Ottawa"
},
{
value: "Paris",
label: "Paris"
},
{
value: "Canberra",
label: "Canberra"
}
]
};
},
created() {
// this.orderlist()
},
methods: {
// 过滤条件
changeStatus(a) {
console.log(a);
// this.orderlist(a);
},
orderlist(a) {
if (a == 0) {
//全部
} else if (a == 1) {
//未排产
} else if (a == 2) {
//已排产
}
Api.getmesorder({ status: 2, workshop_id: 3 }).then(r => {
// console.log(r)
if (r.success) {
this.list = r.result;
this.listData(r.result[0].part_task_pk, 0);
}
});
},
listData(li, index) {
this.isactive = index;
},
tagTata(name) {
if (name == "all") {
this.status = "";
}
if (name == "yi") {
this.status = 13;
}
if (name == "wei") {
this.status = 0;
}
let data = {
part_task_pk: this.partTaskPk,
status: this.status
};
Api.gettaskseqinfo(data).then(r => {
// console.log(r)
if (r.success) {
this.result = r.result;
}
});
},
close() {},
getList(v) {},
handleClose(nodeKey) {
// this.$refs.users.handleCheck({ checked: false, nodeKey: nodeKey });
},
setData(val) {
this.tagGroup = val;
}
}
};
</script>
<style lang="less" scoped>
.addclass {
border-color: rgba(38, 128, 235, 0.5) !important;
.title-i {
background: rgba(38, 128, 235, 0.5) !important;
}
}
.scheduling {
display: flex;
display: -webkit-flex;
height: 100%;
.aps-l {
width: 20%;
border-right: 1px solid #e4e6ed;
height: 86vh;
padding: 0 15px 10px 10px;
overflow: auto;
.row-p {
border-bottom: 1px solid #e4e6ed;
padding: 5px;
.chan-chi {
font-size: 14px;
font-weight: bold;
margin-top: 3px;
}
.l-ringht {
text-align: right;
}
}
.left-body:hover {
cursor: pointer;
border-color: rgba(38, 128, 235, 0.5);
.title-i {
background: rgba(38, 128, 235, 0.5) !important;
}
}
.left-body {
margin-top: 15px;
border: 1px solid rgba(228, 230, 237, 1);
border-radius: 4px;
.title-i {
padding: 0 8px;
height: 34px;
line-height: 34px;
color: #515a6e;
background: #e4e6ed;
.order-ringht {
text-align: right;
.ivu-icon {
cursor: pointer;
}
}
}
.fa {
height: 32px;
line-height: 32px;
color: rgba(38, 128, 235, 1);
padding: 5px 8px 0 8px;
}
.time-s {
padding: 0 8px;
height: 32px;
line-height: 32px;
color: #515a6e;
}
}
}
.aps-r {
border: 1px solid rgba(228, 230, 237, 1);
width: 80%;
padding: 15px 15px 15px 30px;
margin-left: 20px;
box-shadow: darkgrey 2px 2px 8px 1px; //边框阴影
.list-check {
border-color: rgba(38, 128, 235, 0.5);
}
}
}
</style>
\ No newline at end of file
...@@ -43,10 +43,10 @@ ...@@ -43,10 +43,10 @@
style="margin-right:15px;" style="margin-right:15px;"
type="info" type="info"
> >
<a href="javascript:;">整机排产&nbsp;&nbsp;&nbsp;</a> <a href="javascript:;" @click="goCemplate">整机排产&nbsp;&nbsp;&nbsp;</a>
</Badge> </Badge>
<Badge :count="this.$store.state.countRun" overflow-count="99" type="info"> <Badge :count="this.$store.state.countRun" overflow-count="99" type="info">
<a href="javascript:;">流水排产&nbsp;&nbsp;&nbsp;</a> <a href="javascript:;" @click="goStream">流水排产&nbsp;&nbsp;&nbsp;</a>
</Badge> </Badge>
</template> </template>
<template slot="searchForm"> <template slot="searchForm">
...@@ -90,7 +90,8 @@ ...@@ -90,7 +90,8 @@
</RadioGroup> </RadioGroup>
<p class="pl30 pt10" v-show="scheduleType!=''"> <p class="pl30 pt10" v-show="scheduleType!=''">
确定将订单 <span class="fwBold">{{resultsOrderList}}</span> 移入 确定将订单
<span class="fwBold">{{resultsOrderList}}</span> 移入
<span class="red fwBold">{{scheduleTypeName}}</span> <span class="red fwBold">{{scheduleTypeName}}</span>
</p> </p>
<p>&nbsp;</p> <p>&nbsp;</p>
...@@ -455,8 +456,8 @@ export default { ...@@ -455,8 +456,8 @@ export default {
}, },
modalSchedule() { modalSchedule() {
//移入排产 //移入排产
this.scheduleType="" this.scheduleType = "";
this.scheduleTypeName="" this.scheduleTypeName = "";
this.listBatchIds = this.listBatchIds1; this.listBatchIds = this.listBatchIds1;
if (this.scheduleStatus == 1) { if (this.scheduleStatus == 1) {
this.scheduleModal = true; this.scheduleModal = true;
...@@ -466,11 +467,11 @@ export default { ...@@ -466,11 +467,11 @@ export default {
}, },
goMethod(value) { goMethod(value) {
//行内点击后面按钮 //行内点击后面按钮
this.canselFooter() this.canselFooter();
this.resultsOrderList = value.mesCode; this.resultsOrderList = value.mesCode;
this.listBatchIds = [value.id]; this.listBatchIds = [value.id];
this.scheduleType="" this.scheduleType = "";
this.scheduleTypeName="" this.scheduleTypeName = "";
if (value.mainRoutingSetStatus == 0) { if (value.mainRoutingSetStatus == 0) {
//this.dispatchStatus = 1 //this.dispatchStatus = 1
//this.scheduleStatus = 0 //this.scheduleStatus = 0
...@@ -529,6 +530,17 @@ export default { ...@@ -529,6 +530,17 @@ export default {
} }
}); });
}, },
goCemplate() {
this.$router.push({
name: "aps-complete"
});
},
goStream() {
this.$router.push({
name: "aps-stream"
});
},
addOk() { addOk() {
this.$refs.grid.load(); this.$refs.grid.load();
this.addModal = false; this.addModal = false;
...@@ -618,16 +630,17 @@ export default { ...@@ -618,16 +630,17 @@ export default {
//移入排产成功后给标题增加数量 //移入排产成功后给标题增加数量
changeCountOut(type, count) { changeCountOut(type, count) {
switch (type) { switch (type) {
case "2"://智能排产池排产订单数量 case "2": //智能排产池排产订单数量
this.$store.commit("setCountAi", this.$store.state.countAi + count); this.$store.commit("setCountAi", this.$store.state.countAi + count);
break; break;
case "3"://整机排产池排产订单数量 case "3": //整机排产池排产订单数量
this.$store.commit("setCountAll", this.$store.state.countAll + count); this.$store.commit("setCountAll", this.$store.state.countAll + count);
break; break;
case "4"://流水排产池排产订单数量 case "4": //流水排产池排产订单数量
this.$store.commit("setCountRun", this.$store.state.countRun + count); this.$store.commit("setCountRun", this.$store.state.countRun + count);
break; break;
default://APS排产池排产订单数量 default:
//APS排产池排产订单数量
this.$store.commit("setCountAps", this.$store.state.countAps + count); this.$store.commit("setCountAps", this.$store.state.countAps + count);
} }
}, },
...@@ -639,11 +652,10 @@ export default { ...@@ -639,11 +652,10 @@ export default {
this.$store.commit("setCountRun", 0); this.$store.commit("setCountRun", 0);
Api.getpoolordercount() Api.getpoolordercount()
.then(res => { .then(res => {
if (res.success && res.result.length>1) { if (res.success && res.result.length > 1) {
res.result.forEach(data=> res.result.forEach(data => {
{ this.changeCountOut(data.poolType + "", data.count);
this.changeCountOut(data.poolType+'',data.count) });
})
} }
}) })
.catch(err => { .catch(err => {
......
...@@ -2,7 +2,14 @@ ...@@ -2,7 +2,14 @@
<div class="scheduling"> <div class="scheduling">
<div class="aps-l"> <div class="aps-l">
<Row class="row-p"> <Row class="row-p">
<Col :span="9" class="chan-chi">排产池</Col> <Col :span="6" class="chan-chi">排产池</Col>
<Col :span="18" class="l-ringht">
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">全部</Radio>
<Radio label="1">未排产</Radio>
<Radio label="2">已排查</Radio>
</RadioGroup>
</Col>
</Row> </Row>
<div <div
class="left-body" class="left-body"
...@@ -18,8 +25,8 @@ ...@@ -18,8 +25,8 @@
</Col> </Col>
</Row> </Row>
<div class="fa">{{li.routing_version}}</div> <div class="fa">{{li.routing_version}}</div>
<div class="gong-xu"> <div class="time-s">
<Icon type="ios-copy" /> <!-- <Icon type="ios-copy" /> -->
<span>工序:{{li.routing_schema}}</span> <span>工序:{{li.routing_schema}}</span>
</div> </div>
<div class="time-s">{{li.demand_start}}{{li.demand_finish}}</div> <div class="time-s">{{li.demand_start}}{{li.demand_finish}}</div>
...@@ -30,11 +37,11 @@ ...@@ -30,11 +37,11 @@
<Row class="g-list"> <Row class="g-list">
<Col :span="2" class="chan-chi">工序列表</Col> <Col :span="2" class="chan-chi">工序列表</Col>
<Col :span="22" class="l-ringht"> <Col :span="22" class="l-ringht">
<Tabs v-model="selectName" type="card" @on-click="tagClick"> <RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<TabPane label="全部" name="all"></TabPane> <Radio label="0">全部</Radio>
<TabPane label="已排产" name="yi"></TabPane> <Radio label="1">未排产</Radio>
<TabPane label="未排产" name="wei"></TabPane> <Radio label="2">已排查</Radio>
</Tabs> </RadioGroup>
</Col> </Col>
</Row> </Row>
<div class="right-body"> <div class="right-body">
...@@ -44,80 +51,100 @@ ...@@ -44,80 +51,100 @@
</div> </div>
</template> </template>
<script> <script>
import List from './list.vue' import List from "./list.vue";
import Api from './api' import Api from "./api";
export default { export default {
name: 'list', name: "list",
components: { components: {
List List
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
data() { data() {
return { return {
activeindex: 1, activeindex: 1,
list: [], list: [
status: '', //为空是全部排产,0为未排产;13为已排查; {
partTaskPk: '', //车间 part_task_pk: "euuei",
order_id: "hdhfk",
routing_version: "fsslllsl",
demand_start: "2020-3-30",
demand_finish: "2020-3-30"
},
{
part_task_pk: "euuei",
order_id: "hdhfk",
routing_version: "fsslllsl",
demand_start: "2020-3-30",
demand_finish: "2020-3-30"
}
],
status: "0", //全部排产0,1为未排产;2为已排查;
partTaskPk: "", //车间
result: [], result: [],
isactive: 0, isactive: 0,
selectName: 'all' selectName: "all"
} };
}, },
created() { created() {
this.orderlist() // this.orderlist();
}, },
methods: { methods: {
// 过滤条件
changeStatus(a) {
console.log(a);
// this.orderlist(a);
},
orderlist() { orderlist() {
Api.getmesorder({ status: 2, workshop_id: 3 }).then((r) => { Api.getmesorder({ status: 2, workshop_id: 3 }).then(r => {
// console.log(r) // console.log(r)
if (r.success) { if (r.success) {
this.list = r.result this.list = r.result;
this.listData(r.result[0].part_task_pk, 0) this.listData(r.result[0].part_task_pk, 0);
} }
}) });
}, },
listData(li, index) { listData(li, index) {
this.status = '' this.status = "";
this.partTaskPk = li this.partTaskPk = li;
this.tagClick('all') this.tagClick("all");
this.isactive = index this.isactive = index;
}, },
tagClick(name) { tagClick(name) {
this.selectName = name this.selectName = name;
this.tagTata(this.selectName) this.tagTata(this.selectName);
}, },
tagTata(name) { tagTata(name) {
if (name == 'all') { if (name == "all") {
this.status = '' this.status = "";
} }
if (name == 'yi') { if (name == "yi") {
this.status = 13 this.status = 13;
} }
if (name == 'wei') { if (name == "wei") {
this.status = 0 this.status = 0;
} }
let data = { let data = {
part_task_pk: this.partTaskPk, part_task_pk: this.partTaskPk,
status: this.status status: this.status
} };
Api.gettaskseqinfo(data).then((r) => { Api.gettaskseqinfo(data).then(r => {
// console.log(r) // console.log(r)
if (r.success) { if (r.success) {
this.result = r.result this.result = r.result;
} }
}) });
}, },
close() {} close() {}
} }
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.addclass { .addclass {
border-color: #249e91 !important; border-color: rgba(38, 128, 235, 0.5) !important;
.title-i { .title-i {
background: #249e91 !important; background: rgba(38, 128, 235, 0.5) !important;
} }
} }
.scheduling { .scheduling {
...@@ -125,13 +152,14 @@ export default { ...@@ -125,13 +152,14 @@ export default {
display: -webkit-flex; display: -webkit-flex;
height: 100%; height: 100%;
.aps-l { .aps-l {
width: 25%; width: 20%;
border-right: 1px solid #e4e6ed; border-right: 1px solid #e4e6ed;
height: 100%; height: 86vh;
padding: 0 15px 10px 10px; padding: 0 15px 10px 10px;
overflow: auto; overflow: auto;
.row-p { .row-p {
border-bottom: 1px solid #e4e6ed; border-bottom: 1px solid #e4e6ed;
padding: 5px;
.chan-chi { .chan-chi {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
...@@ -141,6 +169,13 @@ export default { ...@@ -141,6 +169,13 @@ export default {
text-align: right; text-align: right;
} }
} }
.left-body:hover {
cursor: pointer;
border-color: rgba(38, 128, 235, 0.5);
.title-i {
background: rgba(38, 128, 235, 0.5) !important;
}
}
.left-body { .left-body {
margin-top: 15px; margin-top: 15px;
border: 1px solid rgba(228, 230, 237, 1); border: 1px solid rgba(228, 230, 237, 1);
...@@ -162,15 +197,9 @@ export default { ...@@ -162,15 +197,9 @@ export default {
.fa { .fa {
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
color: #249e91; color: rgba(38, 128, 235, 1);
padding: 5px 8px 0 8px; padding: 5px 8px 0 8px;
} }
.gong-xu {
padding: 0 8px;
height: 32px;
line-height: 32px;
color: #515a6e;
}
.time-s { .time-s {
padding: 0 8px; padding: 0 8px;
height: 32px; height: 32px;
...@@ -180,18 +209,17 @@ export default { ...@@ -180,18 +209,17 @@ export default {
} }
} }
.aps-r { .aps-r {
width: 75%; width: 80%;
padding: 0 15px; padding: 0 15px;
.g-list { .g-list {
font-size: 14px; font-size: 14px;
font-weight: bold; width: 100%;
border-bottom: 1px solid #e4e6ed;
.chan-chi { .chan-chi {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
margin-top: 3px; margin-top: 3px;
padding-bottom: 6px; padding-bottom: 6px;
border-bottom: 1px solid #e4e6ed;
} }
.l-ringht { .l-ringht {
text-align: left; text-align: left;
......
<style lang="less">
@import '../technolog.less';
</style>
<template>
<div class="details_box">
<h4 class="details_top tc">
<a class="back_href" @click="back"> <Icon type="ios-undo-outline" />返回工艺规程</a>
<div>工艺信息</div>
</h4>
<div class="details_body">
<Menu mode="horizontal" theme="light" :active-name="actNum">
<MenuItem name="1">
<Icon type="ios-paper" />
工序
</MenuItem>
<MenuItem name="2">
<Icon type="ios-people" />
质控卡
</MenuItem>
<MenuItem name="4">
<Icon type="ios-construct" />
工艺BOM
</MenuItem>
<MenuItem name="5">
<Icon type="ios-construct" />
生产准备
</MenuItem>
</Menu>
</div>
</div>
</template>
<script>
export default {
components: {},
data() {
return {
showMenu:true,
treeHeight: '',
actNum:'1',
}
},
created() {
this.treeHeight = window.innerHeight - 140
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 140
})()
}
},
computed: {
},
methods: {
hideMenu(){
this.showMenu = false
this.$Message.info("收起左侧树")
},
showMenuFn(){
this.showMenu = true
this.$Message.info("展开左侧树")
},
}
}
</script>
<style lang="less">
@import './technolog.less';
</style>
<template>
<div class="layout">
<Layout>
<Sider hide-trigger v-if="showMenu" style="color: #fff;">
<div class="side_tree" :style="{ height: treeHeight + 'px' }">
<h3 class="tree_tit">产品结构
<a class="menu_play fr" @click="hideMenu"><Icon type="md-arrow-back" /></a>
</h3>
</div>
</Sider>
<div v-if="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn"><Icon type="md-arrow-forward" /></a>
</div>
<Layout>
<!-- <Header style="color: #fff;">Header</Header> -->
<Content :style="{ height: treeHeight + 'px' }">Content</Content>
<!-- <Footer>Footer</Footer> -->
</Layout>
</Layout>
</div>
</template>
<script>
export default {
components: {},
data() {
return {
showMenu:true,
treeHeight: '',
}
},
created() {
this.treeHeight = window.innerHeight - 140
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 140
})()
}
},
computed: {
},
methods: {
hideMenu(){
this.showMenu = false
this.$Message.info("收起左侧树")
},
showMenuFn(){
this.showMenu = true
this.$Message.info("展开左侧树")
},
}
}
</script>
.side_tree{
background: #ffffff;
// width: 300px;
border: 1px solid #ddd;
.tree_tit{
background: #afabab;
color: #000;
.menu_play{
width: 30px;
text-align: center;
color: #646464;
border: 1px solid #000;
}
}
}
.show_menu{
.menu_play{
width: 30px;
text-align: center;
color: #646464;
border: 1px solid #000;
}
}
.details_box{
.details_top{
height: 32px;
line-height: 32px;
position: relative;
.back_href{
position: absolute;
left: 110px;
top: 0;
.ivu-icon{
font-size: 20px;
}
}
}
}
\ No newline at end of file
...@@ -46,7 +46,7 @@ const systemApi = { ...@@ -46,7 +46,7 @@ const systemApi = {
window.workflowUrl = `http://${address}:10060/api/services/app`; // 工作流地址 window.workflowUrl = `http://${address}:10060/api/services/app`; // 工作流地址
window.certificateUrl = `http://${address}:10090/api/services/app`; //Process-api window.certificateUrl = `http://${address}:10090/api/services/app`; //Process-api
window.crmUrl = `http://${address}:10100/api/services/app`; //crm客户、合同、项目管理 window.crmUrl = `http://${address}:10100/api/services/app`; //crm客户、合同、项目管理
window.iconImg = `http://${hostAddress}:3000/imgicon/`; //待办任务图标路径 window.iconImg = `http://${hostAddress}:3006/imgicon/`; //待办任务图标路径
window.apsManualUrl = `http://${apsAdress}:10091/api/services/app`;//aps手工排产 window.apsManualUrl = `http://${apsAdress}:10091/api/services/app`;//aps手工排产
window.apsUrl = `http://${apsAdress}:10110/api/services/app`;//aps排产 window.apsUrl = `http://${apsAdress}:10110/api/services/app`;//aps排产
//oidc配置: //oidc配置:
......
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