Commit ceb639a4 authored by renjintao's avatar renjintao

tasktime

parent 4ca4c829
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
this.$refs.addview.maxHour = this.waitHours; this.$refs.addview.maxHour = this.waitHours;
// 如果工时还未分配,则默认人员平均分配 // 如果工时还未分配,则默认人员平均分配
if (res.result.allHours == res.result.waitHours) { if (res.result.allHours > 0 && res.result.allHours == res.result.waitHours) {
let id = this.$route.query.id; let id = this.$route.query.id;
// 获取既定users // 获取既定users
Api.getentryusers({ Api.getentryusers({
......
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index: `${systemUrl}/importcenter/paged`, index: `${PlanUrl}/orderexecutenew/userworkhourspaged`,
paged(params) { paged(params) {
return Api.post(`${systemUrl}/importcenter/paged`, params); return Api.post(`${PlanUrl}/orderexecutenew/userworkhourspaged`, params);
},
index1: `${PlanUrl}/orderexecutenew/getuserworkhoursdetails`,
paged1(params) {
return Api.get(`${PlanUrl}/orderexecutenew/getuserworkhoursdetails`, params);
}, },
get(params) {
return Api.get(`${systemUrl}/importcenter/get`, params);
}
} }
\ No newline at end of file
<template> <template>
<div class="detail"> <div class="detail">
<DataGrid :columns="columns" ref="grid" :action="action" :set="false" :conditions="easySearch"> <DataGrid :columns="columns" ref="grid" :data="data" :set="false">
<template slot="easySearch"> <template slot="easySearch">
<p class="pl10">用户姓名:<span class="mr20">{{entity.name}}</span>用户编号:<span class="mr20">{{entity.id}}</span>工时数量:<span class="mr20">{{entity.creatorUserId}}</span>计划数量:<span class="mr20">{{entity.creatorUserId}}</span>合格数量:<span class="mr20">{{entity.creatorUserId}}</span></p> <p class="pl10">用户姓名:<span class="mr20">{{entity.name}}</span>用户编号:<span class="mr20">{{entity.id}}</span>工时数量:<span class="mr20">{{entity.creatorUserId}}</span>计划数量:<span class="mr20">{{entity.creatorUserId}}</span>合格数量:<span class="mr20">{{entity.creatorUserId}}</span></p>
</template> </template>
...@@ -14,7 +14,7 @@ export default { ...@@ -14,7 +14,7 @@ export default {
name: "Add", name: "Add",
data() { data() {
return { return {
action: Api.index, action: Api.index1,
easySearch: { easySearch: {
keys: { keys: {
op: "", op: "",
...@@ -29,41 +29,42 @@ export default { ...@@ -29,41 +29,42 @@ export default {
downUrl: fileUrlDown, downUrl: fileUrlDown,
fileUrlPath: "", fileUrlPath: "",
columns: [{ columns: [{
key: "name", key: "mesCode",
title: '订单编号', title: '订单编号',
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
}, },
{ {
key: "id", key: "productName",
title: '产品图号', title: '产品名称',
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
}, },
{ {
key: "creatorUserId", key: "drawnNumber",
title: '产品名称', title: '产品图号',
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
}, },
{ {
key: "creatorUserId", key: "routingDetailSeq",
title: '工序号', title: '工序号',
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
}, },
{ {
key: "creatorUserId", key: "routingDetailName",
title: '工序名称', title: '工序名称',
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
} }
], ],
data: [],
}; };
}, },
props: { props: {
...@@ -85,40 +86,20 @@ export default { ...@@ -85,40 +86,20 @@ export default {
if (this.row != null && this.row != {}) { if (this.row != null && this.row != {}) {
this.entity = this.row this.entity = this.row
//this.load(this.entity.id); this.load(this.eid);
} }
}, },
methods: { methods: {
load(v) { load(v) {
// Api.get({ Api.paged1({
// id: v, id: v,
// }).then((r) => { }).then((r) => {
// this.entity = r.result; this.data = r.result;
// this.$emit("on-load"); });
// });
}, },
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
downFile(path) {
//alert(path)
let truePath = path;
if (truePath.length > 2) {
if (
truePath.substring(0, 7).toLowerCase() == "http://" ||
truePath.substring(0, 8).toLowerCase() == "https://"
) {
window.open(truePath, "_blank");
} else {
this.fileUrlPath = this.downUrl + path;
window.open(this.fileUrlPath, "_blank");
}
}
},
l(key) {
key = "import_center" + "." + key;
return this.$t(key);
},
}, },
watch: { watch: {
row(v) { row(v) {
......
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { keys: {
op: "name,file", op: "userTitle,userCardNo",
value: null value: null
}, },
}, },
...@@ -49,35 +49,35 @@ export default { ...@@ -49,35 +49,35 @@ export default {
align: "right", align: "right",
title: "序号", title: "序号",
}, { }, {
key: "name", key: "userTitle",
title: '员工姓名', title: '员工姓名',
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
}, },
{ {
key: "id", key: "userCardNo",
title: '员工编号', title: '员工编号',
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
}, },
{ {
key: "creatorUserId", key: "totalWorkHour",
title: '工时数量', title: '工时数量',
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
}, },
{ {
key: "creatorUserId", key: "planQuantity",
title: '计划数量', title: '计划数量',
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true,
}, },
{ {
key: "creatorUserId", key: "qualified",
title: '合格数量', title: '合格数量',
align: "left", align: "left",
easy: true, easy: true,
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
view(rowInfo) { view(rowInfo) {
this.curId = rowInfo.id; this.curId = rowInfo.userId;
this.row = rowInfo; this.row = rowInfo;
this.title = "工时详情"; this.title = "工时详情";
this.full = true; this.full = true;
......
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