Commit 406d62d3 authored by renjintao's avatar renjintao

details 列表

parent a43fe07b
<template>
<div class="detail">
<div class="orderDetail">
<Row>
<Filed :span="12" :name="l('mesCode')">{{entity.mesCode}}</Filed>
<Filed :span="12" :name="l('taskType')">
<state code="plan.order.taskType" :value="entity.taskType" type="text"></state>
</Filed>
<Filed :span="12" :name="l('quantity')">{{entity.quantity}}</Filed>
<Filed :span="12" :name="l('status')">
<state code="plan.order.status" :value="entity.status" type="text"></state>
</Filed>
<Filed :span="12" :name="l('productName')">{{entity.productName}}</Filed>
<Filed :span="12" :name="l('drawnNumber')">{{entity.drawnNumber}}</Filed>
<Filed :span="12" :name="l('batchNumber')">{{entity.batchNumber}}</Filed>
<Filed :span="12" :name="l('projectNumber')">{{entity.projectNumber}}</Filed>
<Filed :span="12" :name="l('urgencyLevel')">
<state code="plan.order.urgencyLevel" :value="entity.urgencyLevel" type="text"></state>
</Filed>
<Filed :span="12" :name="l('demandStartDate')"><DTSpan type="date" v-model="entity.demandStartDate"></DTSpan></Filed>
<Filed :span="12" :name="l('demandFinishDate')"><DTSpan type="date" v-model="entity.demandFinishDate"></DTSpan></Filed>
<Filed :span="12" :name="l('taskRequire')">{{entity.taskRequire}}</Filed>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed>
<Col span="8">
<span class="fwBold">{{l('mesCode')}}</span>
<p>{{entity.mesCode}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('taskType')}}</span>
<p> <state code="plan.order.taskType" :value="entity.taskType" type="text"></state></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('quantity')}}</span>
<p>{{entity.quantity}}</p>
</Col>
</Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('status')}}</span>
<p><state code="plan.order.status" :value="entity.status" type="text"></state></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('productName')}}</span>
<p>{{entity.productName}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('drawnNumber')}}</span>
<p>{{entity.drawnNumber}}</p>
</Col>
</Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('batchNumber')}}</span>
<p>{{entity.batchNumber}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('projectNumber')}}</span>
<p>{{entity.projectNumber}}</p>
</Col>
<Col span="8">
<span class="fwBold">{{l('urgencyLevel')}}</span>
<p><state code="plan.order.urgencyLevel" :value="entity.urgencyLevel" type="text"></state></p>
</Col>
</Row>
<Row>
<Col span="8">
<span class="fwBold">{{l('demandStartDate')}}</span>
<p><DTSpan type="date" v-model="entity.demandStartDate"></DTSpan></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('demandFinishDate')}}</span>
<p><DTSpan type="date" v-model="entity.demandFinishDate"></DTSpan></p>
</Col>
<Col span="8">
<span class="fwBold">{{l('taskRequire')}}</span>
<p>{{entity.taskRequire}}</p>
</Col>
</Row>
<Row class="lastRow">
<Col span="24">
<span class="fwBold">{{l('remark')}}</span>
<p>{{entity.remark}}</p>
</Col>
</Row>
</div>
</template>
<script>
......@@ -47,7 +89,7 @@ export default {
l(key) {
key = "mes_plan" + "." + key;
return this.$t(key);
},
}
},
watch: {
row(v) {
......@@ -58,3 +100,20 @@ export default {
}
};
</script>
<style lang="less">
.orderDetail
{
line-height: 30px;
width: 90%;
margin: 0 auto;
.ivu-row{
padding-top: 20px;
padding-bottom: 20px;
border-bottom:#ccc solid 1px;
}
.lastRow
{
border-bottom:none;
}
}
</style>
......@@ -53,7 +53,7 @@
<Modal v-model="editModal" title="编辑" footer-hide width="1200">
<Edit :row="rowData" @on-close="cancel" @on-ok="addOk" />
</Modal>
<Modal v-model="detailModal" title="详情" width="1200">
<Modal v-model="detailModal" title="订单详情" width="900">
<Detail :row="rowData" />
</Modal>
<Modal v-model="splitModal" title="订单分解" width="1200">
......@@ -297,7 +297,7 @@ export default {
h(
"op",
{
attrs: { oprate: "detail", title: "查看" },
attrs: { oprate: "detail", },
on: { click: () => this.detail(params.row) }
},
"查看"
......@@ -305,7 +305,7 @@ export default {
h(
"op",
{
attrs: { oprate: "edit", title: "编辑" },
attrs: { oprate: "edit", },
on: { click: () => this.edit(params.row) },
style:
(params.row.status == 1 &&
......@@ -321,7 +321,7 @@ export default {
h(
"op",
{
attrs: { oprate: "remove", title: "删除" },
attrs: { oprate: "remove", },
on: { click: () => this.remove(params.row) },
style:
(params.row.status == 1 &&
......@@ -336,7 +336,7 @@ export default {
h(
"op",
{
attrs: { oprate: "detail", title: "分解" },
attrs: { oprate: "detail", },
on: { click: () => this.split(params.row) },
style:
(params.row.divideMark != 0 &&
......
......@@ -23,7 +23,11 @@ export default {
deletes(params) {
return Api.post(`${technologyUrl}routingdetail/batchdelete`, params);
},
pagedDetails(params) { //获取工序列表
pagedDetails(params) { //根据工艺规程ID获取工序列表
return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params);
},
getdetailsteps(params) { //根据工艺规程ID获取工序及对应工步的列表
return Api.get(`${technologyUrl}routingdetail/getdetailsteps`, params);
},
}
<template>
<div class="excute">
<DataGrid
:columns="columnsExpand"
ref="gridExpand"
:data="listExpand"
:tool="false"
:height="gridHeight"
:page="false"
></DataGrid>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "expand",
props: {
row: { type: Array, default: [] }
},
data() {
return {
columnsExpand: [
{
key: "id",
title: this.l("id"),
align: "left",
hide: true
},
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
hide: true,
align: "left",
hide: true
},
{
key: "routingDetailId",
title: this.l("routingDetailId"),
hide: true,
align: "left"
},
{
key: "classId",
title: this.l("classId"),
align: "left",
hide: true
},
{
key: "stepSeq",
title: this.l("stepSeq"),
align: "left",
width:120
},
{
key: "name",
title: this.l("name"),
align: "left"
},
{
key: "status",
title: this.l("status"),
align: "center",
code: "Process.Status",
width: 100
},
{
key: "stepContent",
title: this.l("stepContent"),
align: "left",
width: 800,
tooltip: true
},
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left"
},
{
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.id) }
},
"查看"
),
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) }
},
"编辑"
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
},
"删除"
)
]);
}
}
],
listExpand: [],
gridHeight: 50
};
},
mounted() {
this.loadList();
},
methods: {
loadList() {
this.listExpand = this.row;
this.gridHeight = 50;
if (this.listExpand.length > 0) {
this.gridHeight = 52 + this.listExpand.length * 50;
} else {
this.gridHeight = 102;
}
},
l(key) {
let vkey = "routing_step" + "." + key;
return this.$t(vkey) || key;
}
},
watch: {
row(v) {
if (v && v.length > 0) {
this.listExpand = v;
}
}
}
};
</script>
<style scoped>
.excute table tr th span,
.excute table tr td {
font-size: 10px;
}
</style>
\ No newline at end of file
<template>
<div>
<DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字工序名称/备注/备注/资源编号/设备类型/备注" v-model="easySearch.keys.value" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询 {{headerid}}vv</Button>
</FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</template>
<DataGrid :columns="columns" ref="grid" :data="list" :easy="false" :high="false">
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
......@@ -26,6 +13,7 @@
<script>
import Api from "./api";
import Search from "./search";
import expandRow from "./expand.vue";
export default {
name: "list",
components: {
......@@ -53,222 +41,217 @@ export default {
detail: null,
curId: 0,
columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left"
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
hide: true,
align: "left"
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
hide: true,
align: "left"
type: "expand",
width: 50,
render: (h, params) => {
return h(expandRow, {
props: {
row: params.row.steps
}
});
}
},
{ key: "classId", title: this.l("classId"), align: "left", high: true },
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{ key: "classId", title: this.l("classId"), align: "left" },
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
align: "left",
high: true
align: "left"
},
{
key: "name",
title: this.l("name"),
align: "left",
easy: true,
high: true
align: "left"
},
{ key: "taskSeq", title: this.l("taskSeq"), align: "left", high: true },
{ key: "taskSeq", title: this.l("taskSeq"), align: "left" },
{
key: "description",
title: this.l("description"),
align: "left",
easy: true,
high: true
align: "left"
},
{
key: "resourceId",
title: this.l("resourceId"),
align: "left",
high: true
align: "left"
},
{
key: "resourceType",
title: this.l("resourceType"),
align: "left",
high: true,
code: "Process.routing_detail.resource_type"
},
{ key: "runtime", title: this.l("runtime"), align: "left", high: true },
{ key: "runtime", title: this.l("runtime"), align: "left" },
{
key: "setupTime",
title: this.l("setupTime"),
align: "left",
high: true
align: "left"
},
{
key: "transportTime",
title: this.l("transportTime"),
align: "left",
high: true
align: "left"
},
{
key: "checkTime",
title: this.l("checkTime"),
align: "left",
high: true
align: "left"
},
{
key: "checkFlag",
title: this.l("checkFlag"),
align: "left",
high: true,
code: "Process.routing_detail.check_flag"
},
{
key: "efficiencyValue",
title: this.l("efficiencyValue"),
align: "left",
high: true
align: "left"
},
{
key: "singleOut",
title: this.l("singleOut"),
align: "left",
high: true
align: "left"
},
{
key: "isOutside",
title: this.l("isOutside"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "departmentId",
title: this.l("departmentId"),
align: "left",
high: true
align: "left"
},
{
key: "isImportant",
title: this.l("isImportant"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "milestoneId",
title: this.l("milestoneId"),
align: "left",
high: true
align: "left"
},
{ key: "phaseId", title: this.l("phaseId"), align: "left", high: true },
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: "Process.Status"
},
{
key: "outsideTime",
title: this.l("outsideTime"),
align: "left",
high: true
align: "left"
},
{
key: "performanceHours",
title: this.l("performanceHours"),
align: "left",
high: true
align: "left"
},
{
key: "resourceCode",
title: this.l("resourceCode"),
align: "left",
easy: true,
high: true
easy: true
},
{
key: "isImportantResources",
title: this.l("isImportantResources"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "schedulingWorkingHours",
title: this.l("schedulingWorkingHours"),
align: "left",
high: true
align: "left"
},
{
key: "realWorkingHours",
title: this.l("realWorkingHours"),
align: "left",
high: true
align: "left"
},
{
key: "realRuntime",
title: this.l("realRuntime"),
align: "left",
high: true
align: "left"
},
{
key: "performanceWorkingHours",
title: this.l("performanceWorkingHours"),
align: "left",
high: true
align: "left"
},
{
key: "isParticipateIntime",
title: this.l("isParticipateIntime"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "equipType",
title: this.l("equipType"),
align: "left",
easy: true,
high: true
easy: true
},
{
key: "equipTypeId",
title: this.l("equipTypeId"),
align: "left",
high: true
align: "left"
},
{
key: "note",
title: this.l("note"),
align: "left",
easy: true,
high: true
easy: true
},
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left"
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
hide: true,
align: "left"
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
hide: true,
align: "left"
},
{
title: "操作",
key: "action",
width: 140,
width: 180,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) }
},
"新增"
),
h(
"op",
{
......@@ -297,18 +280,20 @@ export default {
]);
}
}
]
],
list: []
};
},
created() {
console.warn("dfadf:",this.headerid)
if(this.headerid!=-1){
console.warn("dfadf:", this.headerid);
if (this.headerid != -1) {
this.easySearch.routingHeaderId.value = this.headerid;
}else{
this.easySearch.routingHeaderId.value=this.$route.query.id;
} else {
this.easySearch.routingHeaderId.value = this.$route.query.id;
}
},
mounted() {
this.load();
// console.log(this);
// alert(this.headerid);
// if(this.headerid){
......@@ -320,6 +305,20 @@ export default {
},
methods: {
load() {
let params = {
id: this.$route.query.id
};
Api.getdetailsteps(params)
.then(r => {
if (r.success) {
this.list = r.result;
}
})
.catch(err => {
this.$Message.error("连接错误");
});
},
ok() {
this.$refs.grid.load();
this.modal = false;
......
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action"><template slot="easySearch"><Form ref="formInline" :model="easySearch" inline><FormItem prop="keys"><Input placeholder="请输入关键字工步名称/描述/备注/工步内容" v-model="easySearch.keys.value" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem>
</Form></template>
<DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字工步名称/描述/备注/工步内容" v-model="easySearch.keys.value" />
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
</FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</template>
......@@ -16,108 +24,181 @@
</div>
</template>
<script>
import Api from './api'
import Search from './search'
import Api from "./api";
import Search from "./search";
export default {
name: 'list',
components:{
name: "list",
components: {
Search
},
head: {
title: "工步",
author: "henq",
description: "routing_step 4/28/2020 4:23:17 PM",
},
description: "routing_step 4/28/2020 4:23:17 PM"
},
data() {
return {
action: Api.index,
easySearch: {
keys:{op:"name,description,remark,stepContent",value:null}
},
keys: { op: "name,description,remark,stepContent", value: null }
},
modal: false,
title:"新增",
detail:null,
title: "新增",
detail: null,
curId: 0,
columns: [
{ key:"id",title:this.l("id") ,hide:true ,align:"left" },
{ key:"creationTime",title:this.l("creationTime") ,hide:true ,align:"left" ,high:true },
{ key:"creatorUserId",title:this.l("creatorUserId") ,hide:true ,align:"left" ,high:true },
{ key:"lastModificationTime",title:this.l("lastModificationTime") ,hide:true ,align:"left" ,high:true },
{ key:"lastModifierUserId",title:this.l("lastModifierUserId") ,hide:true ,align:"left" ,high:true },
{ key:"routingHeaderId",title:this.l("routingHeaderId") ,hide:true ,align:"left" },
{ key:"routingDetailId",title:this.l("routingDetailId") ,hide:true ,align:"left" },
{ key:"classId",title:this.l("classId") ,hide:true ,align:"left" },
{ key:"stepSeq",title:this.l("stepSeq") ,align:"left" ,high:true },
{ key:"name",title:this.l("name") ,align:"left" ,easy:true ,high:true },
{ key:"description",title:this.l("description") ,align:"left" ,easy:true ,high:true },
{ key:"status",title:this.l("status") ,align:"left" ,high:true ,code:'Process.Status' },
{ key: "id", title: this.l("id"), hide: true, align: "left" },
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left",
high: true
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left",
high: true
},
{
key: "lastModificationTime",
title: this.l("lastModificationTime"),
hide: true,
align: "left",
high: true
},
{
key: "lastModifierUserId",
title: this.l("lastModifierUserId"),
hide: true,
align: "left",
high: true
},
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
hide: true,
align: "left"
},
{
key: "routingDetailId",
title: this.l("routingDetailId"),
hide: true,
align: "left"
},
{ key: "classId", title: this.l("classId"), hide: true, align: "left" },
{ key: "stepSeq", title: this.l("stepSeq"), align: "left", high: true },
{
title: '操作',
key: 'action',
key: "name",
title: this.l("name"),
align: "left",
easy: true,
high: true
},
{
key: "description",
title: this.l("description"),
align: "left",
easy: true,
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
code: "Process.Status"
},
{
title: "操作",
key: "action",
width: 140,
align: 'center',
align: "center",
render: (h, params) => {
return h('div', { class: "action" }, [
h('op', { attrs: { oprate: 'detail' }, on: { click: () => this.view(params.row.id) } }, '查看'),
return h("div", { class: "action" }, [
h(
"op",
{
attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) }
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h('op', { attrs: { oprate: 'edit'}, on: { click: () => this.edit(params.row.id) } }, '编辑'),
h('op', { attrs: { oprate: 'delete' }, on: { click: () => this.remove(params.row.id) } }, '删除')
])
}
h(
"op",
{
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) }
},
]
"编辑"
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
},
"删除"
)
]);
}
}
]
};
},
mounted(){
mounted() {
console.log(this);
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods:{
methods: {
ok() {
this.$refs.grid.load()
this.modal = false
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch)
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = 0;
this.title = "新增";
this.detail =()=> import('./add')
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () =>import('./add')
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () =>import('./detail')
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import('./edit')
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
Api.delete(id).then(r => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success('删除成功')
this.$Message.success("删除成功");
}
})
});
},
cancel() {
this.curId = 0;
this.modal = false
this.modal = false;
},
l(key) {
/*
......@@ -143,10 +224,10 @@ keys:{op:"name,description,remark,stepContent",value:null}
}
*/
let vkey = "routing_step" + "." + key;
return this.$t(vkey)||key
return this.$t(vkey) || key;
}
}
}
};
</script>
<style lang="less">
</style>
\ No newline at end of file
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