Commit 68beba9d authored by renjintao's avatar renjintao

details/add

parent b13587d9
...@@ -1209,8 +1209,8 @@ export default { ...@@ -1209,8 +1209,8 @@ export default {
taskContent:'工序内容', taskContent:'工序内容',
resourceId:'资源ID', resourceId:'资源ID',
resourceType:'资源类型', resourceType:'资源类型',
runtime:'单件排产工时', runtime:'排产工时',
setupTime:'工序准备工时', setupTime:'准备工时',
transportTime:'转运工时', transportTime:'转运工时',
checkTime:'检验工时', checkTime:'检验工时',
checkFlag:'检验标识', checkFlag:'检验标识',
...@@ -1218,9 +1218,9 @@ export default { ...@@ -1218,9 +1218,9 @@ export default {
singleOut:'单件产出', singleOut:'单件产出',
isOutside:'是否外协', isOutside:'是否外协',
departmentId:'承制车间', departmentId:'承制车间',
isImportant:'是否关键工序', isImportant:'关键工序',
milestoneId:'里程碑', milestoneId:'里程碑',
phaseId:'阶段id', phaseId:'工艺阶段',
status:'状态', status:'状态',
remark:'备注', remark:'备注',
extend:'扩展字段', extend:'扩展字段',
...@@ -1232,7 +1232,7 @@ export default { ...@@ -1232,7 +1232,7 @@ export default {
realWorkingHours:'实作准结工时', realWorkingHours:'实作准结工时',
realRuntime:'实作单件工时', realRuntime:'实作单件工时',
performanceWorkingHours:'绩效准结工时', performanceWorkingHours:'绩效准结工时',
isParticipateIntime:'是否参与工时分配', isParticipateIntime:'参与工时分配',
equipType:'设备类型', equipType:'设备类型',
equipTypeId:'设备类型ID', equipTypeId:'设备类型ID',
note:'备注', note:'备注',
......
<template> <template>
<Form ref="form" :model="entity" :rules="rules" :label-width="110"> <Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row> <Row>
<!-- <!--
<Col :span="12"> <Col :span="12">
...@@ -17,11 +17,7 @@ ...@@ -17,11 +17,7 @@
<Input v-model="entity.note"></Input> <Input v-model="entity.note"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12">
<FormItem :label="l('singleOut')" prop="singleOut">
<InputNumber v-model="entity.singleOut"></InputNumber>
</FormItem>
</Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('milestoneId')" prop="milestoneId"> <FormItem :label="l('milestoneId')" prop="milestoneId">
<InputNumber v-model="entity.milestoneId"></InputNumber> <InputNumber v-model="entity.milestoneId"></InputNumber>
...@@ -54,32 +50,12 @@ ...@@ -54,32 +50,12 @@
<Input v-model="entity.resourceCode"></Input> <Input v-model="entity.resourceCode"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12">
<FormItem :label="l('schedulingWorkingHours')" prop="schedulingWorkingHours">
<InputNumber v-model="entity.schedulingWorkingHours"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('realWorkingHours')" prop="realWorkingHours">
<InputNumber v-model="entity.realWorkingHours"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('realRuntime')" prop="realRuntime">
<InputNumber v-model="entity.realRuntime"></InputNumber>
</FormItem>
</Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('performanceWorkingHours')" prop="performanceWorkingHours"> <FormItem :label="l('performanceWorkingHours')" prop="performanceWorkingHours">
<InputNumber v-model="entity.performanceWorkingHours"></InputNumber> <InputNumber v-model="entity.performanceWorkingHours"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12">
<FormItem :label="l('isParticipateIntime')" prop="isParticipateIntime">
<Dictionary code="Process.state" v-model="entity.isParticipateIntime"></Dictionary>
</FormItem>
</Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('equipType')" prop="equipType"> <FormItem :label="l('equipType')" prop="equipType">
<Input v-model="entity.equipType"></Input> <Input v-model="entity.equipType"></Input>
...@@ -89,6 +65,11 @@ ...@@ -89,6 +65,11 @@
<FormItem :label="l('equipTypeId')" prop="equipTypeId"> <FormItem :label="l('equipTypeId')" prop="equipTypeId">
<InputNumber v-model="entity.equipTypeId"></InputNumber> <InputNumber v-model="entity.equipTypeId"></InputNumber>
</FormItem> </FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="5"></Input>
</FormItem>
</Col> </Col>
--> -->
<Col :span="8"> <Col :span="8">
...@@ -102,13 +83,8 @@ ...@@ -102,13 +83,8 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('taskContent')" prop="taskContent"> <FormItem :label="l('equipType')" prop="equipType">
<Input v-model="entity.taskContent"></Input> <EquipSelect v-model="entity.equipType"></EquipSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('phaseId')" prop="phaseId">
<InputNumber v-model="entity.phaseId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
...@@ -116,54 +92,49 @@ ...@@ -116,54 +92,49 @@
<Dictionary code="Process.routing_detail.resource_type" v-model="entity.resourceType"></Dictionary> <Dictionary code="Process.routing_detail.resource_type" v-model="entity.resourceType"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('resourceId')" prop="resourceId"> <FormItem :label="l('isImportant')" prop="isImportant">
<InputNumber v-model="entity.resourceId"></InputNumber> <Dictionary code="Process.state" v-model="entity.isImportant" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('runtime')" prop="runtime"> <FormItem :label="l('isImportantResources')" prop="isImportantResources">
<InputNumber v-model="entity.runtime"></InputNumber> <Dictionary code="Process.state" v-model="entity.isImportantResources" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('setupTime')" prop="setupTime"> <FormItem :label="l('schedulingWorkingHours')" prop="schedulingWorkingHours">
<InputNumber v-model="entity.setupTime"></InputNumber> <InputTime v-model="entity.schedulingWorkingHours" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('transportTime')" prop="transportTime"> <FormItem :label="l('runtime')" prop="runtime">
<InputNumber v-model="entity.transportTime"></InputNumber> <InputTime v-model="entity.runtime" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('checkTime')" prop="checkTime"> <FormItem :label="l('realRuntime')" prop="realRuntime">
<InputNumber v-model="entity.checkTime"></InputNumber> <InputTime v-model="entity.realRuntime" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('isImportant')" prop="isImportant"> <FormItem :label="l('realWorkingHours')" prop="realWorkingHours">
<Dictionary code="Process.state" v-model="entity.isImportant"></Dictionary> <InputTime v-model="entity.realWorkingHours" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('isImportantResources')" prop="isImportantResources"> <FormItem :label="l('outsideTime')" prop="outsideTime">
<Dictionary code="Process.state" v-model="entity.isImportantResources"></Dictionary> <InputTime v-model="entity.outsideTime" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('isOutside')" prop="isOutside"> <FormItem :label="l('isOutside')" prop="isOutside">
<Dictionary code="Process.state" v-model="entity.isOutside"></Dictionary> <Dictionary code="Process.state" v-model="entity.isOutside" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('outsideTime')" prop="outsideTime"> <FormItem :label="l('isParticipateIntime')" prop="isParticipateIntime">
<InputNumber v-model="entity.outsideTime"></InputNumber> <Dictionary code="Process.state" v-model="entity.isParticipateIntime" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('departmentId')" prop="departmentId">
<InputNumber v-model="entity.departmentId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
...@@ -172,13 +143,17 @@ ...@@ -172,13 +143,17 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
<FormItem :label="l('checkFlag')" prop="checkFlag"> <FormItem :label="l('singleOut')" prop="singleOut">
<Dictionary code="Process.routing_detail.check_flag" v-model="entity.checkFlag"></Dictionary> <InputNumber v-model="entity.singleOut"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('description')" prop="description"> <FormItem :label="l('taskContent')" prop="taskContent">
<Input v-model="entity.description" type="textarea" :rows="5"></Input> <i-quill
v-model="entity.taskContent"
:height="200"
v-paste="handleImg"
/>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -190,47 +165,31 @@ ...@@ -190,47 +165,31 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import iQuill from "@/components/quill";
export default { export default {
name: "Add", name: "Add",
components: { iQuill },
data() { data() {
return { return {
disabled: false, disabled: false,
entity: { entity: {
classId: null,
routingHeaderId: null, routingHeaderId: null,
name: "", name: "",
taskSeq: null, taskSeq: null,
description: "",
taskContent: "", taskContent: "",
resourceId: null,
resourceType: null, resourceType: null,
runtime: null, runtime: null,
setupTime: null,
transportTime: null,
checkTime: null,
checkFlag: null,
efficiencyValue: null, efficiencyValue: null,
singleOut: null, singleOut: null,
isOutside: null, isOutside: null,
departmentId: null,
isImportant: null, isImportant: null,
milestoneId: null,
phaseId: null,
status: null,
remark: "",
extend: "",
outsideTime: null, outsideTime: null,
performanceHours: null,
resourceCode: "",
isImportantResources: null, isImportantResources: null,
schedulingWorkingHours: null, schedulingWorkingHours: null,
realWorkingHours: null, realWorkingHours: null,
realRuntime: null, realRuntime: null,
performanceWorkingHours: null,
isParticipateIntime: null, isParticipateIntime: null,
equipType: "", equipType: "",
equipTypeId: null,
note: ""
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
...@@ -239,7 +198,8 @@ export default { ...@@ -239,7 +198,8 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,
headid:Number,
}, },
mounted() { mounted() {
if (this.eid > 0) { if (this.eid > 0) {
...@@ -251,6 +211,7 @@ export default { ...@@ -251,6 +211,7 @@ export default {
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
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -278,6 +239,27 @@ export default { ...@@ -278,6 +239,27 @@ export default {
this.entity.id = 0; this.entity.id = 0;
}); });
}, },
handleImg(e) {
console.warn(e);
// let file = null
// if (
// e.clipboardData &&
// e.clipboardData.items[0] &&
// e.clipboardData.items[0].type &&
// e.clipboardData.items[0].type.indexOf('image') > -1
// ) {
// //这里就是判断是否有粘贴进来的文件且文件为图片格式
// file = e.clipboardData.items[0].getAsFile()
// let reader = new FileReader()
// reader.readAsDataURL(file)
// setTimeout(() => {
// var img = '<img src="' + reader.result + '" alt=""/>'
// this.bugForm.content += img
// }, 1000)
// // new R
// }
},
l(key) { l(key) {
key = "routing_detail" + "." + key; key = "routing_detail" + "." + key;
return this.$t(key); return this.$t(key);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</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" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
</template> </template>
...@@ -40,7 +40,7 @@ export default { ...@@ -40,7 +40,7 @@ export default {
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: 0,
hid:0, hid: 0,
columns: [ columns: [
{ {
type: "expand", type: "expand",
...@@ -53,167 +53,165 @@ export default { ...@@ -53,167 +53,165 @@ export default {
}); });
} }
}, },
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "taskSeq", title: this.l("taskSeq"), align: "left" },
{ key: "classId", title: this.l("classId"), align: "left" },
{
key: "routingHeaderId",
title: this.l("routingHeaderId"),
align: "left"
},
{ {
key: "name", key: "name",
title: this.l("name"), title: this.l("name"),
align: "left" align: "left"
}, },
{ key: "taskSeq", title: this.l("taskSeq"), align: "left" },
{
key: "description",
title: this.l("description"),
align: "left"
},
{ {
key: "resourceId", key: "equipType",
title: this.l("resourceId"), title: this.l("equipType"),
align: "left" align: "left",
easy: true
}, },
{ {
key: "resourceType", key: "resourceType",
title: this.l("resourceType"), title: this.l("resourceType"),
align: "left", align: "left",
code: "Process.routing_detail.resource_type" code: "Process.routing_detail.resource_type"
}, },
{ key: "runtime", title: this.l("runtime"), align: "left" },
{
key: "setupTime",
title: this.l("setupTime"),
align: "left"
},
{
key: "transportTime",
title: this.l("transportTime"),
align: "left"
},
{
key: "checkTime",
title: this.l("checkTime"),
align: "left"
},
{
key: "checkFlag",
title: this.l("checkFlag"),
align: "left",
code: "Process.routing_detail.check_flag"
},
{
key: "efficiencyValue",
title: this.l("efficiencyValue"),
align: "left"
},
{
key: "singleOut",
title: this.l("singleOut"),
align: "left"
},
{
key: "isOutside",
title: this.l("isOutside"),
align: "left",
code: "Process.state"
},
{
key: "departmentId",
title: this.l("departmentId"),
align: "left"
},
{
key: "isImportant",
title: this.l("isImportant"),
align: "left",
code: "Process.state"
},
{
key: "milestoneId",
title: this.l("milestoneId"),
align: "left"
},
{ key: "phaseId", title: this.l("phaseId"), align: "left", high: true },
{
key: "status",
title: this.l("status"),
align: "left",
code: "Process.Status"
},
{
key: "outsideTime",
title: this.l("outsideTime"),
align: "left"
},
{
key: "performanceHours",
title: this.l("performanceHours"),
align: "left"
},
{
key: "resourceCode",
title: this.l("resourceCode"),
align: "left",
easy: true
},
{ {
key: "isImportantResources", key: "isImportantResources",
title: this.l("isImportantResources"), title: this.l("isImportantResources"),
align: "left", align: "center",
code: "Process.state" code: "Process.state"
}, },
{ {
key: "schedulingWorkingHours", key: "schedulingWorkingHours",
title: this.l("schedulingWorkingHours"), title: this.l("schedulingWorkingHours"),
align: "left" align: "right"
},
{
key: "realWorkingHours",
title: this.l("realWorkingHours"),
align: "left"
}, },
{ key: "runtime", title: this.l("runtime"), align: "right" },
{ {
key: "realRuntime", key: "realRuntime",
title: this.l("realRuntime"), title: this.l("realRuntime"),
align: "left" align: "right"
}, },
{ {
key: "performanceWorkingHours", key: "outsideTime",
title: this.l("performanceWorkingHours"), title: this.l("outsideTime"),
align: "left" align: "right"
}, },
{ {
key: "isParticipateIntime", key: "isParticipateIntime",
title: this.l("isParticipateIntime"), title: this.l("isParticipateIntime"),
align: "left", align: "center",
code: "Process.state" code: "Process.state"
}, },
{ {
key: "equipType", key: "isImportant",
title: this.l("equipType"), title: this.l("isImportant"),
align: "center",
code: "Process.state"
},
{
key: "isOutside",
title: this.l("isOutside"),
align: "left", align: "left",
easy: true hide: true,
code: "Process.state"
}, },
{ {
key: "equipTypeId", key: "efficiencyValue",
title: this.l("equipTypeId"), title: this.l("efficiencyValue"),
align: "left" align: "left",
hide: true
}, },
{ {
key: "note", key: "singleOut",
title: this.l("note"), title: this.l("singleOut"),
align: "left", align: "left",
easy: true hide: true
}, },
// {
// key: "resourceId",
// title: this.l("resourceId"),
// align: "left"
// },
// {
// key: "setupTime",
// title: this.l("setupTime"),
// align: "left"
// },
// {
// key: "transportTime",
// title: this.l("transportTime"),
// align: "left"
// },
// {
// key: "checkTime",
// title: this.l("checkTime"),
// align: "left"
// },
// {
// key: "checkFlag",
// title: this.l("checkFlag"),
// align: "left",
// code: "Process.routing_detail.check_flag"
// },
// {
// key: "departmentId",
// title: this.l("departmentId"),
// align: "left"
// },
// {
// key: "milestoneId",
// title: this.l("milestoneId"),
// align: "left"
// },
// { key: "phaseId", title: this.l("phaseId"), align: "left", high: true },
// {
// key: "status",
// title: this.l("status"),
// align: "left",
// code: "Process.Status"
// },
// {
// key: "performanceHours",
// title: this.l("performanceHours"),
// align: "left"
// },
// {
// key: "resourceCode",
// title: this.l("resourceCode"),
// align: "left",
// easy: true
// },
// {
// key: "realWorkingHours",
// title: this.l("realWorkingHours"),
// align: "left"
// },
// {
// key: "performanceWorkingHours",
// title: this.l("performanceWorkingHours"),
// align: "left"
// },
// {
// key: "equipTypeId",
// title: this.l("equipTypeId"),
// align: "left"
// },
// {
// key: "note",
// title: this.l("note"),
// align: "left",
// easy: true
// },
{ {
key: "creationTime", key: "creationTime",
title: this.l("creationTime"), title: this.l("creationTime"),
...@@ -245,7 +243,7 @@ export default { ...@@ -245,7 +243,7 @@ export default {
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
h( h(
"op", "op",
{ {
attrs: { oprate: "detail" }, attrs: { oprate: "detail" },
...@@ -292,7 +290,7 @@ export default { ...@@ -292,7 +290,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.$route.query.id;
}, },
mounted() { mounted() {
this.load(); this.load();
......
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