Commit d674128c authored by 周远喜's avatar 周远喜

工艺规程

parent 08208291
...@@ -222,7 +222,7 @@ export default { ...@@ -222,7 +222,7 @@ export default {
//查询条件 //查询条件
type: Object, type: Object,
default: function() { default: function() {
return { return {
keys: { op: "name", value: "", default: true } keys: { op: "name", value: "", default: true }
}; };
} }
...@@ -394,7 +394,7 @@ export default { ...@@ -394,7 +394,7 @@ export default {
this.$emit("on-drag-drop", a, b); this.$emit("on-drag-drop", a, b);
}, },
easySearch() { easySearch() {
if (this.conditions && this.conditions.keys.default) { if (this.conditions&& this.conditions.keys && this.conditions.keys.default) {
//判断没有传入条件的用默认的查询 //判断没有传入条件的用默认的查询
this.conditions.keys.value = this.keys; this.conditions.keys.value = this.keys;
} }
......
...@@ -43,16 +43,16 @@ ...@@ -43,16 +43,16 @@
<div class="details_box"> <div class="details_box">
<div class="details_body"> <div class="details_body">
<Menu mode="horizontal" theme="light" active-name="0"> <Menu mode="horizontal" theme="light" active-name="0">
<MenuItem name="0" to="/technology/details/routingDetail">工序</MenuItem> <MenuItem name="0" :to="'/technology/details?id='+headerId">工序</MenuItem>
<MenuItem name="1" to="/technology/details/routingStep">工步</MenuItem> <MenuItem name="1" :to="'/technology/details/routingStep?id='+headerId">工步</MenuItem>
<MenuItem name="2" to="/technology/details/routingqccard">质控卡</MenuItem> <MenuItem name="2" :to="'/technology/details/routingqccard?id='+headerId">质控卡</MenuItem>
<MenuItem name="3" to="/technology/details/routingsupporting">工艺BOM</MenuItem> <MenuItem name="3" :to="'/technology/details/routingsupporting?id='+headerId">工艺BOM</MenuItem>
<!-- <MenuItem name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> --> <!-- <MenuItem name="4" to="/technology/details/setup/setupDetails">生产准备</MenuItem> -->
</Menu> </Menu>
</div> </div>
<div class="bottom_box"> <div class="bottom_box">
{{headerId}} {{headerId}}
<nuxt-child keep-alive :headerId="headerId"></nuxt-child> <nuxt-child keep-alive :headerid="headerId"></nuxt-child>
</div> </div>
</div> </div>
</template> </template>
......
<template> <template>
<routingDetail></routingDetail> <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>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template> </template>
<script> <script>
import routingDetail from './routingDetail' import Api from "./api";
import Search from "./search";
export default { export default {
components:{routingDetail}, name: "list",
} components: {
Search
},
head: {
title: "工序",
author: "henq",
description: "routing_detail 4/28/2020 4:10:02 PM"
},
props: ["headerid"],
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "name,description,remark,resourceCode,equipType,note",
value: null
},
routingHeaderId: { op: "Equal", value: -1 }
},
// conditions: { routingHeaderId: { op: "Equal", value: -1 } },
modal: false,
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"
},
{
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"
},
{ key: "classId", title: this.l("classId"), align: "left", high: true },
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
align: "left",
high: true
},
{
key: "name",
title: this.l("name"),
align: "left",
easy: true,
high: true
},
{ key: "taskSeq", title: this.l("taskSeq"), align: "left", high: true },
{
key: "description",
title: this.l("description"),
align: "left",
easy: true,
high: true
},
{
key: "resourceId",
title: this.l("resourceId"),
align: "left",
high: true
},
{
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: "setupTime",
title: this.l("setupTime"),
align: "left",
high: true
},
{
key: "transportTime",
title: this.l("transportTime"),
align: "left",
high: true
},
{
key: "checkTime",
title: this.l("checkTime"),
align: "left",
high: true
},
{
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
},
{
key: "singleOut",
title: this.l("singleOut"),
align: "left",
high: true
},
{
key: "isOutside",
title: this.l("isOutside"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "departmentId",
title: this.l("departmentId"),
align: "left",
high: true
},
{
key: "isImportant",
title: this.l("isImportant"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "milestoneId",
title: this.l("milestoneId"),
align: "left",
high: true
},
{ 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
},
{
key: "performanceHours",
title: this.l("performanceHours"),
align: "left",
high: true
},
{
key: "resourceCode",
title: this.l("resourceCode"),
align: "left",
easy: true,
high: true
},
{
key: "isImportantResources",
title: this.l("isImportantResources"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "schedulingWorkingHours",
title: this.l("schedulingWorkingHours"),
align: "left",
high: true
},
{
key: "realWorkingHours",
title: this.l("realWorkingHours"),
align: "left",
high: true
},
{
key: "realRuntime",
title: this.l("realRuntime"),
align: "left",
high: true
},
{
key: "performanceWorkingHours",
title: this.l("performanceWorkingHours"),
align: "left",
high: true
},
{
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
},
{
key: "equipTypeId",
title: this.l("equipTypeId"),
align: "left",
high: true
},
{
key: "note",
title: this.l("note"),
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.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) }
},
"删除"
)
]);
}
}
]
};
},
created() {
console.warn("dfadf:",this.headerid)
if(this.headerid!=-1){
this.easySearch.routingHeaderId.value = this.headerid;
}else{
this.easySearch.routingHeaderId.value=this.$route.query.id;
}
},
mounted() {
// console.log(this);
// alert(this.headerid);
// if(this.headerid){
// this.easySearch.routingHeaderId.view = this.headerid;
// }
},
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);
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then(r => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("删除成功");
}
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) {
/*
routing_detail:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'最近修改时间',
lastModifierUserId:'最近修改人',
isDeleted:'是否删除',
deleterUserId:'删除人',
deletionTime:'删除时间',
classId:'',
routingHeaderId:'工艺规程id',
name:'工序名称',
taskSeq:'工序号',
description:'备注',
taskContent:'工序内容',
resourceId:'资源ID',
resourceType:'资源类型',
runtime:'单件排产工时',
setupTime:'工序准备工时',
transportTime:'转运工时',
checkTime:'检验工时',
checkFlag:'检验标识',
efficiencyValue:'效率系数',
singleOut:'单件产出',
isOutside:'是否外协',
departmentId:'工序的承制车间',
isImportant:'是否关键工序',
milestoneId:'里程碑',
phaseId:'阶段id',
status:'状态',
remark:'备注',
extend:'扩展字段',
outsideTime:'外协工期',
performanceHours:'绩效工时',
resourceCode:'资源编号',
isImportantResources:'关重资源',
schedulingWorkingHours:'排产准结工时',
realWorkingHours:'实作准结工时',
realRuntime:'实作单件工时',
performanceWorkingHours:'绩效准结工时',
isParticipateIntime:'是否参与工时分配',
equipType:'设备类型',
equipTypeId:'设备类型ID',
note:'备注',
}
*/
let vkey = "routing_detail" + "." + key;
return this.$t(vkey) || key;
}
}
};
</script> </script>
<style lang="less"> <style lang="less">
.footer02 {
background: #4c5968;
opacity: 0.9;
position: absolute;
bottom: 9px;
box-shadow: 0px -5px 6px rgba(0,0,0,0.3);
width: 83%;
z-index: 99;
padding: 10px;
color: #fff;
margin: 10px 0 10px 0;
}
</style> </style>
\ No newline at end of file
<template>
<div>
<DataGrid :columns="columns" ref="grid" :conditions="conditions" :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>
{{this.headerId}}
</FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
</template>
<script>
import Api from "./api";
import Search from "./search";
export default {
name: "list",
components: {
Search
},
head: {
title: "工序",
author: "henq",
description: "routing_detail 4/28/2020 4:10:02 PM"
},
data() {
return {
action: Api.index,
easySearch: {
keys: {
op: "name,description,remark,resourceCode,equipType,note",
value: null
},
routingHeaderId: { op: "Equal", value: -1 }
},
conditions: { routingHeaderId: { op: "Equal", value: -1 } },
modal: false,
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"
},
{
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"
},
{ key: "classId", title: this.l("classId"), align: "left", high: true },
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
align: "left",
high: true
},
{
key: "name",
title: this.l("name"),
align: "left",
easy: true,
high: true
},
{ key: "taskSeq", title: this.l("taskSeq"), align: "left", high: true },
{
key: "description",
title: this.l("description"),
align: "left",
easy: true,
high: true
},
{
key: "resourceId",
title: this.l("resourceId"),
align: "left",
high: true
},
{
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: "setupTime",
title: this.l("setupTime"),
align: "left",
high: true
},
{
key: "transportTime",
title: this.l("transportTime"),
align: "left",
high: true
},
{
key: "checkTime",
title: this.l("checkTime"),
align: "left",
high: true
},
{
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
},
{
key: "singleOut",
title: this.l("singleOut"),
align: "left",
high: true
},
{
key: "isOutside",
title: this.l("isOutside"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "departmentId",
title: this.l("departmentId"),
align: "left",
high: true
},
{
key: "isImportant",
title: this.l("isImportant"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "milestoneId",
title: this.l("milestoneId"),
align: "left",
high: true
},
{ 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
},
{
key: "performanceHours",
title: this.l("performanceHours"),
align: "left",
high: true
},
{
key: "resourceCode",
title: this.l("resourceCode"),
align: "left",
easy: true,
high: true
},
{
key: "isImportantResources",
title: this.l("isImportantResources"),
align: "left",
high: true,
code: "Process.state"
},
{
key: "schedulingWorkingHours",
title: this.l("schedulingWorkingHours"),
align: "left",
high: true
},
{
key: "realWorkingHours",
title: this.l("realWorkingHours"),
align: "left",
high: true
},
{
key: "realRuntime",
title: this.l("realRuntime"),
align: "left",
high: true
},
{
key: "performanceWorkingHours",
title: this.l("performanceWorkingHours"),
align: "left",
high: true
},
{
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
},
{
key: "equipTypeId",
title: this.l("equipTypeId"),
align: "left",
high: true
},
{
key: "note",
title: this.l("note"),
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.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) }
},
"删除"
)
]);
}
}
]
};
},
created(){
this.easySearch.routingHeaderId.view=this.headerId;
this.conditions.routingHeaderId.value=this.headerId;
},
mounted() {
// console.log(this);
alert(this.headerId)
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
props: ["headerId"],
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then(r => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("删除成功");
}
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) {
/*
routing_detail:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'最近修改时间',
lastModifierUserId:'最近修改人',
isDeleted:'是否删除',
deleterUserId:'删除人',
deletionTime:'删除时间',
classId:'',
routingHeaderId:'工艺规程id',
name:'工序名称',
taskSeq:'工序号',
description:'备注',
taskContent:'工序内容',
resourceId:'资源ID',
resourceType:'资源类型',
runtime:'单件排产工时',
setupTime:'工序准备工时',
transportTime:'转运工时',
checkTime:'检验工时',
checkFlag:'检验标识',
efficiencyValue:'效率系数',
singleOut:'单件产出',
isOutside:'是否外协',
departmentId:'工序的承制车间',
isImportant:'是否关键工序',
milestoneId:'里程碑',
phaseId:'阶段id',
status:'状态',
remark:'备注',
extend:'扩展字段',
outsideTime:'外协工期',
performanceHours:'绩效工时',
resourceCode:'资源编号',
isImportantResources:'关重资源',
schedulingWorkingHours:'排产准结工时',
realWorkingHours:'实作准结工时',
realRuntime:'实作单件工时',
performanceWorkingHours:'绩效准结工时',
isParticipateIntime:'是否参与工时分配',
equipType:'设备类型',
equipTypeId:'设备类型ID',
note:'备注',
}
*/
let vkey = "routing_detail" + "." + key;
return this.$t(vkey) || key;
}
}
};
</script>
<style lang="less">
</style>
\ No newline at end of file
...@@ -170,13 +170,6 @@ export default { ...@@ -170,13 +170,6 @@ export default {
return { return {
disabled: false, disabled: false,
entity: { entity: {
creationTime: null,
creatorUserId: null,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deleterUserId: null,
deletionTime: null,
routingHeaderId: null, routingHeaderId: null,
routingDetailId: null, routingDetailId: null,
routingStepId: null, routingStepId: null,
......
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