Commit 4855c257 authored by 周远喜's avatar 周远喜

Merge branch 'master' of http://git.mes123.com/zhouyx/mes-ui

parents 80eb8279 70740d22
......@@ -51,7 +51,7 @@
<p class="gs_p">
<span class="b_size">100</span>
</p>-->
<p class="gs_footer">
<p class="gs_footer" v-if="topInfoShow.subWorkHourStatus==0">
<a class="gs_edit" @click="editItem(item, index)">
<Icon type="md-create" />
编辑
......@@ -65,13 +65,7 @@
<Icon type="ios-add" style="vertical-align: middle" />
</a>
</div>
<div style="
text-align: center;
height: 50px;
width: 100%;
position: absolute;
bottom: 25px;
">
<div style="text-align: center;height: 50px;width: 100%; position: absolute;bottom: 25px;" v-if="topInfoShow.subWorkHourStatus==0">
<Button type="primary" v-noClick @click="submitWorkHour" style="height: 50px; width: 100px">
提交
</Button>
......
......@@ -44,10 +44,10 @@
<Ellipsis :text="row.mesCode" :lines="1" tooltip transfer />
</Col>
<Col :span="4">
<div class="statuBg" :style="tdStyle(row.subWorkHourStatus)"></div>
<div class="statuBg" :style="tdStyle(row.subWorkHourStatus?row.subWorkHourStatus:0)"></div>
<div class="boxTitle">
<div class="text">
<state code="orderList.workHourStatus" ref="state" :value="row.subWorkHourStatus" type="text" :color="false"></state>
<state code="orderList.workHourStatus" ref="state" :value="row.subWorkHourStatus?row.subWorkHourStatus:0" type="text" :color="false"></state>
</div>
</div>
</Col>
......@@ -158,7 +158,7 @@ export default {
title: this.l("subWorkHourStatus"),
align: "center",
high: true,
code: "workHour.status",
code: "orderList.workHourStatus",
width: 120,
},
{
......
import Api from '@/plugins/request'
export default {
index: `${systemUrl}/importcenter/paged`,
paged(params) {
return Api.post(`${systemUrl}/importcenter/paged`, params);
},
get(params) {
return Api.get(`${systemUrl}/importcenter/get`, params);
}
}
<template>
<div class="detail">
<DataGrid :columns="columns" ref="grid" :action="action" :set="false" :conditions="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>
</template>
</DataGrid>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "",
value: null
},
id: {
op: "Equal",
value: this.eid
},
},
entity: {},
downUrl: fileUrlDown,
fileUrlPath: "",
columns: [{
key: "name",
title: '订单编号',
align: "left",
easy: true,
high: true,
},
{
key: "id",
title: '产品图号',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
title: '产品名称',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
title: '工序号',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
title: '工序名称',
align: "left",
easy: true,
high: true,
}
],
};
},
props: {
eid: Number,
row: {
type: Object,
default: () => {
return null;
}
}
},
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
if (this.row != null && this.row != {}) {
this.entity = this.row
//this.load(this.entity.id);
}
},
methods: {
load(v) {
// Api.get({
// id: v,
// }).then((r) => {
// this.entity = r.result;
// this.$emit("on-load");
// });
},
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) {
if (v != null && v != {}) {
// this.load(v);
this.entity = v
}
},
},
};
</script>
<template>
<div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入员工姓名或员工编号" v-width="260" v-model="easySearch.keys.value" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" :fullscreen="full" :footer-hide="initBtn">
<component :is="detail" :eid="curId" :row="row" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "index",
head: {
title: "工时统计",
author: "henq",
description: "import_center 8/20/2020 3:45:58 PM",
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "name,file",
value: null
},
},
modal: false,
full: false,
initBtn: true,
title: "新增",
detail: null,
curId: 0,
row: null,
columns: [{
type: "index",
width: 80,
align: "right",
title: "序号",
}, {
key: "name",
title: '员工姓名',
align: "left",
easy: true,
high: true,
},
{
key: "id",
title: '员工编号',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
title: '工时数量',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
title: '计划数量',
align: "left",
easy: true,
high: true,
},
{
key: "creatorUserId",
title: '合格数量',
align: "left",
easy: true,
high: true,
},
{
title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.view(params.row)
},
},
"详情"
),
]);
},
},
],
};
},
mounted() {
console.log(this);
},
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
view(rowInfo) {
this.curId = rowInfo.id;
this.row = rowInfo;
this.title = "工时详情";
this.full = true;
this.initBtn = false;
this.detail = () => import("./detail");
this.modal = true;
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) {
let vkey = "import_center" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
<style lang="less">
</style>
<template>
<div class="detail">
<div class="detail">
<Row>
<Filed :span="12" :name="l('taskSeq')">{{entity.taskSeq}}</Filed>
<Filed :span="12" :name="l('name')">{{entity.name}}</Filed>
<Filed :span="12" :name="l('equipType')">{{entity.equipType}}</Filed>
<Filed :span="12" :name="l('resourceType')">
<!-- <state code="Process.routing_detail.resource_type" :value="entity.resourceType" type="text"></state> -->
{{entity.resourceCode}}
</Filed>
<Filed :span="12" :name="l('isImportant')">
<state code="Process.state" :value="entity.isImportant" type="text"></state>
</Filed>
<!-- <Filed :span="12" :name="l('isImportantResources')">
<Filed :span="12" :name="l('taskSeq')">{{entity.taskSeq}}</Filed>
<Filed :span="12" :name="l('name')">{{entity.name}}</Filed>
<Filed :span="12" :name="l('equipType')">{{entity.equipType}}</Filed>
<Filed :span="12" :name="l('resourceType')">
<!-- <state code="Process.routing_detail.resource_type" :value="entity.resourceType" type="text"></state> -->
{{entity.resourceCode}}
</Filed>
<Filed :span="12" :name="l('isImportant')">
<state code="Process.state" :value="entity.isImportant" type="text"></state>
</Filed>
<!-- <Filed :span="12" :name="l('isImportantResources')">
<state code="Process.state" :value="entity.isImportantResources" type="text"></state>
</Filed> -->
<Filed :span="12" :name="l('setupTime')"><OutputTime :value="entity.setupTime"></OutputTime></Filed>
<Filed :span="12" :name="l('runtime')"><OutputTime :value="entity.runtime"></OutputTime></Filed>
<Filed :span="12" :name="l('realRuntime')"><OutputTime :value="entity.realRuntime"></OutputTime></Filed>
<Filed :span="12" :name="l('realWorkingHours')"><OutputTime :value="entity.realWorkingHours"></OutputTime></Filed>
<Filed :span="12" :name="l('isOutside')">
<state code="Process.state" :value="entity.isOutside" type="text"></state>
</Filed>
<Filed :span="12" :name="l('outsideTime')"><OutputTime :value="entity.outsideTime"></OutputTime></Filed>
<Filed :span="12" :name="l('isParticipateIntime')">
<state code="Process.state" :value="entity.isParticipateIntime" type="text"></state>
</Filed>
<Filed :span="12" :name="l('efficiencyValue')">{{entity.efficiencyValue}}</Filed>
<Filed :span="12" :name="l('singleOut')">{{entity.singleOut}}</Filed>
<Filed :span="24" :name="l('taskContent')" >
<div v-html="entity.taskContent" class="tohtml"></div>
</Filed>
<Filed :span="12" :name="l('setupTime')">
<OutputTime :value="entity.setupTime"></OutputTime>
</Filed>
<Filed :span="12" :name="l('runtime')">
<OutputTime :value="entity.runtime"></OutputTime>
</Filed>
<Filed :span="12" :name="l('performanceWorkingHours')">
<OutputTime :value="entity.performanceWorkingHours"></OutputTime>
</Filed>
<Filed :span="12" :name="l('performanceHours')">
<OutputTime :value="entity.performanceHours"></OutputTime>
</Filed>
<Filed :span="12" :name="l('isOutside')">
<state code="Process.state" :value="entity.isOutside" type="text"></state>
</Filed>
<Filed :span="12" :name="l('outsideTime')">
<OutputTime :value="entity.outsideTime"></OutputTime>
</Filed>
<Filed :span="12" :name="l('isParticipateIntime')">
<state code="Process.state" :value="entity.isParticipateIntime" type="text"></state>
</Filed>
<Filed :span="12" :name="l('efficiencyValue')">{{entity.efficiencyValue}}</Filed>
<Filed :span="12" :name="l('singleOut')">{{entity.singleOut}}</Filed>
<Filed :span="24" :name="l('taskContent')">
<div v-html="entity.taskContent" class="tohtml"></div>
</Filed>
</Row>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }]
}
};
},
props: {
eid: Number
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.$emit("on-load");
});
name: "Add",
data() {
return {
entity: {},
rules: {
name: [{
required: true,
message: "必填",
trigger: "blur"
}],
code: [{
required: true,
message: "必填",
trigger: "blur"
}]
}
};
},
handleClose() {
this.$emit("on-close");
props: {
eid: Number
},
l(key) {
key = "routing_detail" + "." + key;
return this.$t(key);
}
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({
id: v
}).then(r => {
this.entity = r.result;
this.$emit("on-load");
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "routing_detail" + "." + key;
return this.$t(key);
}
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
}
}
}
};
</script>
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