Commit ce79bc68 authored by renjintao's avatar renjintao

technology

parent a79178b1
...@@ -591,7 +591,12 @@ html body { ...@@ -591,7 +591,12 @@ html body {
.new-orange { .new-orange {
color: #ff9900; color: #ff9900;
} }
.blueTitle{
color: #2680EB;
}
.grayTitle{
color: #333;
}
/*图标*/ /*图标*/
...@@ -1239,4 +1244,8 @@ html [type=button] { ...@@ -1239,4 +1244,8 @@ html [type=button] {
.h100{ .h100{
height: 100%; height: 100%;
} }
\ No newline at end of file //显示富文本框样式
.detail .ivu-row .filed-col p .html p{
margin: 0 10px 0 0;
}
\ No newline at end of file
...@@ -30,7 +30,7 @@ export default { ...@@ -30,7 +30,7 @@ export default {
border-top: none; border-top: none;
height: 100%; height: 100%;
.filed-col { .filed-col {
max-width: 970px;
border: 1px solid #ddd; border: 1px solid #ddd;
border-right: none; border-right: none;
margin: 0 -1px -1px -1px; margin: 0 -1px -1px -1px;
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
height: 100%; height: 100%;
} }
p { p {
max-width: 870px;
height: 100%; height: 100%;
word-break: break-all; word-break: break-all;
word-wrap: break-word; word-wrap: break-word;
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<Modal v-model="scheduleModal" title="移入排产" width="800"> <Modal v-model="scheduleModal" title="移入排产" width="800">
<p>&nbsp;</p> <p>&nbsp;</p>
<h4>请选择排产模型:</h4> <h4>请选择排产模型:</h4>
<Dictionary code="aps.plan.scheduleType" v-model="scheduleType" class="radioList" border="true" type="radio" @on-change="onchangeScheduleType"></Dictionary> <Dictionary code="aps.plan.scheduleType" v-model="scheduleType" class="radioList" :border="true" type="radio" @on-change="onchangeScheduleType"></Dictionary>
<p class="pl30 pt10" v-show="scheduleType!=null"> <p class="pl30 pt10" v-show="scheduleType!=null">
确定将订单 确定将订单
<span class="fwBold">{{resultsOrderList}}</span> 移入 <span class="fwBold">{{resultsOrderList}}</span> 移入
......
...@@ -179,16 +179,16 @@ export default { ...@@ -179,16 +179,16 @@ export default {
taskSeq: null, taskSeq: null,
taskContent: "", taskContent: "",
resourceType: null, resourceType: null,
runtime: null, runtime: 0,
efficiencyValue: null, efficiencyValue: null,
singleOut: null, singleOut: null,
isOutside: null, isOutside: null,
isImportant: null, isImportant: null,
outsideTime: null, outsideTime: 0,
isImportantResources: null, isImportantResources: null,
schedulingWorkingHours: null, schedulingWorkingHours: 0,
realWorkingHours: null, realWorkingHours: 0,
realRuntime: null, realRuntime: 0,
isParticipateIntime: null, isParticipateIntime: null,
equipType: "", equipType: "",
}, },
......
...@@ -11,7 +11,7 @@ export default { ...@@ -11,7 +11,7 @@ export default {
return Api.post(`${technologyUrl}routingdetail/create`, params); return Api.post(`${technologyUrl}routingdetail/create`, params);
}, },
update(params) { update(params) {
return Api.post(`${technologyUrl}routingdetail/update`, params); return Api.put(`${technologyUrl}routingdetail/update`, params);
}, },
delete(id) { delete(id) {
return Api.delete(`${technologyUrl}routingdetail/delete`, { return Api.delete(`${technologyUrl}routingdetail/delete`, {
......
<template> <template>
<div class="detail"> <div class="detail">
<Row>
<Row> <Filed :span="12" :name="l('taskSeq')">{{entity.taskSeq}}</Filed>
<Filed :span="12" :name="l('classId')">{{entity.classId}}</Filed> <Filed :span="12" :name="l('name')">{{entity.name}}</Filed>
<Filed :span="12" :name="l('routingHeaderId')">{{entity.routingHeaderId}}</Filed> <Filed :span="12" :name="l('equipType')">{{entity.equipType}}</Filed>
<Filed :span="12" :name="l('name')">{{entity.name}}</Filed> <Filed :span="12" :name="l('resourceType')">
<Filed :span="12" :name="l('taskSeq')">{{entity.taskSeq}}</Filed> <state code="Process.routing_detail.resource_type" :value="entity.resourceType" type="text"></state>
<Filed :span="24" :name="l('description')">{{entity.description}}</Filed> </Filed>
<Filed :span="12" :name="l('taskContent')">{{entity.taskContent}}</Filed> <Filed :span="12" :name="l('isImportant')">
<Filed :span="12" :name="l('resourceId')">{{entity.resourceId}}</Filed> <state code="Process.state" :value="entity.isImportant" type="text"></state>
<Filed :span="12" :name="l('resourceType')">{{entity.resourceType}}</Filed> </Filed>
<Filed :span="12" :name="l('runtime')">{{entity.runtime}}</Filed> <Filed :span="12" :name="l('isImportantResources')">
<Filed :span="12" :name="l('setupTime')">{{entity.setupTime}}</Filed> <state code="Process.state" :value="entity.isImportantResources" type="text"></state>
<Filed :span="12" :name="l('transportTime')">{{entity.transportTime}}</Filed> </Filed>
<Filed :span="12" :name="l('checkTime')">{{entity.checkTime}}</Filed> <Filed :span="12" :name="l('schedulingWorkingHours')">{{entity.schedulingWorkingHours}}</Filed>
<Filed :span="12" :name="l('checkFlag')">{{entity.checkFlag}}</Filed> <Filed :span="12" :name="l('runtime')">{{entity.runtime}}</Filed>
<Filed :span="12" :name="l('efficiencyValue')">{{entity.efficiencyValue}}</Filed> <Filed :span="12" :name="l('realRuntime')">{{entity.realRuntime}}</Filed>
<Filed :span="12" :name="l('singleOut')">{{entity.singleOut}}</Filed> <Filed :span="12" :name="l('realWorkingHours')">{{entity.realWorkingHours}}</Filed>
<Filed :span="12" :name="l('isOutside')">{{entity.isOutside}}</Filed> <Filed :span="12" :name="l('isOutside')">
<Filed :span="12" :name="l('departmentId')">{{entity.departmentId}}</Filed> <state code="Process.state" :value="entity.isOutside" type="text"></state>
<Filed :span="12" :name="l('isImportant')">{{entity.isImportant}}</Filed> </Filed>
<Filed :span="12" :name="l('milestoneId')">{{entity.milestoneId}}</Filed> <Filed :span="12" :name="l('outsideTime')">{{entity.outsideTime}}</Filed>
<Filed :span="12" :name="l('phaseId')">{{entity.phaseId}}</Filed> <Filed :span="12" :name="l('isParticipateIntime')">
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed> <state code="Process.state" :value="entity.isParticipateIntime" type="text"></state>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed> </Filed>
<Filed :span="12" :name="l('extend')">{{entity.extend}}</Filed> <Filed :span="12" :name="l('efficiencyValue')">{{entity.efficiencyValue}}</Filed>
<Filed :span="12" :name="l('outsideTime')">{{entity.outsideTime}}</Filed> <Filed :span="12" :name="l('singleOut')">{{entity.singleOut}}</Filed>
<Filed :span="12" :name="l('performanceHours')">{{entity.performanceHours}}</Filed> <Filed :span="24" :name="l('taskContent')" >
<Filed :span="12" :name="l('resourceCode')">{{entity.resourceCode}}</Filed> <div v-html="entity.taskContent" class="html"></div>
<Filed :span="12" :name="l('isImportantResources')">{{entity.isImportantResources}}</Filed> </Filed>
<Filed :span="12" :name="l('schedulingWorkingHours')">{{entity.schedulingWorkingHours}}</Filed> </Row>
<Filed :span="12" :name="l('realWorkingHours')">{{entity.realWorkingHours}}</Filed> </div>
<Filed :span="12" :name="l('realRuntime')">{{entity.realRuntime}}</Filed>
<Filed :span="12" :name="l('performanceWorkingHours')">{{entity.performanceWorkingHours}}</Filed>
<Filed :span="12" :name="l('isParticipateIntime')">{{entity.isParticipateIntime}}</Filed>
<Filed :span="12" :name="l('equipType')">{{entity.equipType}}</Filed>
<Filed :span="12" :name="l('equipTypeId')">{{entity.equipTypeId}}</Filed>
<Filed :span="12" :name="l('note')">{{entity.note}}</Filed>
</Row>
</div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
export default { export default {
name: 'Add', name: "Add",
data() { data() {
return { return {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ 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')
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "routing_detail" + "." + key;
return this.$t(key)
} }
}, };
watch: { },
eid(v) { props: {
if (v > 0) { eid: Number
this.load(v); },
} mounted() {
} if (this.eid > 0) {
} this.load(this.eid);
} }
</script> },
\ No newline at end of file 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>
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row> <Row>
<Col :span="12"><FormItem :label="l('classId')" prop="classId"> <InputNumber v-model="entity.classId"></InputNumber> <Col :span="8">
</FormItem></Col> <FormItem :label="l('taskSeq')" prop="taskSeq">
<Col :span="12"><FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <InputNumber v-model="entity.routingHeaderId"></InputNumber> <InputNumber v-model="entity.taskSeq"></InputNumber>
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('name')" prop="name"> <Input v-model="entity.name"> </Input> </Col>
</FormItem></Col> <Col :span="8">
<Col :span="12"><FormItem :label="l('taskSeq')" prop="taskSeq"> <InputNumber v-model="entity.taskSeq"></InputNumber> <FormItem :label="l('name')" prop="name">
</FormItem></Col> <Input v-model="entity.name"></Input>
<Col :span="24"><FormItem :label="l('description')" prop="description"> <Input v-model="entity.description" type="textarea" :rows="5"></Input> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('taskContent')" prop="taskContent"> <Input v-model="entity.taskContent"> </Input> <Col :span="8">
</FormItem></Col> <FormItem :label="l('equipType')" prop="equipType">
<Col :span="12"><FormItem :label="l('resourceId')" prop="resourceId"> <InputNumber v-model="entity.resourceId"></InputNumber> <EquipSelect v-model="entity.equipType"></EquipSelect>
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('resourceType')" prop="resourceType"> <Dictionary code="Process.routing_detail.resource_type" v-model="entity.resourceType"></Dictionary> </Col>
</FormItem></Col> <Col :span="8">
<Col :span="12"><FormItem :label="l('runtime')" prop="runtime"> <InputNumber v-model="entity.runtime"></InputNumber> <FormItem :label="l('resourceType')" prop="resourceType">
</FormItem></Col> <Dictionary code="Process.routing_detail.resource_type" v-model="entity.resourceType"></Dictionary>
<Col :span="12"><FormItem :label="l('setupTime')" prop="setupTime"> <InputNumber v-model="entity.setupTime"></InputNumber> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('transportTime')" prop="transportTime"> <InputNumber v-model="entity.transportTime"></InputNumber> <Col :span="8">
</FormItem></Col> <FormItem :label="l('isImportant')" prop="isImportant">
<Col :span="12"><FormItem :label="l('checkTime')" prop="checkTime"> <InputNumber v-model="entity.checkTime"></InputNumber> <Dictionary code="Process.state" v-model="entity.isImportant" type="radio"></Dictionary>
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('checkFlag')" prop="checkFlag"> <Dictionary code="Process.routing_detail.check_flag" v-model="entity.checkFlag"></Dictionary> </Col>
</FormItem></Col> <Col :span="8">
<Col :span="12"><FormItem :label="l('efficiencyValue')" prop="efficiencyValue"> <InputNumber v-model="entity.efficiencyValue"></InputNumber> <FormItem :label="l('isImportantResources')" prop="isImportantResources">
</FormItem></Col> <Dictionary code="Process.state" v-model="entity.isImportantResources" type="radio"></Dictionary>
<Col :span="12"><FormItem :label="l('singleOut')" prop="singleOut"> <InputNumber v-model="entity.singleOut"></InputNumber> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('isOutside')" prop="isOutside"> <Dictionary code="Process.state" v-model="entity.isOutside"></Dictionary> <Col :span="8">
</FormItem></Col> <FormItem :label="l('schedulingWorkingHours')" prop="schedulingWorkingHours">
<Col :span="12"><FormItem :label="l('departmentId')" prop="departmentId"> <InputNumber v-model="entity.departmentId"></InputNumber> <InputTime v-model="entity.schedulingWorkingHours" />
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('isImportant')" prop="isImportant"> <Dictionary code="Process.state" v-model="entity.isImportant"></Dictionary> </Col>
</FormItem></Col> <Col :span="8">
<Col :span="12"><FormItem :label="l('milestoneId')" prop="milestoneId"> <InputNumber v-model="entity.milestoneId"></InputNumber> <FormItem :label="l('runtime')" prop="runtime">
</FormItem></Col> <InputTime v-model="entity.runtime" />
<Col :span="12"><FormItem :label="l('phaseId')" prop="phaseId"> <InputNumber v-model="entity.phaseId"></InputNumber> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('status')" prop="status"> <Dictionary code="Process.Status" v-model="entity.status"></Dictionary> <Col :span="8">
</FormItem></Col> <FormItem :label="l('realRuntime')" prop="realRuntime">
<Col :span="24"><FormItem :label="l('remark')" prop="remark"> <Input v-model="entity.remark" type="textarea" :rows="5"></Input> <InputTime v-model="entity.realRuntime" />
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('extend')" prop="extend"> <Input v-model="entity.extend"> </Input> </Col>
</FormItem></Col> <Col :span="8">
<Col :span="12"><FormItem :label="l('outsideTime')" prop="outsideTime"> <InputNumber v-model="entity.outsideTime"></InputNumber> <FormItem :label="l('realWorkingHours')" prop="realWorkingHours">
</FormItem></Col> <InputTime v-model="entity.realWorkingHours" />
<Col :span="12"><FormItem :label="l('performanceHours')" prop="performanceHours"> <InputNumber v-model="entity.performanceHours"></InputNumber> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('resourceCode')" prop="resourceCode"> <Input v-model="entity.resourceCode"> </Input> <Col :span="8">
</FormItem></Col> <FormItem :label="l('isOutside')" prop="isOutside">
<Col :span="12"><FormItem :label="l('isImportantResources')" prop="isImportantResources"> <Dictionary code="Process.state" v-model="entity.isImportantResources"></Dictionary> <Dictionary
</FormItem></Col> code="Process.state"
<Col :span="12"><FormItem :label="l('schedulingWorkingHours')" prop="schedulingWorkingHours"> <InputNumber v-model="entity.schedulingWorkingHours"></InputNumber> v-model="entity.isOutside"
</FormItem></Col> type="radio"
<Col :span="12"><FormItem :label="l('realWorkingHours')" prop="realWorkingHours"> <InputNumber v-model="entity.realWorkingHours"></InputNumber> style="height:20px"
</FormItem></Col> ></Dictionary>
<Col :span="12"><FormItem :label="l('realRuntime')" prop="realRuntime"> <InputNumber v-model="entity.realRuntime"></InputNumber> </FormItem>
</FormItem></Col> </Col>
<Col :span="12"><FormItem :label="l('performanceWorkingHours')" prop="performanceWorkingHours"> <InputNumber v-model="entity.performanceWorkingHours"></InputNumber> <Col :span="8" v-show="entity.isOutside==1">
</FormItem></Col> <FormItem :label="l('outsideTime')" prop="outsideTime">
<Col :span="12"><FormItem :label="l('isParticipateIntime')" prop="isParticipateIntime"> <Dictionary code="Process.state" v-model="entity.isParticipateIntime"></Dictionary> <InputTime v-model="entity.outsideTime" />
</FormItem></Col> </FormItem>
<Col :span="12"><FormItem :label="l('equipType')" prop="equipType"> <Input v-model="entity.equipType"> </Input> </Col>
</FormItem></Col>
<Col :span="12"><FormItem :label="l('equipTypeId')" prop="equipTypeId"> <InputNumber v-model="entity.equipTypeId"></InputNumber> <Col :span="8">
</FormItem></Col> <FormItem :label="l('isParticipateIntime')" prop="isParticipateIntime">
<Col :span="12"><FormItem :label="l('note')" prop="note"> <Input v-model="entity.note"> </Input> <Dictionary code="Process.state" v-model="entity.isParticipateIntime" type="radio"></Dictionary>
</FormItem></Col> </FormItem>
</Row> </Col>
<FormItem> <Col :span="8">
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <FormItem :label="l('efficiencyValue')" prop="efficiencyValue">
<Button @click="handleClose" class="ml20">取消</Button> <InputNumber v-model="entity.efficiencyValue"></InputNumber>
</FormItem> </FormItem>
</Form> </Col>
<Col :span="8">
<FormItem :label="l('singleOut')" prop="singleOut">
<InputNumber v-model="entity.singleOut"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('taskContent')" prop="taskContent">
<i-quill v-model="entity.taskContent" :height="200" v-paste="handleImg" />
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
export default { import iQuill from "@/components/quill";
name: 'Edit', export default {
data() { name: "Edit",
return { components: { iQuill },
disabled: false, data() {
entity: { return {
}, disabled: false,
rules: { entity: {},
name: [{ required: true, message: '必填', trigger: 'blur' }] rules: {
} name: [{ 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;
})
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
Api.update(this.entity).then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
} else {
this.$Message.error('保存失败')
}
}).catch(err => {
this.disabled = false;
this.$Message.error('保存失败')
console.warn(err)
})
}
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "routing_detail" + "." + key;
return this.$t(key)
} }
}, };
watch: { },
eid(v) { props: {
if (v != 0) { eid: Number
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;
});
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
this.disabled = true;
if (this.entity.isOutside != 1) {
this.entity.outsideTime = 0;
}
Api.update(this.entity)
.then(r => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch(err => {
this.disabled = false;
this.$Message.error("保存失败");
console.warn(err);
});
} }
});
},
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> </script>
\ No newline at end of file
...@@ -8,10 +8,14 @@ ...@@ -8,10 +8,14 @@
:height="gridHeight" :height="gridHeight"
:page="false" :page="false"
></DataGrid> ></DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" @data="getData" />
</Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiStep from "./routingStep/api";
export default { export default {
name: "expand", name: "expand",
props: { props: {
...@@ -49,7 +53,10 @@ export default { ...@@ -49,7 +53,10 @@ export default {
key: "stepSeq", key: "stepSeq",
title: this.l("stepSeq"), title: this.l("stepSeq"),
align: "left", align: "left",
width:120 width: 150,
render: (h, params) => {
return h("div", { style: "padding-left:10px" }, params.row.stepSeq);
}
}, },
{ {
key: "name", key: "name",
...@@ -61,26 +68,28 @@ export default { ...@@ -61,26 +68,28 @@ export default {
title: this.l("status"), title: this.l("status"),
align: "center", align: "center",
code: "Process.Status", code: "Process.Status",
width: 100 width: 150
}, },
{ {
key: "stepContent", key: "stepContent",
title: this.l("stepContent"), title: this.l("stepContent"),
align: "left", align: "left",
width: 800, width: 800,
tooltip: true tooltip: true,
}, hide: true
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left"
}, },
{ {
key: "creatorUserId", key: "creatorUserId",
title: this.l("creatorUserId"), title: this.l("creatorUserId"),
hide: true, align: "left",
align: "left" type: "user",
width: 200
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
width: 200
}, },
{ {
title: "操作", title: "操作",
...@@ -101,7 +110,7 @@ export default { ...@@ -101,7 +110,7 @@ export default {
"op", "op",
{ {
attrs: { oprate: "edit" }, attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row.id, params.index) }
}, },
"编辑" "编辑"
), ),
...@@ -118,7 +127,12 @@ export default { ...@@ -118,7 +127,12 @@ export default {
} }
], ],
listExpand: [], listExpand: [],
gridHeight: 50 gridHeight: 50,
modal: false,
title: "新增",
detail: null,
curId: 0,
index: 0
}; };
}, },
mounted() { mounted() {
...@@ -134,6 +148,42 @@ export default { ...@@ -134,6 +148,42 @@ export default {
this.gridHeight = 102; this.gridHeight = 102;
} }
}, },
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./routingStep/detail");
this.modal = true;
},
edit(id, index) {
this.curId = id;
this.index = index;
this.title = "编辑";
this.detail = () => import("./routingStep/edit");
this.modal = true;
},
remove(id) {
ApiStep.delete(id).then(r => {
if (r.success) {
this.$Message.success("删除成功");
this.$emit('showDetail');
}
});
},
ok() {
// this.load();
this.modal = false;
this.curId = 0;
},
getData(data) {
//let tempList=this.$u.clone(this.listExpand)
//tempList[this.index]=data
//this.$refs.gridExpand.list=tempList
this.$emit('showDetail');
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) { l(key) {
let vkey = "routing_step" + "." + key; let vkey = "routing_step" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
......
...@@ -6,7 +6,14 @@ ...@@ -6,7 +6,14 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" /> <component
:is="detail"
:eid="curId"
:headid="hid"
:eName="curName"
@on-close="cancel"
@on-ok="ok"
/>
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -40,6 +47,7 @@ export default { ...@@ -40,6 +47,7 @@ export default {
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: 0,
curName: "",
hid: 0, hid: 0,
columns: [ columns: [
{ {
...@@ -49,6 +57,15 @@ export default { ...@@ -49,6 +57,15 @@ export default {
return h(expandRow, { return h(expandRow, {
props: { props: {
row: params.row.steps row: params.row.steps
},
on: {
//监听子组件showDetail事件
showDetail: value => {
//确保dom更新完成
this.$nextTick(() => {
this.toRefresh();
});
}
} }
}); });
} }
...@@ -247,7 +264,9 @@ export default { ...@@ -247,7 +264,9 @@ export default {
"op", "op",
{ {
attrs: { oprate: "detail" }, attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) } on: {
click: () => this.addStep(params.row.id, params.row.name)
}
}, },
"新增" "新增"
), ),
...@@ -290,7 +309,7 @@ export default { ...@@ -290,7 +309,7 @@ export default {
} else { } else {
this.easySearch.routingHeaderId.value = this.$route.query.id; this.easySearch.routingHeaderId.value = this.$route.query.id;
} }
this.hid = this.$route.query.id; this.hid = this.easySearch.routingHeaderId.value;
}, },
mounted() { mounted() {
this.load(); this.load();
...@@ -306,8 +325,9 @@ export default { ...@@ -306,8 +325,9 @@ export default {
methods: { methods: {
load() { load() {
this.list = [];
let params = { let params = {
id: this.$route.query.id id: this.hid
}; };
Api.getdetailsteps(params) Api.getdetailsteps(params)
.then(r => { .then(r => {
...@@ -320,7 +340,7 @@ export default { ...@@ -320,7 +340,7 @@ export default {
}); });
}, },
ok() { ok() {
this.$refs.grid.load(); this.load();
this.modal = false; this.modal = false;
this.curId = 0; this.curId = 0;
}, },
...@@ -354,7 +374,7 @@ export default { ...@@ -354,7 +374,7 @@ export default {
remove(id) { remove(id) {
Api.delete(id).then(r => { Api.delete(id).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load(); this.load();
this.$Message.success("删除成功"); this.$Message.success("删除成功");
} }
}); });
...@@ -363,6 +383,16 @@ export default { ...@@ -363,6 +383,16 @@ export default {
this.curId = 0; this.curId = 0;
this.modal = false; this.modal = false;
}, },
addStep(detailId, detailName) {
this.curId = detailId;
this.curName = detailName;
this.title = "新增工步";
this.detail = () => import("./routingStep/add");
this.modal = true;
},
toRefresh() {
this.load();
},
l(key) { l(key) {
/* /*
routing_detail:{ routing_detail:{
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Row> <Row>
<Col :span="12"> <!-- <Col :span="12">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber style="width:200px" v-model="entity.routingHeaderId"></InputNumber> <InputNumber style="width:200px" v-model="entity.routingHeaderId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col> -->
<Col :span="12"> <Col :span="24">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem label="工艺名称" >
<InputNumber style="width:200px" v-model="entity.routingDetailId"></InputNumber> {{eName}}
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -115,23 +115,12 @@ export default { ...@@ -115,23 +115,12 @@ export default {
return { return {
disabled: false, disabled: false,
entity: { entity: {
creationTime: null, routingHeaderId: 0,
creatorUserId: null, routingDetailId: 0,
lastModificationTime: null,
lastModifierUserId: null,
isDeleted: null,
deleterUserId: null,
deletionTime: null,
routingHeaderId: null,
routingDetailId: null,
classId: null,
stepSeq: null, stepSeq: null,
name: "", name: "",
description: "",
status: null, status: null,
remark: "",
stepContent: "", stepContent: "",
extend: ""
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
...@@ -140,18 +129,21 @@ export default { ...@@ -140,18 +129,21 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,//工序id
eName:String,//工序名称
headid:Number,//工艺id
}, },
mounted() { mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.routingHeaderId=this.headid
this.entity.routingDetailId=this.eid
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
......
<template> <template>
<div class="detail"> <div class="detail">
<Row>
<Row> <Filed :span="12" :name="l('stepSeq')">{{entity.stepSeq}}</Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed> <Filed :span="12" :name="l('name')">{{entity.name}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed> <Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed> <Filed :span="24" :name="l('stepContent')"><div v-html="entity.stepContent" class="html"></div></Filed>
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed> <Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed> <Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed>
<Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed> </Row>
<Filed :span="12" :name="l('deletionTime')">{{entity.deletionTime}}</Filed> </div>
<Filed :span="12" :name="l('routingHeaderId')">{{entity.routingHeaderId}}</Filed>
<Filed :span="12" :name="l('routingDetailId')">{{entity.routingDetailId}}</Filed>
<Filed :span="12" :name="l('classId')">{{entity.classId}}</Filed>
<Filed :span="12" :name="l('stepSeq')">{{entity.stepSeq}}</Filed>
<Filed :span="12" :name="l('name')">{{entity.name}}</Filed>
<Filed :span="24" :name="l('description')">{{entity.description}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed>
<Filed :span="24" :name="l('stepContent')">{{entity.stepContent}}</Filed>
<Filed :span="12" :name="l('extend')">{{entity.extend}}</Filed>
</Row>
</div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
export default { export default {
name: 'Add', name: "Add",
data() { data() {
return { return {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }], name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ 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')
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "routing_step" + "." + key;
return this.$t(key)
} }
}, };
watch: { },
eid(v) { props: {
if (v > 0) { eid: Number
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_step" + "." + key;
return this.$t(key);
}
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
}
}
};
</script> </script>
\ No newline at end of file
...@@ -145,6 +145,7 @@ export default { ...@@ -145,6 +145,7 @@ export default {
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
this.$emit("on-ok"); this.$emit("on-ok");
this.$emit("data",this.entity);
} else { } else {
this.$Message.error("保存失败"); this.$Message.error("保存失败");
} }
......
...@@ -177,6 +177,7 @@ export default { ...@@ -177,6 +177,7 @@ export default {
}, },
props: { props: {
headid: Number, headid: Number,
eName:String,
eid: Number eid: Number
}, },
mounted() { mounted() {
......
...@@ -282,7 +282,6 @@ export default { ...@@ -282,7 +282,6 @@ export default {
}, },
add() { add() {
this.curId = 0; this.curId = 0;
this.title = "新增"; this.title = "新增";
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
} }
.fullWindow { .fullWindow {
position: fixed; position: fixed;
width: 100%; width: 100%;
left: 0; left: 0;
top: 50px; top: 50px;
bottom: 0; bottom: 0;
...@@ -68,14 +68,25 @@ ...@@ -68,14 +68,25 @@
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
<div class="fullWindow flex fd" v-if="viewModal"> <div class="fullWindow flex fd" v-if="viewModal">
<div class="top flex"> <div class="top flex">
<div v-width="200"> <div v-width="200">
<a class="back_href" @click="viewClose"> <a class="back_href" @click="viewClose">
<Icon type="ios-undo-outline" size="24"/>返回工艺规程 <Icon type="ios-undo-outline" size="24" />返回工艺规程
</a> </a>
</div> </div>
<div class="fg">工艺信息</div> <div class="fg tc f14 fwBold blueTitle">
工艺信息&nbsp;&nbsp;&nbsp;&nbsp;{{l('code')}}:
<span class="grayTitle">{{titleObj.code}}</span>&nbsp;&nbsp;&nbsp;&nbsp;
{{l('name')}}:
<span class="grayTitle">{{titleObj.name}}</span>&nbsp;&nbsp;&nbsp;&nbsp;
{{l('routingType')}}:
<span class="grayTitle">{{titleObj.routingType}}</span>&nbsp;&nbsp;&nbsp;&nbsp;
{{l('version')}}:
<span class="grayTitle">{{titleObj.version}}</span>&nbsp;&nbsp;&nbsp;&nbsp;
{{l('departmentId')}}:
<span class="grayTitle">{{titleObj.departmentId}}</span>
</div>
</div> </div>
<div class="fg"> <div class="fg">
<iframe width="100%" id="infoFrame" height="100%" frameborder="0" :src="src"></iframe> <iframe width="100%" id="infoFrame" height="100%" frameborder="0" :src="src"></iframe>
...@@ -246,7 +257,7 @@ export default { ...@@ -246,7 +257,7 @@ export default {
"op", "op",
{ {
attrs: { oprate: "detail" }, attrs: { oprate: "detail" },
on: { click: () => this.view(params.row.id) } on: { click: () => this.view(params.row) }
}, },
"查看" "查看"
), ),
...@@ -270,7 +281,14 @@ export default { ...@@ -270,7 +281,14 @@ export default {
]); ]);
} }
} }
] ],
titleObj: {
code: "", //工艺编号
name: "", //工艺名称
routingType: 0, //工艺类型
version: "", //工艺版本
departmentId: null //车间
}
}; };
}, },
created() { created() {
...@@ -298,12 +316,19 @@ export default { ...@@ -298,12 +316,19 @@ export default {
this.showMenu = true; this.showMenu = true;
}, },
// 详情页面 // 详情页面
view(id) { view(row) {
// this.$router.push("technology/details"); // this.$router.push("technology/details");
// window.open("/technology/details","_blank") // window.open("/technology/details","_blank")
this.viewModal = true; this.viewModal = true;
this.titleObj = {
code: row.code,
name: row.name,
routingType: row.routingType,
version: row.version,
departmentId: row.departmentId
};
// this.info=()=>import("./details") // this.info=()=>import("./details")
this.src = "/technology/details?id=" + id; this.src = "/technology/details?id=" + row.id;
}, },
viewClose() { viewClose() {
this.viewModal = false; this.viewModal = false;
......
...@@ -8,6 +8,37 @@ html body { ...@@ -8,6 +8,37 @@ html body {
#__layout { #__layout {
height: 100%; height: 100%;
} }
/*flex*/
.flex {
display: flex;
}
.fc-m {
justify-content: center;
}
.fc-e {
justify-content: flex-end;
}
.fc-b {
justify-content: space-between;
}
.fc-a {
justify-content: space-around;
}
.fd {
flex-direction: column;
}
.fg {
flex-grow: 1;
}
.fg2 {
flex-grow: 2;
}
.fos {
order: -1;
}
.foe {
order: 99;
}
/*字体*/ /*字体*/
.ib { .ib {
display: inline; display: inline;
...@@ -37,6 +68,11 @@ html body { ...@@ -37,6 +68,11 @@ html body {
color: #f23a3a; color: #f23a3a;
cursor: pointer; cursor: pointer;
} }
.stitle {
height: 40px;
background-color: #F5F6FA;
line-height: 40px;
}
.lh10 { .lh10 {
line-height: 10px; line-height: 10px;
} }
...@@ -55,6 +91,9 @@ html body { ...@@ -55,6 +91,9 @@ html body {
.lh40 { .lh40 {
line-height: 40px; line-height: 40px;
} }
.lh50 {
line-height: 50px;
}
/*边距*/ /*边距*/
.m10 { .m10 {
margin: 10px; margin: 10px;
...@@ -412,6 +451,12 @@ html body { ...@@ -412,6 +451,12 @@ html body {
.new-orange { .new-orange {
color: #ff9900; color: #ff9900;
} }
.blueTitle {
color: #2680EB;
}
.grayTitle {
color: #333;
}
/*图标*/ /*图标*/
i.iconfont { i.iconfont {
cursor: pointer; cursor: pointer;
...@@ -515,7 +560,6 @@ textarea::-webkit-input-placeholder { ...@@ -515,7 +560,6 @@ textarea::-webkit-input-placeholder {
display: none; display: none;
} }
.zh-tree { .zh-tree {
position: relative;
display: block; display: block;
width: 250px; width: 250px;
float: left; float: left;
...@@ -536,12 +580,9 @@ textarea::-webkit-input-placeholder { ...@@ -536,12 +580,9 @@ textarea::-webkit-input-placeholder {
border-bottom: #e4e6ed solid 1px; border-bottom: #e4e6ed solid 1px;
} }
.zh-tree .zh-box { .zh-tree .zh-box {
height: -110%;
width: 100%; width: 100%;
overflow-y: auto; height: 100%;
padding: 15px; padding: 15px;
margin-bottom: -5000px;
padding-bottom: 5000px;
} }
.content-right { .content-right {
margin-left: 10px; margin-left: 10px;
...@@ -930,3 +971,9 @@ html [type=button] { ...@@ -930,3 +971,9 @@ html [type=button] {
.content { .content {
padding-left: 5px; padding-left: 5px;
} }
.h100 {
height: 100%;
}
.detail .ivu-row .filed-col p .html p {
margin: 0 10px 0 0;
}
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