Commit 03194a8a authored by renjintao's avatar renjintao

workHour

parent c3af3724
...@@ -7,7 +7,9 @@ export default { ...@@ -7,7 +7,9 @@ export default {
getCardList(params) { getCardList(params) {
return Api.post(`${PlanUrl}/orderexecutenew/list`, params); return Api.post(`${PlanUrl}/orderexecutenew/list`, params);
}, },
getList(params) {
return Api.post(`${PlanUrl}/orderexecutenew/CompletedList`, params);
},
//过程质量填报表 //过程质量填报表
getentryqcrecordlist_new(params) { getentryqcrecordlist_new(params) {
return Api.get(`${PlanUrl}orderexecutequalityrecord/getentryqcrecordlist_new`, params); return Api.get(`${PlanUrl}orderexecutequalityrecord/getentryqcrecordlist_new`, params);
......
<template>
<div class="order_list">
<div class="card_box">
<Card class="card_order" v-for="(item,index) in listTasks" :style="order==item.id?'box-shadow: 0px 0px 15px #333;':''" @click.native="goPage(item)" :key="index" :class="item.status==12 ? 'card_border1' : (item.status==14 ? 'card_border2': (item.status==5 ?'card_border3':
(item.status==7?'card_border4':(item.status==-1?'card_border5':''))))">
<!-- :class="item.status=='未开工'? 'card_border1' : (item.status=='执行中' ? 'card_border2': (item.status=='暂停中' ?'card_border3':
(item.status=='交检中'?'card_border4':(item.status=='交接中'?'card_border5':''))))"-->
<p slot="title">
{{item.mesCode}}
<state code="taskList.status" ref="state" class="fr" :value="item.status" type="text"></state>
<!-- <span >{{item.status}}</span> -->
</p>
<p class="order_tit">{{item.productName}}</p>
<p>
<Icon type="ios-pricetags" />
{{item.taskName}}
</p>
<p>{{item.beginTime}}~{{item.endTime}}</p>
</Card>
<p>{{listTasks.length}} 个工单</p>
</div>
</div>
</template>
<script>
import Api from "../../api";
export default {
name: "orderlistWorkHour",
data() {
return {
gnFlag: 0,
listTasks: [],
dataLength: 0
};
},
props: {
order: {
type: [String, Number]
},
asc: {
type: Boolean,
default: true
},
statu: {
type: Number,
default: -9
},
refresh: {
type: Boolean,
default: true
}
},
created() {
this.loadTree();
},
methods: {
loadTree() {
let parmse = {
status: 0,
isAsc: this.asc
};
if (this.statu != -9) {
parmse.subWorkHourStatus = this.statu
}
Api.getList(parmse).then(res => {
if (res.success) {
this.listTasks = res.result;
this.dataLength = res.result.length;
}
});
},
gnFunto(number, type) {
this.gnFlag = number;
},
goPage(item) {
this.$router.push({
path: "/produce/execute/indexWorkHour",
query: {
id: item.id,
orderId: item.orderId,
executeId: item.executeId,
headid: item.routingHeaderId,
routid: item.routingDetailId, //工序ID
quantity: item.quantity, //派工数量
dispatchStatus: item.status,
mesCode: item.mesCode,
productName: item.productName,
drawnNumber: item.drawnNumber,
subWorkHourStatus: item.subWorkHourStatus
}
});
}
},
watch: {
order(v) {
//alert(v)
},
asc(v) {
this.asc = v;
this.loadTree();
},
statu(v) {
this.statu = v;
this.loadTree();
},
refresh(v) {
this.refresh = v;
this.loadTree();
}
}
};
</script>
...@@ -126,8 +126,8 @@ export default { ...@@ -126,8 +126,8 @@ export default {
this.$Message.info("尊敬的用户,您没有该权限!"); this.$Message.info("尊敬的用户,您没有该权限!");
} //产品装配 } //产品装配
if (number == 3) { if (number == 3) {
if(this.$route.query.dispatchStatus != 0){ if (this.$route.query.dispatchStatus != 0) {
return this.$Message.info("此订单未完成!不能进行工时分配。"); return this.$Message.info("此订单未完成!不能进行工时分配。");
} }
this.detail = () => import("./taskTime/index"); this.detail = () => import("./taskTime/index");
} //工时分配 } //工时分配
......
<style lang="less">
@import "./execute.less";
</style>
<template>
<div class="execute_box">
<component :is="detail" :gdid="gdId" :row="row" />
<a class="gd_list" @click="changeFresh">工单列表</a>
<!-- 工单列表 -->
<Drawer placement="left" class="gd_box" :closable="false" :inner="true" :transfer="false" v-model="orderlistMode">
<div slot="header">
<div class="header">
<a class="gd_tt" @click="goToOrder">
<Icon type="ios-undo-outline" />工时提交列表
</a>
<Dictionary code="orderList.workHourStatus" class="select_star fr" v-model="odermodel" @on-change="searchOrder"></Dictionary>
</div>
<div class="select_t" style="height:40px">
<Button @click="changeAsc" class="fr" shape="circle" icon="md-calendar">{{ascTitle}}</Button>
</div>
</div>
<!-- 列表卡片主内容 -->
<orderlist ref="orderlistref" :asc="asc" :statu="statu" :refresh="refresh" :order="inputId" />
</Drawer>
</div>
</template>
<script>
import functional from "./components/functional";
import orderlist from "./components/orderlistWorkHour";
export default {
name: 'indexWorkHour',
components: {
functional,
orderlist
},
data() {
return {
orderTitle: "进度汇报",
orderindex: 0,
listLength: 0, //工单数量
starmodal: true,
orderlistMode: false,
functionalMode: false,
gdId: 0,
detail: null,
row: {},
odermodel: -9,
orderId: this.$route.query.id,
condition: [],
inputId: null,
asc: false,
ascTitle: "时间正序排序",
statu: 0,
refresh: true
};
},
created() {
let row = {};
row.id = this.$route.query.id;
row.orderId = this.$route.query.orderId;
row.executeId = this.$route.query.executeId;
row.headid = this.$route.query.headid;
row.routingdetailId = this.$route.query.routid;
row.mesCode = this.$route.query.mesCode;
row.productName = this.$route.query.productName;
row.drawnNumber = this.$route.query.drawnNumber;
row.count = this.$route.query.quantity;
row.subWorkHourStatus = this.$route.query.subWorkHourStatus;
this.row = row;
this.inputId = this.$route.query.id;
this.detail = () => import("./taskTime/index");
},
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {},
comments: {},
methods: {
// 返回工单列表
goToOrder() {
this.$router.push("/produce/workHour");
},
searchOrder(value) {
if (value == null || typeof value == "undefined") {
value = -9;
}
this.statu = value;
// this.$refs.orderlistref.loadTree(value);
},
changeTitle(number, type) {
this.orderTitle = type;
this.orderindex = number;
let row = {
id: this.$route.query.id,
orderId: this.$route.query.orderId,
executeId: this.$route.query.executeId,
headid: this.$route.query.headid,
routingdetailId: this.$route.query.routid,
mesCode: this.$route.query.mesCode,
productName: this.$route.query.productName,
drawnNumber: this.$route.query.drawnNumber,
count: this.$route.query.quantity,
subWorkHourStatus: this.$route.query.subWorkHourStatus,
};
this.row = row;
this.inputId = this.$route.query.id;
if (number == 3) {
if (this.$route.query.dispatchStatus != 0) {
return this.$Message.info("此订单未完成!不能进行工时分配。");
}
this.detail = () => import("./taskTime/index");
} //工时分配
},
//按时间排序按钮
changeAsc() {
this.asc = !this.asc;
if (this.asc) {
this.ascTitle = "时间正序排序";
} else {
this.ascTitle = "时间倒序排序";
}
},
//刷新orderlist列表
changeFresh() {
this.refresh = !this.refresh;
this.orderlistMode = true;
}
},
watch: {
"$route.query.id"(v) {
this.row.id = v;
this.inputId = v;
this.detail = () => import("./taskTime/index");
}
}
};
</script>
This diff is collapsed.
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