Commit 68beba9d authored by renjintao's avatar renjintao

details/add

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