Commit ceb639a4 authored by renjintao's avatar renjintao

tasktime

parent 4ca4c829
......@@ -155,7 +155,7 @@ export default {
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;
// 获取既定users
Api.getentryusers({
......
import Api from '@/plugins/request'
export default {
index: `${systemUrl}/importcenter/paged`,
index: `${PlanUrl}/orderexecutenew/userworkhourspaged`,
paged(params) {
return Api.post(`${systemUrl}/importcenter/paged`, params);
return Api.post(`${PlanUrl}/orderexecutenew/userworkhourspaged`, params);
},
get(params) {
return Api.get(`${systemUrl}/importcenter/get`, params);
}
}
index1: `${PlanUrl}/orderexecutenew/getuserworkhoursdetails`,
paged1(params) {
return Api.get(`${PlanUrl}/orderexecutenew/getuserworkhoursdetails`, params);
},
}
\ No newline at end of file
<template>
<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">
<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>
......@@ -14,7 +14,7 @@ export default {
name: "Add",
data() {
return {
action: Api.index,
action: Api.index1,
easySearch: {
keys: {
op: "",
......@@ -29,41 +29,42 @@ export default {
downUrl: fileUrlDown,
fileUrlPath: "",
columns: [{
key: "name",
key: "mesCode",
title: '订单编号',
align: "left",
easy: true,
high: true,
},
{
key: "id",
title: '产品图号',
key: "productName",
title: '产品名称',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
title: '产品名称',
key: "drawnNumber",
title: '产品图号',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
key: "routingDetailSeq",
title: '工序号',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
key: "routingDetailName",
title: '工序名称',
align: "left",
easy: true,
high: true,
}
],
data: [],
};
},
props: {
......@@ -85,40 +86,20 @@ export default {
if (this.row != null && this.row != {}) {
this.entity = this.row
//this.load(this.entity.id);
this.load(this.eid);
}
},
methods: {
load(v) {
// Api.get({
// id: v,
// }).then((r) => {
// this.entity = r.result;
// this.$emit("on-load");
// });
Api.paged1({
id: v,
}).then((r) => {
this.data = r.result;
});
},
handleClose() {
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: {
row(v) {
......
......@@ -32,7 +32,7 @@ export default {
action: Api.index,
easySearch: {
keys: {
op: "name,file",
op: "userTitle,userCardNo",
value: null
},
},
......@@ -49,35 +49,35 @@ export default {
align: "right",
title: "序号",
}, {
key: "name",
key: "userTitle",
title: '员工姓名',
align: "left",
easy: true,
high: true,
},
{
key: "id",
key: "userCardNo",
title: '员工编号',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
key: "totalWorkHour",
title: '工时数量',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
key: "planQuantity",
title: '计划数量',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
key: "qualified",
title: '合格数量',
align: "left",
easy: true,
......@@ -128,7 +128,7 @@ export default {
this.$refs.grid.reload(this.easySearch);
},
view(rowInfo) {
this.curId = rowInfo.id;
this.curId = rowInfo.userId;
this.row = rowInfo;
this.title = "工时详情";
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