Commit a3f9bc47 authored by renjintao's avatar renjintao

workhourManage detail\indx\zh-cn\datagrid...

parent 925dc4cf
<template>
<div class="table-content">
<div class="table-content">
<div class="table-tools" v-if="tool">
<div class="table-search">
<slot name="easySearch" v-if="easy">
<Form inline>
<FormItem>
<Input
search
enter-button
:placeholder="placeholder"
@on-search="easySearch"
v-width="300"
v-model="keys"
/>
<Input search enter-button :placeholder="placeholder" @on-search="easySearch" v-width="300" v-model="keys" />
</FormItem>
<FormItem>
<Button v-if="high" @click="modalSearch = true" type="text">
......@@ -28,9 +21,7 @@
</div>
<div class="btns">
<slot name="buttons"></slot>
<Button @click="export2Excel" v-if="exportTitle.length > 0"
>导出</Button
>
<Button @click="export2Excel" v-if="exportTitle.length > 0">导出</Button>
<Button v-if="set && type == 'table'" @click="config = !config">
<Icon type="md-build" title="列设置" />
</Button>
......@@ -47,68 +38,20 @@
<h4>暂无数据</h4>
</Col>
</Row>
<Table
v-else
:border="border"
:columns="columnsNow"
:data="list"
:height="tableHeight"
:draggable="draggable"
ref="table"
class="tableCommon"
@on-expand="expand"
@on-drag-drop="onDragDrop"
@on-selection-change="selectionChange"
@on-select="onSelect"
@on-select-all="allChange"
@on-sort-change="sortChange"
:row-key="rowKey"
stripe
></Table>
<Table v-else :border="border" :columns="columnsNow" :data="list" :height="tableHeight" :draggable="draggable" ref="table" class="tableCommon" @on-expand="expand" @on-drag-drop="onDragDrop" @on-selection-change="selectionChange" @on-select="onSelect" @on-select-all="allChange" @on-sort-change="sortChange" :row-key="rowKey" stripe></Table>
</div>
<div class="table-footer">
<slot name="footer"></slot>
<Page
v-if="page"
:total="search.total"
:current="search.page"
class="fr"
show-total
size="small"
show-elevator
show-sizer
:page-size="search.pageSize"
:page-size-opts="pageSizeOpts"
@on-change="pageChange"
@on-page-size-change="pageSizeChange"
/>
<Page v-if="page" :total="search.total" :current="search.page" class="fr" show-total size="small" show-elevator show-sizer :page-size="search.pageSize" :page-size-opts="pageSizeOpts" @on-change="pageChange" @on-page-size-change="pageSizeChange" />
</div>
<Modal
v-if="high"
v-model="modalSearch"
title="高级搜索"
draggable
width="800"
ref="search"
>
<Modal v-if="high" v-model="modalSearch" title="高级搜索" draggable width="800" ref="search">
<slot name="searchForm"></slot>
<div slot="footer">
<Button @click="modalSearch = false" style="margin-left: 20px"
>取消</Button
>
<Button @click="complexSearch" type="primary" style="margin-left: 10px"
>查询</Button
>
<Button @click="modalSearch = false" style="margin-left: 20px">取消</Button>
<Button @click="complexSearch" type="primary" style="margin-left: 10px">查询</Button>
</div>
</Modal>
<Drawer
title="列设置"
v-if="set"
v-model="config"
:scrollable="true"
placement="left"
:mask="false"
>
<Drawer title="列设置" v-if="set" v-model="config" :scrollable="true" placement="left" :mask="false">
<div slot="header">
列设置
<a @click="undoConfig" class="ml50">
......@@ -116,17 +59,9 @@
</a>
</div>
<ul class="table-columns">
<li
v-for="(li, index) in columnsCur"
:key="index"
v-dragging="{ item: li, list: columnsCur, group: 'li' }"
>
<li v-for="(li, index) in columnsCur" :key="index" v-dragging="{ item: li, list: columnsCur, group: 'li' }">
<label @click="columnChange(li, index)" :class="{ dis: li.hide }">
<Icon
:type="li.hide ? 'md-eye-off' : 'md-eye'"
size="16"
class="mr10"
/>
<Icon :type="li.hide ? 'md-eye-off' : 'md-eye'" size="16" class="mr10" />
<span>{{ li.title }}</span>
</label>
<Icon type="ios-move" class="move" size="18" />
......@@ -139,14 +74,16 @@
<slot name="batch"></slot>
<Button @click="cancelBatch">取消</Button>
</FooterToolbar>
</div>
</div>
</template>
<script>
import ColumnSlot from "./treeGrid/columnSolt";
export default {
name: "DataGrid",
components: { ColumnSlot },
components: {
ColumnSlot
},
data() {
return {
keys: "",
......@@ -156,7 +93,7 @@ export default {
search: {
pageIndex: 1,
pageSize: 20,
sortBy: "id",
sortBy: this.conditions.sortBy ? this.conditions.sortBy : 'id',
isDesc: true,
conditions: [],
},
......@@ -366,7 +303,7 @@ export default {
}
});
var items=this.$u.clone(this.columns);
var items = this.$u.clone(this.columns);
// var soct=this.$scopedSlots;
// // console.warn("that.$scopedSlots()",soct["action"]());
// items.forEach((u) => {
......@@ -425,8 +362,7 @@ export default {
},
loadUserConfig() {
var query = {
conditions: [
{
conditions: [{
fieldName: "creatorUserId",
fieldValue: this.userId,
conditionalType: "Equal",
......@@ -977,6 +913,7 @@ export default {
}
overflow-x: hidden;
.zan-wu {
height: 600px;
line-height: 600px;
......
......@@ -2155,5 +2155,19 @@ document_category: {
template: '模板',
attachment: '附件',
type: '模版类型',
},
workHour: {
userTitle: '员工姓名',
userCardNo: '员工编号',
totalWorkHour: '工时数量',
planQuantity: '计划数量',
qualified: '合格数量',
action: '操作',
mesCode: '订单编号',
productName: '产品名称',
drawnNumber: '产品图号',
routingDetailSeq: '工序号',
routingDetailName: '工序名称',
workHour: '工时数量',
}
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
<div class="detail">
<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>
<p class="pl10">{{this.l('userTitle')}}<span class="mr20">{{entity.userTitle}}</span>{{this.l('userTitle')}}<span class="mr20">{{entity.userCardNo}}</span>{{this.l('totalWorkHour')}}<span class="mr20">{{entity.totalWorkHour}}</span>{{this.l('planQuantity')}}<span class="mr20">{{entity.planQuantity}}</span>{{this.l('qualified')}}<span class="mr20">{{entity.qualified}}</span></p>
</template>
</DataGrid>
</div>
......@@ -30,39 +30,36 @@ export default {
fileUrlPath: "",
columns: [{
key: "mesCode",
title: '订单编号',
title: this.l('mesCode'),
align: "left",
easy: true,
high: true,
},
{
key: "productName",
title: '产品名称',
title: this.l('productName'),
align: "left",
easy: true,
high: true,
},
{
key: "drawnNumber",
title: '产品图号',
title: this.l('drawnNumber'),
align: "left",
easy: true,
high: true,
},
{
key: "routingDetailSeq",
title: '工序号',
align: "left",
easy: true,
high: true,
title: this.l('routingDetailSeq'),
align: "right",
width: 100,
},
{
key: "routingDetailName",
title: '工序名称',
title: this.l('routingDetailName'),
align: "left",
easy: true,
high: true,
}
},
{
key: "workHour",
title: this.l('workHour'),
align: "right",
},
],
data: [],
};
......@@ -100,6 +97,10 @@ export default {
handleClose() {
this.$emit("on-close");
},
l(key) {
let vkey = "workHour" + "." + key;
return this.$t(vkey) || key;
},
},
watch: {
row(v) {
......
<template>
<div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
......@@ -35,6 +35,7 @@ export default {
op: "userTitle,userCardNo",
value: null
},
sortBy: 'totalWorkHour'
},
modal: false,
full: false,
......@@ -50,41 +51,41 @@ export default {
title: "序号",
}, {
key: "userTitle",
title: '员工姓名',
title: this.l('userTitle'),
align: "left",
easy: true,
high: true,
},
{
key: "userCardNo",
title: '员工编号',
title: this.l('userCardNo'),
align: "left",
easy: true,
high: true,
},
{
key: "totalWorkHour",
title: '工时数量',
title: this.l('totalWorkHour'),
align: "left",
easy: true,
high: true,
},
{
key: "planQuantity",
title: '计划数量',
title: this.l('planQuantity'),
align: "left",
easy: true,
high: true,
},
{
key: "qualified",
title: '合格数量',
title: this.l('qualified'),
align: "left",
easy: true,
high: true,
},
{
title: "操作",
title: this.l("action"),
key: "action",
width: 140,
align: "center",
......@@ -141,7 +142,7 @@ export default {
this.modal = false;
},
l(key) {
let vkey = "import_center" + "." + key;
let vkey = "workHour" + "." + key;
return this.$t(vkey) || key;
},
},
......
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