Commit 8b46ebfa authored by renjintao's avatar renjintao

orderList

parent 7229afef
import Api from '@/plugins/request'
export default {
index: `${PlanUrl}/orderexecutenew/paged_img`,
paged(params) {
return Api.post(`${PlanUrl}/orderexecutenew/paged_img`, params);
},
}
......@@ -7,60 +7,92 @@
ref="grid"
:data="list"
:batch="false"
type="card"
:type="typeInfo"
:high="false"
:span="6"
:lazy="true"
:conditions="easySearch"
:action="action"
:set="false"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入订单编号/产品名称" v-model="easySearch.keys.value" v-width="260" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<template slot="buttons">
<Button :icon="iconInfo" shape="circle" :title="titleInfo" @click="changeShwo"></Button>
</template>
<template slot="card" slot-scope="{row}">
<div class="body" @click="toExecute">
<Row class="title-i">
<Col :span="10" class="order-code">{{row.productName}}</Col>
<Col :span="10" class="order-code">{{row.processcode}}</Col>
<Col :span="10" class="order-code">{{row.mesCode}}</Col>
<Col :span="4">
<div class="sanjiao"></div>
<div class="box"><div class="text" style="font-size:6px;font-weight:normal">新建</div></div>
<div class="sanjiao" :style="tdStyle(row.status)"></div>
<div class="box">
<div class="text" style="font-size:4px;font-weight:normal">
<state
code="taskList.status"
ref="state"
:value="row.status"
type="text"
:color="false"
></state>
</div>
</div>
</Col>
</Row>
<div class="panel-text">
<Row class="row">
<Col span="18" class="fa">工艺名称:{{row.processname}}</Col>
<Col span="6" class="fa">数量:{{row.quantity}}</Col>
</Row>
<Row>
<Col span="24" class="fa">
订单编号:
{{row.mesCode}}
</Col>
</Row>
<Row>
<Col span="24" class="fa">
产品名称:
{{row.productName}}
</Col>
</Row>
<Row>
<Col span="24" class="fa">
产品类型:
{{row.taskTypeName}}
</Col>
</Row>
<Row>
<Col span="24" class="fa">
计划开始时间:
{{row.demandStartDate}}
<Col span="8">
<img
:src="getUrl(row.productUrl)"
width="120"
height="120"
style="border:#cacbd0 dashed 1px"
/>
</Col>
</Row>
<Row>
<Col span="24" class="fa">
计划结束时间:
{{row.demandFinishDate}}
<Col span="16" class="row">
<p>开始时间:{{row.beginTime}}</p>
<p>
<span v-if="(row.status==12||row.status==14||row.status==5)">计划</span>结束时间:{{row.endTime}}
</p>
<p v-if="(row.status==12||row.status==14||row.status==5)&&getTimes(row.endTime)>0">
剩余时间:
<OutputTime :value="getTimes(row.endTime)" style="display:inline"></OutputTime>
</p>
<p>生产数量:{{row.quantity}}</p>
</Col>
</Row>
<Row>
<Col span="24" class="fa">
实际开始时间:
{{row.actualStartDate}}
<Row class="rowBottom">
<Col span="14">图号:{{row.drawnNumber}}</Col>
<Col span="10" class="tr">
<Icon
type="md-alert"
size="18"
color="#FFA000"
v-if="(row.status==12||row.status==14||row.status==5)&&getTimes(row.endTime)<86400&&getTimes(row.endTime)>0"
/>
<span
style="color:#FFA000"
v-if="(row.status==12||row.status==14||row.status==5)&&getTimes(row.endTime)<86400&&getTimes(row.endTime)>0"
>预警</span>&nbsp;&nbsp;
<Icon
type="md-timer"
size="18"
color="#FE7777"
v-if="(row.status==12||row.status==14||row.status==5)&&compareTime(row.endTime)"
/>
<span
style="color:#FE7777"
v-if="(row.status==12||row.status==14||row.status==5)&&compareTime(row.endTime)"
>超期</span>
</Col>
</Row>
</div>
......@@ -70,10 +102,19 @@
</div>
</template>
<script>
import Api from "./api";
export default {
name: "starOrder",
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "mesCode,productName",
value: null
}
},
downUrl: fileUrlDown,
columns: [
{
title: this.l("mesCode"),
......@@ -81,42 +122,70 @@ export default {
width: 240,
align: "left"
},
{
key: "status",
title: "工单状态",
align: "center",
high: true,
code: "taskList.status",
width: 120
},
{
key: "productName",
title: this.l("productName"),
title: "产品名称",
align: "left",
easy: true,
width: 160,
high: true,
tooltip: true
high: true
},
{
key: "status",
title: this.l("status"),
key: "drawnNumber",
title: "图号",
align: "left",
high: true
},
{
key: "quantity",
title: "生产数量",
align: "right",
width: 120,
high: true
},
{
key: "beginTime",
title: "开始时间",
align: "center",
high: true,
code: "plan.order.status"
width: 180,
high: true
},
{
key: "mainRoutingSetStatus",
title: this.l("mainRoutingSetStatus"),
key: "endTime",
title: "结束时间",
align: "center",
high: true,
code: "aps.plan.mainRoutingStatus"
width: 180,
high: true
},
{
key: "taskType",
title: this.l("taskType"),
align: "left",
easy: true,
high: true,
hide: true,
code: "plan.order.taskType"
title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.toExecute(params.row.id) }
},
"处理"
)
]);
}
}
],
list: [
{
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
......@@ -132,49 +201,289 @@ export default {
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 1
},
{
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
processcode: "ZGY_20200315_2",
processname: "增材制造主工艺规程",
quantity: 1,
taskTypeName: "正式计划"
routing_header_id: 181,
routing_type: 1,
actualStartDate: "2020-05-12 14:58:17",
demandFinishDate: "2020-05-10 23:59:59",
demandStartDate: "2020-05-09 00:00:01",
mesCode: "DDBH_20200509_2",
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 2
},
{
mesCode: "DDBH2010052001",
productName: "机床产品1",
status: 1,
mainRoutingSetStatus: 1,
taskType: 1
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
processcode: "ZGY_20200315_2",
processname: "增材制造主工艺规程",
quantity: 1,
routing_header_id: 181,
routing_type: 1,
actualStartDate: "2020-05-12 14:58:17",
demandFinishDate: "2020-05-10 23:59:59",
demandStartDate: "2020-05-09 00:00:01",
mesCode: "DDBH_20200509_2",
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 3
},
{
mesCode: "DDBH2010052002",
productName: "机床产品2",
status: 2,
mainRoutingSetStatus: 1,
taskType: 1
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
processcode: "ZGY_20200315_2",
processname: "增材制造主工艺规程",
quantity: 1,
routing_header_id: 181,
routing_type: 1,
actualStartDate: "2020-05-12 14:58:17",
demandFinishDate: "2020-05-10 23:59:59",
demandStartDate: "2020-05-09 00:00:01",
mesCode: "DDBH_20200509_2",
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 4
},
{
mesCode: "DDBH2010052003",
productName: "机床产品3",
status: 5,
mainRoutingSetStatus: 1,
taskType: 1
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
processcode: "ZGY_20200315_2",
processname: "增材制造主工艺规程",
quantity: 1,
routing_header_id: 181,
routing_type: 1,
actualStartDate: "2020-05-12 14:58:17",
demandFinishDate: "2020-05-10 23:59:59",
demandStartDate: "2020-05-09 00:00:01",
mesCode: "DDBH_20200509_2",
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 5
},
{
mesCode: "DDBH2010052004",
productName: "机床产品4",
status: 1,
mainRoutingSetStatus: 0,
taskType: 1
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
processcode: "ZGY_20200315_2",
processname: "增材制造主工艺规程",
quantity: 1,
routing_header_id: 181,
routing_type: 1,
actualStartDate: "2020-05-12 14:58:17",
demandFinishDate: "2020-05-10 23:59:59",
demandStartDate: "2020-05-09 00:00:01",
mesCode: "DDBH_20200509_2",
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 6
},
{
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
processcode: "ZGY_20200315_2",
processname: "增材制造主工艺规程",
quantity: 1,
routing_header_id: 181,
routing_type: 1,
actualStartDate: "2020-05-12 14:58:17",
demandFinishDate: "2020-05-10 23:59:59",
demandStartDate: "2020-05-09 00:00:01",
mesCode: "DDBH_20200509_2",
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 8
},
{
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
processcode: "ZGY_20200315_2",
processname: "增材制造主工艺规程",
quantity: 1,
routing_header_id: 181,
routing_type: 1,
actualStartDate: "2020-05-12 14:58:17",
demandFinishDate: "2020-05-10 23:59:59",
demandStartDate: "2020-05-09 00:00:01",
mesCode: "DDBH_20200509_2",
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 11
},
{
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
processcode: "ZGY_20200315_2",
processname: "增材制造主工艺规程",
quantity: 1,
routing_header_id: 181,
routing_type: 1,
actualStartDate: "2020-05-12 14:58:17",
demandFinishDate: "2020-05-10 23:59:59",
demandStartDate: "2020-05-09 00:00:01",
mesCode: "DDBH_20200509_2",
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 12
},
{
actualBeginTime: "2020-05-12 14:58:17",
img: "/2020/5/12/b8cbee7b-6faa-4cfa-a05a-aa7a7f13b8d7.png",
id: 1,
orderIDs: "5",
platesnum: 0,
processcode: "ZGY_20200315_2",
processname: "增材制造主工艺规程",
quantity: 13,
routing_header_id: 181,
routing_type: 1,
actualStartDate: "2020-05-12 14:58:17",
demandFinishDate: "2020-05-10 23:59:59",
demandStartDate: "2020-05-09 00:00:01",
mesCode: "DDBH_20200509_2",
order_id: 5,
picnumber: 0,
productName: "气源分配器壳体",
drawNum: "JPEG4620",
taskTypeName: "正式计划",
status: 14
}
]
],
typeInfo: "card",
iconInfo: "md-apps",
titleInfo: "卡片模式",
nowTime: new Date().getTime()
};
},
created() {},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {},
mounted() {
this.search();
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
search() {
this.$refs.grid.reload(this.easySearch);
},
toExecute() {
this.$router.push("/produce/execute");
},
tdStyle(val) {
//动态根据状态值加载状态值对应的颜色
let temDic = this.$store.getters.dictionaryByKey("taskList.status");
let temColor = "#666";
temDic.forEach(data => {
if (Number(data.code) == val) {
temColor = data.color;
}
});
var style = {};
style["border-top"] = " solid 38px " + temColor;
return style;
},
changeShwo() {
if (this.typeInfo == "card") {
this.typeInfo = "table";
this.iconInfo = "md-list";
this.titleInfo = "卡片模式";
} else {
this.typeInfo = "card";
this.iconInfo = "md-apps";
this.titleInfo = "列表模式";
}
},
compareTime(dateStart) {
//比较当前时间和计划完成时间
let planEndTime = new Date(dateStart).getTime();
let res = true;
if (this.nowTime - planEndTime > 0) {
res = true;
} else {
res = false;
}
return res;
},
getTimes(dateStart) {
//返回计划完成时间和当前时间的差值
let planEndTime = new Date(dateStart).getTime();
let res = 0;
if (this.nowTime - planEndTime > 0) {
res = 0;
} else {
res = (this.nowTime - planEndTime) / 1000;
}
return res;
},
getUrl(url) {
let tempUrl = "";
if (url && url.length > 0) {
tempUrl = this.downUrl + JSON.parse(url)[0].filePath;
}
else
{
tempUrl=iconImg+"noPic_product.png"
}
return tempUrl
},
l(key) {
let vkey = "mes_order" + "." + key;
return this.$t(vkey) || key;
......@@ -192,8 +501,9 @@ export default {
background: white;
border-radius: 4px;
border: #cacbd0 solid 1px;
margin-right: 8px;
margin-bottom: 8px;
margin-left: 40px;
margin-right: 40px;
margin-bottom: 39px;
.title-i {
padding: 0 8px;
height: 38px;
......@@ -215,51 +525,43 @@ export default {
.panel-text {
padding: 5px 8px;
.row {
height: 30px;
color: #666666;
padding-left: 10px;
p {
line-height: 30px;
.fa {
color: #515a6e;
}
}
}
}
}
.sanjiao {
width: 0;
height: 0;
border-width: 27px 27px 27px;
border-style: solid;
border-color: transparent transparent green;
transform: rotate(45deg);
-ms-transform: rotate(45deg); /* Internet Explorer */
-moz-transform: rotate(45deg); /* Firefox */
-webkit-transform: rotate(45deg); /* Safari 和 Chrome */
-o-transform: rotate(45deg); /* Opera */
margin: 38px;
height: 0px;
width: 0px;
border-left: solid 60px transparent;
position: absolute;
right: -35px;
top: -27px;
right: -46px;
top: -38px;
}
.box{
width:38px;
height:38px;
color: #fff;
.box {
color: white;
width: 70px;
height: 70px;
overflow: hidden;
/* Rotate div */
transform:rotate(45deg);
-ms-transform:rotate(45deg); /* Internet Explorer */
-moz-transform:rotate(45deg); /* Firefox */
-webkit-transform:rotate(45deg); /* Safari 和 Chrome */
-o-transform:rotate(45deg); /* Opera */
position: absolute;
right: -19px;
top: 0px;
transform: rotate(35deg);
-ms-transform: rotate(45deg); /* Internet Explorer */
-moz-transform: rotate(45deg); /* Firefox */
-webkit-transform: rotate(35deg); /* Safari 和 Chrome */
-o-transform: rotate(45deg); /* Opera */
.text {
position: absolute;
bottom: 0;
left: 20px;
top: -10px;
}
}
.rowBottom .ivu-col-span-10 {
height: 24px;
padding-right: 10px;
}
</style>
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