Commit 77013c07 authored by renjintao's avatar renjintao

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

parents 68beba9d f3cfc179
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<Checkbox <Checkbox
v-model="li.checked" v-model="li.checked"
@on-change="checkData(li)" @on-change="checkData(li)"
:disabled="isdisabled" :disabled="li.status==0?false:true"
>订单号:{{li.mesCode}}</Checkbox> >订单号:{{li.mesCode}}</Checkbox>
</Col> </Col>
<Col :span="4" class="order-ringht"> <Col :span="4" class="order-ringht">
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button style="margin-left: 8px" @click="closeOk">取消</Button> <Button style="margin-left: 8px" @click="closeOk">取消</Button>
<Button type="primary" @click="lowerHair">下发</Button> <Button type="primary" @click="lowerHair" v-if="showXia">下发</Button>
</FormItem> </FormItem>
</Form> </Form>
</div> </div>
...@@ -135,8 +135,8 @@ export default { ...@@ -135,8 +135,8 @@ export default {
data() { data() {
return { return {
list: [], list: [],
showXia: true,
status: "0", //全部排产-1,0为未排产;2为已排查; status: "0", //全部排产-1,0为未排产;2为已排查;
isdisabled: false,
formItem: { formItem: {
radio: "0", radio: "0",
time: "", time: "",
...@@ -192,10 +192,10 @@ export default { ...@@ -192,10 +192,10 @@ export default {
changeStatus(name) { changeStatus(name) {
this.status = name; this.status = name;
this.orderlist(this.status); this.orderlist(this.status);
if (this.status == 1) { if (this.status == 0) {
this.isdisabled = true; this.showXia = true;
} else { } else {
this.isdisabled = false; this.showXia = false;
} }
}, },
//排产池列表 //排产池列表
......
<template>
<div class="compare">
<div class="btn">
<Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div class="compare_box">
<div class="left_list">
</div>
<div class="right_add"></div>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
data() {
return {
code: '2',
name: '添加',
tree: []
}
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
components: {},
created() {},
mounted() {},
methods: {
// 下发
parameter() {
Api.processschemedispatch({
id: this.id
}).then(r => {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
} else {
this.$Message.success("下发失败");
}
});
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
tabChange(name) {
if(name=='technicalcoordination')
{
this.$refs.technicalcoordination.loadchangelist();
}
if(name=='unqualifiedorder')
{
this.$refs.unqualifiedorder.loadchangelist();
}
},
}
}
</script>
<style lang="less">
</style>
<style lang="less">
@import './results.less';
</style>
<template> <template>
<div class="results"> <div class="results">
<Layout> <Layout>
...@@ -26,25 +29,36 @@ ...@@ -26,25 +29,36 @@
</div> </div>
</Sider> </Sider>
<Content> <Content>
<h4>排产结果</h4> <Tabs value="name1" :animated="false">
<TabPane label="结果列表" name="name1">
<resultsList ref="resultsList"/>
</TabPane>
<!-- <TabPane label="结果甘特图" name="name2">结果甘特图</TabPane> -->
<TabPane label="方案对比" name="name3">
<compareList ref="compareList"/>
</TabPane>
</Tabs>
<!-- <h4>排产结果</h4>
<div class="btn"> <div class="btn">
<Button type="primary" @click="parameter">下发</Button> <Button type="primary" @click="parameter">下发</Button> -->
<!-- <Button type="primary">导出</Button> --> <!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button> <!-- <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div> </div>
<div> <div>
<Table :columns="columns" :data="data"></Table> <Table :columns="columns" :data="data"></Table>
</div> </div> -->
</Content> </Content>
</Layout> </Layout>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import expandRow from "./table-expand.vue"; // import expandRow from "./table-expand.vue";expandRow,
import resultsList from "./result.vue";
import compareList from "./compare.vue";
export default { export default {
components: { expandRow }, components: { resultsList,compareList },
data() { data() {
return { return {
...@@ -52,81 +66,81 @@ export default { ...@@ -52,81 +66,81 @@ export default {
data: [], data: [],
list: [], list: [],
id: "", id: "",
columns: [ // columns: [
{ // {
type: "expand", // type: "expand",
width: 50, // width: 50,
render: (h, params) => { // render: (h, params) => {
return h(expandRow, { // return h(expandRow, {
props: { // props: {
row: params.row // row: params.row
} // }
}); // });
} // }
}, // },
{ // {
title: "超期预警", // title: "超期预警",
key: "alert", // key: "alert",
align: "center", // align: "center",
render: (h, params) => { // render: (h, params) => {
return h("div", [ // return h("div", [
h("Icon", { // h("Icon", {
props: { // props: {
type: // type:
params.row.alert == true // params.row.alert == true
? "ios-information-circle-outline" // ? "ios-information-circle-outline"
: "ios-remove-circle-outline" // : "ios-remove-circle-outline"
}, // },
style: { // style: {
marginRight: "5px", // marginRight: "5px",
fontSize: "18px", // fontSize: "18px",
fontWeight: "bold", // fontWeight: "bold",
color: params.row.alert == true ? "#FE7777" : "#0DD78D" // color: params.row.alert == true ? "#FE7777" : "#0DD78D"
} // }
}) // })
]); // ]);
} // }
}, // },
{ // {
title: "零件图号", // title: "零件图号",
key: "part_id", // key: "part_id",
align: "center" // align: "center"
}, // },
{ // {
title: "零件名称", // title: "零件名称",
key: "part_name", // key: "part_name",
align: "center" // align: "center"
}, // },
{ // {
title: "计划开始时间", // title: "计划开始时间",
key: "plan_start", // key: "plan_start",
width: 200, // width: 200,
align: "center" // align: "center"
}, // },
{ // {
title: "计划结束时间", // title: "计划结束时间",
key: "plan_start", // key: "plan_start",
width: 200, // width: 200,
align: "center" // align: "center"
}, // },
{ // {
title: "投料时间", // title: "投料时间",
key: "demand_start", // key: "demand_start",
width: 200, // width: 200,
align: "center" // align: "center"
}, // },
{ // {
title: "节点时间", // title: "节点时间",
key: "demand_finish", // key: "demand_finish",
width: 200, // width: 200,
align: "center" // align: "center"
}, // },
{ // {
title: "计划数量", // title: "计划数量",
key: "plan_qty", // key: "plan_qty",
align: "center" // align: "center"
} // }
] // ]
}; };
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -202,60 +216,4 @@ export default { ...@@ -202,60 +216,4 @@ export default {
} }
} }
}; };
</script> </script>
<style lang="less" scoped> \ No newline at end of file
.results {
font-family: Microsoft YaHei;
.ivu-layout-sider {
background: none;
height: 90vh;
border-right: 1px solid #e4e6ed;
.btn {
float: right;
margin-top: -44px;
margin-right: 15px;
}
}
.addclass {
border-color: #2680eb !important;
}
h4 {
height: 38px;
line-height: 38px;
border-bottom: 1px solid #e4e6ed;
margin-bottom: 15px;
margin-right: 15px;
}
.left-body:hover {
cursor: pointer;
border-color: #2680eb;
}
.left-body {
margin: 10px 15px 0 0;
border: 1px solid rgba(228, 230, 237, 1);
border-radius: 4px;
padding: 5px 8px;
.title-t {
height: 30px;
line-height: 30px;
color: #2680eb;
font-size: 15px;
font-weight: bold;
}
.fa {
height: 30px;
line-height: 30px;
}
}
.ivu-layout-content {
margin-left: 15px;
.btn {
float: right;
margin-top: -52px;
margin-right: 15px;
}
}
}
</style>
\ No newline at end of file
<style lang="less">
@import './results.less';
</style>
<template>
<div>
<div class="btn">
<Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div>
<Table :columns="columns" :data="data"></Table>
</div>
</div>
</template>
<script>
import Api from "./api";
import expandRow from "./table-expand.vue";
export default {
components: { expandRow },
data() {
return {
isactive: 0,
data: [],
list: [],
columns: [
{
type: "expand",
width: 50,
render: (h, params) => {
return h(expandRow, {
props: {
row: params.row
}
});
}
},
{
title: "超期预警",
key: "alert",
align: "center",
render: (h, params) => {
return h("div", [
h("Icon", {
props: {
type:
params.row.alert == true
? "ios-information-circle-outline"
: "ios-remove-circle-outline"
},
style: {
marginRight: "5px",
fontSize: "18px",
fontWeight: "bold",
color: params.row.alert == true ? "#FE7777" : "#0DD78D"
}
})
]);
}
},
{
title: "零件图号",
key: "part_id",
align: "center"
},
{
title: "零件名称",
key: "part_name",
align: "center"
},
{
title: "计划开始时间",
key: "plan_start",
width: 200,
align: "center"
},
{
title: "计划结束时间",
key: "plan_start",
width: 200,
align: "center"
},
{
title: "投料时间",
key: "demand_start",
width: 200,
align: "center"
},
{
title: "节点时间",
key: "demand_finish",
width: 200,
align: "center"
},
{
title: "计划数量",
key: "plan_qty",
align: "center"
}
],
}
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
components: {},
created() {
this.orderlist();
},
mounted() {},
methods: {
orderlist() {
Api.getall()
.then(r => {
if (r.success) {
this.list = r.result;
if (r.result) {
this.listData(r.result[0].schedule_Id, 0);
} else {
this.listData(0, null);
}
}
})
.catch(error => {
this.$$Message.error("请求失败");
});
},
listData(id, index) {
this.$emit.isactive = index;
this.id = id;
Api.paged({ scheduleId: id })
.then(r => {
if (r.success) {
this.data = r.result;
}
})
.catch(error => {
this.$$Message.error("请求失败");
});
},
// 下发
parameter() {
Api.processschemedispatch({
id: this.id
}).then(r => {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
} else {
this.$Message.success("下发失败");
}
});
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
tabChange(name) {
if(name=='technicalcoordination')
{
this.$refs.technicalcoordination.loadchangelist();
}
if(name=='unqualifiedorder'){
this.$refs.unqualifiedorder.loadchangelist();
}
},
}
}
</script>
<style lang="less">
</style>
.results {
font-family: Microsoft YaHei;
.ivu-layout-sider {
background: none;
height: 90vh;
border-right: 1px solid #e4e6ed;
.btn {
float: right;
margin-top: -44px;
margin-right: 15px;
}
}
.addclass {
border-color: #2680eb !important;
}
h4 {
height: 38px;
line-height: 38px;
border-bottom: 1px solid #e4e6ed;
margin-bottom: 15px;
margin-right: 15px;
}
.left-body:hover {
cursor: pointer;
border-color: #2680eb;
}
.left-body {
margin: 10px 15px 0 0;
border: 1px solid rgba(228, 230, 237, 1);
border-radius: 4px;
padding: 5px 8px;
.title-t {
height: 30px;
line-height: 30px;
color: #2680eb;
font-size: 15px;
font-weight: bold;
}
.fa {
height: 30px;
line-height: 30px;
}
}
.ivu-layout-content {
margin-left: 15px;
.btn {
float: right;
margin-top: -52px;
margin-right: 15px;
}
}
}
.compare{
.compare_box{
border: 1px solid #ccc;
height: 200px;
}
}
\ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<span class="expand-key">设备编号</span> <span class="expand-key">设备编号</span>
</Col> </Col>
</Row> </Row>
<Row v-for="(item,index) in dataList" :key="item.id"> <Row v-for="(item,index) in dataList" :key="item.index">
<Col span="4" class="expand-value"> <Col span="4" class="expand-value">
<span>{{ item.task_seq }}</span> <span>{{ item.task_seq }}</span>
</Col> </Col>
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small"> <RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">未排产</Radio> <Radio label="0">未排产</Radio>
<Radio label="2">已排查</Radio> <Radio label="2">已排查</Radio>
<Radio label="-1">全部</Radio> <!-- <Radio label="-1">全部</Radio> -->
</RadioGroup> </RadioGroup>
</Col> </Col>
</Row> </Row>
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<Radio :label="1">一级排产</Radio> <Radio :label="1">一级排产</Radio>
<Radio :label="2">二级排产</Radio> <Radio :label="2">二级排产</Radio>
</RadioGroup> </RadioGroup>
<Button type="primary" @click="lowerHair" :disabled="!allow">下发</Button> <Button type="primary" @click="lowerHair" :disabled="!allow" v-if="showXia">下发</Button>
</Col> </Col>
</Row> </Row>
<Row class="right-body"> <Row class="right-body">
...@@ -144,6 +144,7 @@ export default { ...@@ -144,6 +144,7 @@ export default {
}, },
data() { data() {
return { return {
showXia: true,
disabled: false, disabled: false,
chaiLIst: [], chaiLIst: [],
mode: 1, mode: 1,
...@@ -176,6 +177,11 @@ export default { ...@@ -176,6 +177,11 @@ export default {
this.orderlist(this.status); this.orderlist(this.status);
this.orderId = 0; this.orderId = 0;
this.isactive = null; this.isactive = null;
if (this.status == 0) {
this.showXia = true;
} else {
this.showXia = false;
}
}, },
//排产池列表 //排产池列表
......
...@@ -99,6 +99,8 @@ export default { ...@@ -99,6 +99,8 @@ export default {
this.formItem.equip_id = r.result.code; this.formItem.equip_id = r.result.code;
this.formItem1.calendarwork_pk = r.result.calKey; this.formItem1.calendarwork_pk = r.result.calKey;
this.formItem2.calendarovertime_pk = r.result.holidayKey; this.formItem2.calendarovertime_pk = r.result.holidayKey;
this.formItem1.equip_pk = r.result.id;
this.formItem2.equip_pk = r.result.id;
}); });
}, },
handleSubmit() { handleSubmit() {
......
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