Commit 09dd3fe7 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents e499a585 f61598ce
...@@ -12,6 +12,9 @@ html body { ...@@ -12,6 +12,9 @@ html body {
#__layout { #__layout {
height: 100% height: 100%
} }
ul,li{
list-style: none;
}
/*flex*/ /*flex*/
.flex{ .flex{
display: flex; display: flex;
...@@ -591,7 +594,12 @@ html body { ...@@ -591,7 +594,12 @@ html body {
.new-orange { .new-orange {
color: #ff9900; color: #ff9900;
} }
.blueTitle{
color: #2680EB;
}
.grayTitle{
color: #333;
}
/*图标*/ /*图标*/
...@@ -823,13 +831,17 @@ textarea::-webkit-input-placeholder { ...@@ -823,13 +831,17 @@ textarea::-webkit-input-placeholder {
background: #f5f6fa; background: #f5f6fa;
} }
.tableCommon .tableCommon tr th { .tableCommon .tableCommon tr th {
line-height: 30px; line-height: 24px;
font-size: 14px; font-size: 14px;
background: #EEEDF0; background: #EEEDF0;
} }
.tableCommon .tableCommon tr td { .tableCommon .tableCommon{
tr td {
border: none;
border-bottom: 1px solid #E4E6ED;
padding: 0 2px; padding: 0 2px;
background: #D5E6FB; background: #F6F8FB;
}
} }
.tableCommon tr td { .tableCommon tr td {
line-height: 25px; line-height: 25px;
...@@ -927,8 +939,19 @@ html [type=button] { ...@@ -927,8 +939,19 @@ html [type=button] {
.action { .action {
a { a {
margin: 0 5px;
color: #1890FF; //查看和其他 color: #1890FF; //查看和其他
span{
padding: 4px;
}
i{
font-size: 16px;
padding: 4px;
border-radius: 3px;
}
i:hover{
background: #1890FF;
color: #fff;
}
} }
a.detail{ a.detail{
...@@ -939,21 +962,25 @@ html [type=button] { ...@@ -939,21 +962,25 @@ html [type=button] {
color: #249E91; color: #249E91;
} }
a.add:hover { // a.add:hover {
color: #27AB9D; // // color: #27AB9D;
} // }
a.edit { a.edit {
// color: #32B187; // color: #32B187;
color: rgb(6, 147, 212) color: rgb(6, 147, 212)
} }
a.edit:hover { // a.edit:hover {
color: #35BD90 // color: #35BD90
} // }
a.remove,a.delete { a.remove,a.delete {
color: #FF7A8B; color: #FF7A8B;
i:hover{
background: #FF7A8B;
color: #fff;
}
} }
a.delete { a.delete {
color: #FF7A8B; color: #FF7A8B;
...@@ -982,15 +1009,15 @@ html [type=button] { ...@@ -982,15 +1009,15 @@ html [type=button] {
} }
} }
a.icon:hover { // a.icon:hover {
background: #27AB9D; // background: #27AB9D;
color: #fff; // color: #fff;
} // }
a.icon:active { // a.icon:active {
background: #229185; // background: #229185;
color: #fff; // color: #fff;
} // }
} }
.icon_box{ .icon_box{
...@@ -1240,3 +1267,7 @@ html [type=button] { ...@@ -1240,3 +1267,7 @@ html [type=button] {
height: 100%; height: 100%;
} }
//显示富文本框样式
.detail .ivu-row .filed-col p .html p{
margin: 0 10px 0 0;
}
\ No newline at end of file
<template> <template>
<div class="table-content myBug"> <div class="table-content myBug flex fd">
<div class="table-tools" v-if="tool"> <div class="table-tools" v-if="tool" ref="tools">
<div class="table-search" v-if="easy"> <div class="table-search" v-if="easy">
<slot name="easySearch"> <slot name="easySearch">
<Input <Input
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
v-model="keys" v-model="keys"
/> />
</slot> </slot>
</div>&nbsp; </div>
<Button v-if="high" @click="modalSearch=true" type="text"> <Button v-if="high" @click="modalSearch=true" type="text">
<Icon type="md-search" />高级 <Icon type="md-search" />高级
</Button> </Button>
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
</Button> </Button>
</div> </div>
</div> </div>
<div class="fg" ref="ftable">
<div v-if="type=='card'" class="table-card"> <div v-if="type=='card'" class="table-card">
<Row> <Row>
<Col :span="span" v-for="(row,i) in list" :key="i"> <Col :span="span" v-for="(row,i) in list" :key="i">
...@@ -44,14 +45,14 @@ ...@@ -44,14 +45,14 @@
:size="size" :size="size"
:row-key="rowKey" :row-key="rowKey"
ref="table" ref="table"
class="tableCommon" class="tableCommon fg"
@on-expand="expand" @on-expand="expand"
@on-drag-drop="onDragDrop" @on-drag-drop="onDragDrop"
@on-selection-change="selectionChange" @on-selection-change="selectionChange"
@on-select="onSelect" @on-select="onSelect"
:loading="loading" :loading="loading"
></Table> ></Table>
<div class="table-footer"> <div class="table-footer" ref="footer">
<div> <div>
<slot name="footer"></slot> <slot name="footer"></slot>
</div>&nbsp; </div>&nbsp;
...@@ -59,7 +60,7 @@ ...@@ -59,7 +60,7 @@
v-if="page" v-if="page"
:total="search.total" :total="search.total"
:current="search.page" :current="search.page"
class="mr15 mt5 fr" class="mr15 mt15 fr"
show-total show-total
size="small" size="small"
show-elevator show-elevator
...@@ -70,6 +71,7 @@ ...@@ -70,6 +71,7 @@
@on-page-size-change="pageSizeChange" @on-page-size-change="pageSizeChange"
/> />
</div> </div>
</div>
<Modal v-if="high" v-model="modalSearch" title="高级搜索" draggable width="800" ref="search"> <Modal v-if="high" v-model="modalSearch" title="高级搜索" draggable width="800" ref="search">
<slot name="searchForm"></slot> <slot name="searchForm"></slot>
<div slot="footer"> <div slot="footer">
...@@ -105,7 +107,7 @@ ...@@ -105,7 +107,7 @@
</li> </li>
</ul> </ul>
</Drawer> </Drawer>
<FooterToolbar style="height:65px" v-if="batch" v-show="footerToolbar"> <FooterToolbar style="height:60px" v-if="batch" v-show="footerToolbar">
<div class="tip"> <div class="tip">
已选{{selectItems.length}} 已选{{selectItems.length}}
<slot name="batch"></slot> <slot name="batch"></slot>
...@@ -268,6 +270,7 @@ export default { ...@@ -268,6 +270,7 @@ export default {
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
// console.log(this.$refs.table)
window.screenHeight = window.innerHeight; window.screenHeight = window.innerHeight;
this.tableHeight = window.screenHeight - this.firstY - 60; this.tableHeight = window.screenHeight - this.firstY - 60;
})(); })();
...@@ -394,7 +397,11 @@ export default { ...@@ -394,7 +397,11 @@ export default {
this.$emit("on-drag-drop", a, b); this.$emit("on-drag-drop", a, b);
}, },
easySearch() { easySearch() {
if (this.conditions&& this.conditions.keys && 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;
} }
...@@ -541,7 +548,23 @@ export default { ...@@ -541,7 +548,23 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.table-content { .table-content {
position: relative; position: relative;
// height: 100%; height: 100%;
.table-tools {
height: 50px;
overflow: hidden;
.table-search {
float: left;
line-height: 50px;
.ivu-form-item {
margin-bottom: 0;
}
}
.btns {
float: right;
text-align: right;
height: 40px;
}
}
.tableCommon { .tableCommon {
width: 100%; width: 100%;
} }
...@@ -553,7 +576,9 @@ export default { ...@@ -553,7 +576,9 @@ export default {
font-size: 14px; font-size: 14px;
background: #f5f6fa; background: #f5f6fa;
} }
.fg {
overflow: auto;
}
.tableCommon tr td { .tableCommon tr td {
line-height: 25px; line-height: 25px;
font-size: 14px; font-size: 14px;
...@@ -570,16 +595,6 @@ export default { ...@@ -570,16 +595,6 @@ export default {
display: block; display: block;
overflow-y: auto; overflow-y: auto;
} }
.table-tools {
.table-search {
float: left;
line-height: 40px;
}
.btns {
float: right;
line-height: 40px;
}
}
.table-set { .table-set {
cursor: pointer; cursor: pointer;
...@@ -587,9 +602,9 @@ export default { ...@@ -587,9 +602,9 @@ export default {
.table-set:hover { .table-set:hover {
color: orange; color: orange;
} }
// .table-footer { .table-footer {
// line-height: 40px; height: 40px;
// } }
} }
.table-columns { .table-columns {
max-height: calc(100% - 50px); max-height: calc(100% - 50px);
......
...@@ -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;
......
<template> <template>
<div class="flex fd tree-menu"> <div class="flex fd tree-menu">
<h3 class="stitle pl10"> <h3>
产品结构 产品结构
<div class="fr mr10 mt10"> <div class="fr mr10 mt10">
<ButtonGroup class="fr" size="small"> <ButtonGroup class="fr" size="small">
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
</h3> </h3>
<div class="search"> <div class="search">
<Input search placeholder="关键字" v-model="keys" clearable/> <Input search placeholder="关键字" v-model="keys" clearable />
</div> </div>
<div class="fg"> <div class="fg">
<div class="tree"> <div class="tree">
...@@ -61,46 +61,46 @@ export default { ...@@ -61,46 +61,46 @@ export default {
toggle() { toggle() {
this.expand = !this.expand; this.expand = !this.expand;
}, },
change(v,b) { change(v, b) {
let ids=[]; let ids = [];
ids.push(b.value); ids.push(b.value);
if(b.children){ if (b.children) {
addId(b.children); addId(b.children);
function addId(data){ function addId(data) {
data.map(u=>{ data.map(u => {
ids.push(u.value) ids.push(u.value);
if(u.children){ if (u.children) {
addId(u.children) addId(u.children);
} }
}) });
} }
} }
this.$emit("on-select",b.value,b,ids) this.$emit("on-select", b.value, b, ids);
}, },
hide(){ hide() {
this.$emit("on-hide") this.$emit("on-hide");
} }
}, },
computed: { computed: {
data() { data() {
let items = this.$u.clone(this.list); let items = this.$u.clone(this.list);
let expand = this.expand; let expand = this.expand;
let result=[]; let result = [];
search(this.keys,items) search(this.keys, items);
function search(keys,data){ function search(keys, data) {
data.map(u=>{ data.map(u => {
if(keys.length<3){ if (keys.length < 3) {
u.expand=expand; u.expand = expand;
result.push(u); result.push(u);
}else{ } else {
u.expand=expand; u.expand = expand;
if(u.title.indexOf(keys)>-1){ if (u.title.indexOf(keys) > -1) {
result.push(u); result.push(u);
}else if(u.children){ } else if (u.children) {
search(keys,u.children) search(keys, u.children);
} }
} }
}) });
} }
return result; return result;
} }
...@@ -110,6 +110,17 @@ export default { ...@@ -110,6 +110,17 @@ export default {
<style lang="less"> <style lang="less">
.tree-menu { .tree-menu {
h3 {
height: 50px;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 50px;
color: rgba(81, 90, 110, 1);
background:rgba(245,246,250,1);
opacity: 1;
padding-left: 10px;
}
.search { .search {
height: 50px; height: 50px;
padding: 5px 10px; padding: 5px 10px;
......
<template> <template>
<div class="i-quill" :class="classes"> <div class="i-quill" :class="classes" >
<div ref="editor" :style="styles"></div> <div ref="editor" :style="styles"></div>
</div> </div>
</template> </template>
<script> <script>
import Quill from 'quill'; import Quill from "quill";
import 'quill/dist/quill.core.css'; import "quill/dist/quill.core.css";
import 'quill/dist/quill.snow.css'; import "quill/dist/quill.snow.css";
import 'quill/dist/quill.bubble.css'; import "quill/dist/quill.bubble.css";
// import resizeImage from "quill-image-resize-module"; // 图片缩放组件。
export default { // import { ImageDrop } from "quill-image-drop-module"; // 图片拖动组件。
name: 'i-quill', // Quill.register("modules/imageDrop", ImageDrop);
// Quill.register("modules/resizeImage ", resizeImage);
export default {
name: "i-quill",
props: { props: {
value: { value: {
type: String, type: String,
default: '' default: ""
}, },
border: { border: {
type: Boolean, type: Boolean,
...@@ -28,45 +31,54 @@ ...@@ -28,45 +31,54 @@
type: Number type: Number
} }
}, },
data () { data() {
return { return {
Quill: null, Quill: null,
currentValue: '', currentValue: "",
options: { options: {
theme: 'snow', theme: "snow",
bounds: document.body, bounds: document.body,
debug: 'warn', debug: "warn",
modules: { modules: {
// imageDrop: true,
// imageResize: {
// displayStyles: {
// backgroundColor: "black",
// border: "none",
// color: "white"
// },
// modules: ["Resize", "DisplaySize", "Toolbar"]
// },
toolbar: [ toolbar: [
['bold', 'italic', 'underline', 'strike'], ["bold", "italic", "underline", "strike"],
[{ 'header': [1, 2, 3, 4, 5, 6, false] }], [{ header: [1, 2, 3, 4, 5, 6, false] }],
[{ 'size': ['small', false, 'large', 'huge'] }], [{ size: ["small", false, "large", "huge"] }],
[{ 'color': [] }, { 'background': [] }], [{ color: [] }, { background: [] }],
['blockquote', 'code-block'], ["blockquote", "code-block"],
[{ 'list': 'ordered' }, { 'list': 'bullet' }], [{ list: "ordered" }, { list: "bullet" }],
// [{ 'script': 'sub' }, { 'script': 'super' }], // [{ 'script': 'sub' }, { 'script': 'super' }],
[{ 'indent': '-1' }, { 'indent': '+1' }], [{ indent: "-1" }, { indent: "+1" }],
[{ 'align': [] }], [{ align: [] }],
[{ 'direction': 'rtl' }], [{ direction: "rtl" }],
// [{ 'font': [] }], // [{ 'font': [] }],
['clean'], ["clean"],
['link', 'image'] ["link", "image"]
] ]
}, },
placeholder: '内容...', placeholder: "内容...",
readOnly: false readOnly: false
} }
} };
}, },
computed: { computed: {
classes () { classes() {
return [ return [
{ {
'i-quill-no-border': !this.border "i-quill-no-border": !this.border
} }
]; ];
}, },
styles () { styles() {
let style = {}; let style = {};
if (this.minHeight) { if (this.minHeight) {
style.minHeight = `${this.minHeight}px`; style.minHeight = `${this.minHeight}px`;
...@@ -79,7 +91,7 @@ ...@@ -79,7 +91,7 @@
}, },
watch: { watch: {
value: { value: {
handler (val) { handler(val) {
if (val !== this.currentValue) { if (val !== this.currentValue) {
this.currentValue = val; this.currentValue = val;
if (this.Quill) { if (this.Quill) {
...@@ -91,53 +103,74 @@ ...@@ -91,53 +103,74 @@
} }
}, },
methods: { methods: {
init () { init() {
const editor = this.$refs.editor; const editor = this.$refs.editor;
// 初始化编辑器 // 初始化编辑器
this.Quill = new Quill(editor, this.options); this.Quill = new Quill(editor, this.options);
// 默认值 // 默认值
this.Quill.pasteHTML(this.currentValue); this.Quill.pasteHTML(this.currentValue);
// 绑定事件 // 绑定事件
this.Quill.on('text-change', (delta, oldDelta, source) => { this.Quill.on("text-change", (delta, oldDelta, source) => {
const html = this.$refs.editor.children[0].innerHTML; const html = this.$refs.editor.children[0].innerHTML;
const text = this.Quill.getText(); const text = this.Quill.getText();
const quill = this.Quill; const quill = this.Quill;
// 更新内部的值 // 更新内部的值
this.currentValue = html; this.currentValue = html;
// 发出事件 v-model // 发出事件 v-model
this.$emit('input', html); this.$emit("input", html);
// 发出事件 // 发出事件
this.$emit('on-change', { html, text, quill }); this.$emit("on-change", { html, text, quill });
}); });
// 将一些 quill 自带的事件传递出去 // 将一些 quill 自带的事件传递出去
this.Quill.on('text-change', (delta, oldDelta, source) => { this.Quill.on("text-change", (delta, oldDelta, source) => {
this.$emit('on-text-change', delta, oldDelta, source); this.$emit("on-text-change", delta, oldDelta, source);
}); });
this.Quill.on('selection-change', (range, oldRange, source) => { this.Quill.on("selection-change", (range, oldRange, source) => {
this.$emit('on-selection-change', range, oldRange, source); this.$emit("on-selection-change", range, oldRange, source);
}); });
this.Quill.on('editor-change', (eventName, ...args) => { this.Quill.on("editor-change", (eventName, ...args) => {
this.$emit('on-editor-change', eventName, ...args); this.$emit("on-editor-change", eventName, ...args);
}); });
} }
}, },
mounted () { 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.currentValue += img;
}, 1000);
// new R
}
},
mounted() {
this.init(); this.init();
}, },
beforeDestroy () { beforeDestroy() {
// 在组件销毁后销毁实例 // 在组件销毁后销毁实例
this.Quill = null; this.Quill = null;
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
.i-quill-no-border{ .i-quill-no-border {
.ql-toolbar.ql-snow{ .ql-toolbar.ql-snow {
border: none; border: none;
border-bottom: 1px solid #e8eaec; border-bottom: 1px solid #e8eaec;
} }
.ql-container.ql-snow{ .ql-container.ql-snow {
border: none; border: none;
} }
} }
</style> </style>
...@@ -1180,7 +1180,7 @@ export default { ...@@ -1180,7 +1180,7 @@ export default {
routingType: '工艺类型', routingType: '工艺类型',
status: '状态', status: '状态',
approvalStatus: '审批状态', approvalStatus: '审批状态',
remark: '备注', remark: '工艺说明',
approvalStatusRemark: '审批备注', approvalStatusRemark: '审批备注',
auditUserId1: '审批人', auditUserId1: '审批人',
auditUserId2: '审批人', auditUserId2: '审批人',
...@@ -1201,26 +1201,26 @@ export default { ...@@ -1201,26 +1201,26 @@ export default {
isDeleted:'是否删除', isDeleted:'是否删除',
deleterUserId:'删除人', deleterUserId:'删除人',
deletionTime:'删除时间', deletionTime:'删除时间',
classId:'', classId:'classId',
routingHeaderId:'工艺规程id', routingHeaderId:'工艺规程id',
name:'工序名称', name:'工序名称',
taskSeq:'工序号', taskSeq:'工序号',
description:'备注', description:'描述',
taskContent:'工序内容', taskContent:'工序内容',
resourceId:'资源ID', resourceId:'资源ID',
resourceType:'资源类型', resourceType:'资源类型',
runtime:'单件排产工时', runtime:'排产工时',
setupTime:'工序准备工时', setupTime:'准备工时',
transportTime:'转运工时', transportTime:'转运工时',
checkTime:'检验工时', checkTime:'检验工时',
checkFlag:'检验标识', checkFlag:'检验标识',
efficiencyValue:'效率系数', efficiencyValue:'效率系数',
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:'备注',
......
This diff is collapsed.
...@@ -12,19 +12,23 @@ ...@@ -12,19 +12,23 @@
}, },
"dependencies": { "dependencies": {
"@nuxtjs/axios": "^5.3.6", "@nuxtjs/axios": "^5.3.6",
"@svgdotjs/svg.draggable.js": "^3.0.2",
"@svgdotjs/svg.js": "^3.0.16",
"area-data": "^5.0.6",
"awe-dnd": "^0.3.4", "awe-dnd": "^0.3.4",
"better-scroll": "^1.12.1", "better-scroll": "^1.12.1",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"dayjs": "^1.8.22", "dayjs": "^1.8.22",
"echarts": "^4.7.0", "echarts": "^4.7.0",
"echarts-liquidfill": "^2.0.5", "echarts-liquidfill": "^2.0.5",
"gojs": "^2.1.10",
"iview-loader": "^1.3.0", "iview-loader": "^1.3.0",
"iview-pro": "file:./iview-pro", "iview-pro": "file:./iview-pro",
"js-cookie": "^2.2.1", "js-cookie": "^2.2.1",
"less": "^3.10.3", "less": "^3.10.3",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"lodash.chunk": "^4.2.0",
"lodash": "^4.17.15", "lodash": "^4.17.15",
"lodash.chunk": "^4.2.0",
"lowdb": "^1.0.0", "lowdb": "^1.0.0",
"marked": "^0.3.9", "marked": "^0.3.9",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",
...@@ -32,12 +36,9 @@ ...@@ -32,12 +36,9 @@
"nuxt": "^2.10.2", "nuxt": "^2.10.2",
"oidc-client": "^1.9.1", "oidc-client": "^1.9.1",
"qs": "^6.6.0", "qs": "^6.6.0",
"gojs": "^2.1.10", "quill-image-drop-module": "^1.0.3",
"quill-image-resize-module": "^3.0.0",
"screenfull": "^5.0.2", "screenfull": "^5.0.2",
"area-data": "^5.0.6",
"xlsx": "^0.15.1",
"@svgdotjs/svg.draggable.js": "^3.0.2",
"@svgdotjs/svg.js": "^3.0.16",
"ua-parser-js": "^0.7.18", "ua-parser-js": "^0.7.18",
"view-design": "^4.1.3", "view-design": "^4.1.3",
"vue-echarts": "^4.0.3", "vue-echarts": "^4.0.3",
...@@ -47,7 +48,8 @@ ...@@ -47,7 +48,8 @@
"vue-ueditor-wrap": "^2.4.1", "vue-ueditor-wrap": "^2.4.1",
"vue2-editor": "^2.10.2", "vue2-editor": "^2.10.2",
"vuedraggable": "^2.23.0", "vuedraggable": "^2.23.0",
"vuex-along": "^1.2.10" "vuex-along": "^1.2.10",
"xlsx": "^0.15.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/plugin-transform-runtime": "^7.2.0", "@babel/plugin-transform-runtime": "^7.2.0",
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<Col :span="12" v-model="entity.rUNTIME"> <Col :span="12" v-model="entity.rUNTIME">
<FormItem :label="l('rUNTIME')" prop="rUNTIME"> <FormItem :label="l('rUNTIME')" prop="rUNTIME">
<InputNumber v-model="entity.run_time" :max="100" :min="1"></InputNumber> <InputTime v-model="entity.run_time" ></InputTime>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<script> <script>
import Api from "../api"; import Api from "../api";
import Edit from "./edit"; import Edit from "./edit";
import Add from "../add"; import Add from "../options";
export default { export default {
name: "list", name: "list",
components: { components: {
...@@ -351,7 +351,7 @@ export default { ...@@ -351,7 +351,7 @@ export default {
icon: "ios-trash", icon: "ios-trash",
type: "icon", type: "icon",
title: "删除工序", title: "删除工序",
oprate: "edit", oprate: "delete",
msg: "确认要刪除工序吗?" msg: "确认要刪除工序吗?"
}, },
on: { click: () => this.remove(params.row, params.index) } on: { click: () => this.remove(params.row, params.index) }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
:page="false" :page="false"
@on-selection-change="onSelect" @on-selection-change="onSelect"
:batch="true" :batch="true"
:border="false" :border="true"
:easy="false" :easy="false"
> >
<template slot="easySearch"></template> <template slot="easySearch"></template>
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Add from "./add"; import Add from "./options";
import Temp from "./temp"; import Temp from "./temp";
import Duration from "./duration"; import Duration from "./duration";
import Expand from "./components/excute"; import Expand from "./components/excute";
...@@ -338,23 +338,23 @@ export default { ...@@ -338,23 +338,23 @@ export default {
}), }),
h("op", { h("op", {
attrs: { attrs: {
icon: "md-return-left", icon: "md-refresh",
type: "icon", type: "icon",
title: "移出排产池", title: "恢复工序",
oprate: "edit", oprate: "edit",
msg: "确认要移出排产吗?" msg: "确认要恢复工序吗?"
}, },
on: { click: () => this.remove(params.row.part_task_pk) } on: { click: () => this.refresh(params.row.part_task_pk) }
}), }),
h("op", { h("op", {
attrs: { attrs: {
icon: "md-refresh", icon: "ios-trash",
type: "icon", type: "icon",
title: "恢复工序", title: "移出排产池",
oprate: "edit", oprate: "delete",
msg: "确认要恢复工序吗?" msg: "确认要移出排产吗?"
}, },
on: { click: () => this.refresh(params.row.part_task_pk) } on: { click: () => this.remove(params.row.part_task_pk) }
}) })
]); ]);
} }
......
...@@ -171,8 +171,7 @@ export default { ...@@ -171,8 +171,7 @@ export default {
overTime: "不加班", //"六日加班", 不加班 加班 overTime: "不加班", //"六日加班", 不加班 加班
efficiencyValue: 11, // 效率系数, 必须大于 0 efficiencyValue: 11, // 效率系数, 必须大于 0
shopId: null, shopId: null,
isDiscrete: true, isDiscrete: true,//是否离散 是否
isDiscrete: "否",
discrete: 1, //离散数值 必须大于 1 discrete: 1, //离散数值 必须大于 1
multiple: true, multiple: true,
multipleEquip: "是", //"是否多台安排设备", 否 是 multipleEquip: "是", //"是否多台安排设备", 否 是
...@@ -350,23 +349,24 @@ export default { ...@@ -350,23 +349,24 @@ export default {
opTaskPk(v, n) { opTaskPk(v, n) {
this.entity.opTaskPk = v; this.entity.opTaskPk = v;
if(v>0){ if(v>0){
console.log("detail",this.row);
let entity={ let entity={
partTaskPk: this.row.part_task_pk, partTaskPk: this.row.part_task_pk,
opTaskPk: this.row.op_task_pk, opTaskPk: this.row.op_task_pk,
taskSeq: this.row.task_seq, taskSeq: this.row.task_seq,
flog: 5, //参数应用范围 flog: 5, //参数应用范围
calId: null, calId: null,
planState: true, planState: this.row.plan_method=="平行",
planMethod: this.row.plan_method, // 平行 重叠 planMethod: this.row.plan_method, // 平行 重叠
over: false, over: this.row.over_time=="加班",
overTime: this.row.over_time, //"六日加班", 不加班 加班 overTime: this.row.over_time, //"六日加班", 不加班 加班
efficiencyValue:this.row.efficiency_value, // 效率系数, 必须大于 0 efficiencyValue:this.row.efficiency_value|1, // 效率系数, 必须大于 0
shopId: null, shopId: null,
isDiscrete: this.row.isdiscrete, isDiscrete: this.row.isdiscrete=="是",
isDiscrete: "否", discrete: this.row.discrete_value|1, //离散数值 必须大于 1
discrete: this.row.discrete_value, //离散数值 必须大于 1 multiple: this.row.multi_machine=="是",
multiple: true, multipleEquip: this.row.multi_machine|"否", //"是否多台安排设备", 否 是
multipleEquip: this.row.multi_machine, //"是否多台安排设备", 否 是
multipleCount: 1, //多台数量 multipleCount: 1, //多台数量
multipleEquipPks: [], multipleEquipPks: [],
multipleEquipIds: "", //"设备id", 用英文逗号分隔 multipleEquipIds: "", //"设备id", 用英文逗号分隔
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<div class="scheduling"> <div class="scheduling">
<div class="aps-l"> <div class="aps-l">
<Row class="row-p"> <Row class="row-p">
<Col :span="6" class="chan-chi">排产池</Col> <Col :span="10" class="chan-chi">整机排产-排产池</Col>
<Col :span="18" class="l-ringht"> <Col :span="14" class="l-ringht">
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small"> <!-- <RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">未排产</Radio> <Radio label="0">未排产</Radio> -->
<Radio label="2">已排查</Radio> <!-- <Radio label="2">已排查</Radio> -->
<!-- <Radio label="-1">全部</Radio> --> <!-- <Radio label="-1">全部</Radio> -->
</RadioGroup> <!-- </RadioGroup> -->
</Col> </Col>
</Row> </Row>
<div class="left-down"> <div class="left-down">
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<div class="time-s"> <div class="time-s">
<span>工序:{{li.drawnNumber}}</span> <span>工序:{{li.drawnNumber}}</span>
</div> </div>
<div class="time-s">{{li.demandFinishDate}} {{li.demandStartDate}}</div> <div class="time-s">{{li.demandFinishDate}} ~ {{li.demandStartDate}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -202,6 +202,8 @@ export default { ...@@ -202,6 +202,8 @@ export default {
if (r.success) { if (r.success) {
r.result.map(e => { r.result.map(e => {
e.checked = false; e.checked = false;
e.demandFinishDate = e.demandFinishDate.substr(0,10)
e.demandStartDate = e.demandStartDate.substr(0,10)
}); });
this.list = r.result; this.list = r.result;
} }
...@@ -375,6 +377,7 @@ export default { ...@@ -375,6 +377,7 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
margin-top: 3px; margin-top: 3px;
height: 24px;
} }
.l-ringht { .l-ringht {
text-align: right; text-align: right;
......
...@@ -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> 移入
......
<template> <template>
<div class="compare"> <div class="compare">
<div class="btn"> <div class="btn" style="z-index:9999;position:absolute;right:0">
<Button type="primary" @click="parameter">下发</Button> <Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 --> <!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button> <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div> </div>
<div class="compare_box"> <div class="compare_box" :style="{height:treeHeight+'px'}">
<div class="left_list"> <div class="left_list">
<ul class="left_ul">
<li class="left_ul_title">
隐藏相同
<i-switch size="small" v-model="switch1" @on-change="change" />
</li>
<li>延期交付批次数</li>
<li>延期交付天数</li>
<li>提前交付批次数</li>
<li>提前交付天数</li>
<li>周日加班设备数</li>
<li>周日设备工作小时数</li>
<li>周六加班设备数</li>
<li>周六设备工作小时数</li>
<li>重叠法工序数</li>
<li>离散法工序数</li>
<li>离散值平均值</li>
<li>任务平衡工序数</li>
<li>效率系数</li>
</ul>
</div>
<div class="right_add flex">
<div class="fg list_box" v-for="a of 5" :class="a%2 == 1?'dip_bg':''">
<ul class="right_ul">
<li class="right_ul_title">
<a class="del_case">
<Icon type="md-close" size="16" @click="delitedCase" title="删除" />
</a>
<span class="case">方案一{{a}}</span>
<span class="case_time">2020-03-22 13:26:35</span>
</li>
<li>延期交付批次数</li>
<li>延期交付天数</li>
<li>提前交付批次数</li>
<li>提前交付天数</li>
<li>周日加班设备数</li>
<li>周日设备工作小时数</li>
<li>周六加班设备数</li>
<li>周六设备工作小时数</li>
<li>重叠法工序数</li>
<li>离散法工序数</li>
<li>离散值平均值</li>
<li>任务平衡工序数</li>
<li>效率系数</li>
</ul>
</div>
</div> </div>
<div class="right_add"></div>
</div> </div>
</div> </div>
</template> </template>
...@@ -20,15 +63,27 @@ export default { ...@@ -20,15 +63,27 @@ export default {
return { return {
code: '2', code: '2',
name: '添加', name: '添加',
tree: [] tree: [],
switch1: true,
treeHeight: "",
} }
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch('loadDictionary') // 加载数据字典
}, },
components: {}, components: {},
created() {}, created() {
mounted() {}, this.treeHeight = window.innerHeight - 170
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.treeHeight = window.screenHeight - 170
})();
}
},
methods: { methods: {
// 下发 // 下发
parameter() { parameter() {
...@@ -47,6 +102,13 @@ export default { ...@@ -47,6 +102,13 @@ export default {
comeBlck() { comeBlck() {
this.$router.push({ path: "/aps/aps" }); this.$router.push({ path: "/aps/aps" });
}, },
change(status){
this.$Message.info('开关状态:' + status);
},
// 删除方案
delitedCase(){
this.$Message.info('删除方案');
},
tabChange(name) { tabChange(name) {
if(name=='technicalcoordination') if(name=='technicalcoordination')
...@@ -63,5 +125,3 @@ if(name=='unqualifiedorder') ...@@ -63,5 +125,3 @@ if(name=='unqualifiedorder')
} }
} }
</script> </script>
<style lang="less">
</style>
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
</div> </div>
</div> </div>
</Sider> </Sider>
<Content> <Content class="tab_card_box">
<Tabs value="name1" :animated="false"> <Tabs class="tab_card" value="name1" type="card" :animated="false">
<TabPane label="结果列表" name="name1"> <TabPane label="结果列表" name="name1">
<resultsList ref="resultsList"/> <resultsList ref="resultsList"/>
</TabPane> </TabPane>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
</style> </style>
<template> <template>
<div> <div>
<div class="btn"> <div class="btn" style="z-index:9999;position:absolute;right:0">
<Button type="primary" @click="parameter">下发</Button> <Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 --> <!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button> <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
......
...@@ -45,7 +45,11 @@ ...@@ -45,7 +45,11 @@
} }
.ivu-layout-content { .ivu-layout-content {
margin-left: 15px; margin-left: 15px;
.tab_card{
.ivu-tabs-bar{
margin-top: 10px;
}
}
.btn { .btn {
float: right; float: right;
margin-top: -52px; margin-top: -52px;
...@@ -56,6 +60,57 @@ ...@@ -56,6 +60,57 @@
.compare{ .compare{
.compare_box{ .compare_box{
border: 1px solid #ccc; border: 1px solid #ccc;
height: 200px; .left_list{
float: left;
width: 200px;
height: 100%;
border-right: 1px solid #ccc;
.left_ul{
.left_ul_title{
height: 80px;
}
li{
line-height: 50px;
text-align: center;
border-bottom: 1px solid #ccc;
}
}
}
.right_add{
height: 100%;
.dip_bg{
background: #ecf9f4;
}
.list_box{
border-right: 1px solid #ccc;
}
.list_box:last-of-type{
border-right: none;
}
.right_ul{
.right_ul_title{
position: relative;
height: 80px;
.del_case{
position: absolute;
top: -8px;
right: 8px;
}
.case{
color: #2680EB;
}
span{
display: block;
height: 38px;
line-height: 37px;
}
}
li{
line-height: 50px;
text-align: center;
border-bottom: 1px solid #ccc;
}
}
}
} }
} }
\ No newline at end of file
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<div class="scheduling"> <div class="scheduling">
<div class="aps-l"> <div class="aps-l">
<Row class="row-p"> <Row class="row-p">
<Col :span="6" class="chan-chi">排产池</Col> <Col :span="9" class="chan-chi">流水排产-排产池</Col>
<Col :span="18" class="l-ringht"> <Col :span="15" class="l-ringht">
<RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small"> <!-- <RadioGroup v-model="status" type="button" @on-change="changeStatus" size="small">
<Radio label="0">未排产</Radio> <Radio label="0">未排产</Radio> -->
<Radio label="2">已排查</Radio> <!-- <Radio label="2">已排查</Radio> -->
<!-- <Radio label="-1">全部</Radio> --> <!-- <Radio label="-1">全部</Radio> -->
</RadioGroup> <!-- </RadioGroup> -->
</Col> </Col>
</Row> </Row>
<div class="left-down"> <div class="left-down">
...@@ -190,6 +190,8 @@ export default { ...@@ -190,6 +190,8 @@ export default {
if (r.result) { if (r.result) {
r.result.map(u => { r.result.map(u => {
u.aps = 0; u.aps = 0;
u.demandFinishDate = u.demandFinishDate.substr(0,10)
u.demandStartDate = u.demandStartDate.substr(0,10)
}); });
this.list = r.result; this.list = r.result;
// if (r.result[0]) { // if (r.result[0]) {
...@@ -414,6 +416,7 @@ export default { ...@@ -414,6 +416,7 @@ export default {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
margin-top: 3px; margin-top: 3px;
height: 24px;
} }
.l-ringht { .l-ringht {
text-align: right; text-align: right;
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
<i-quill <i-quill
v-model="bugForm.content" v-model="bugForm.content"
:height="600" :height="600"
v-paste="handleImg"
/> />
</FormItem> </FormItem>
</Row> </Row>
......
<template> <template>
<div class="detail"> <div class="orderDetail">
<Row> <Row>
<Filed :span="12" :name="l('mesCode')">{{entity.mesCode}}</Filed> <Col span="8">
<Filed :span="12" :name="l('taskType')"> <span class="fwBold">{{l('mesCode')}}</span>
<state code="plan.order.taskType" :value="entity.taskType" type="text"></state> <p>{{entity.mesCode}}</p>
</Filed> </Col>
<Filed :span="12" :name="l('quantity')">{{entity.quantity}}</Filed> <Col span="8">
<Filed :span="12" :name="l('status')"> <span class="fwBold">{{l('taskType')}}</span>
<state code="plan.order.status" :value="entity.status" type="text"></state> <p> <state code="plan.order.taskType" :value="entity.taskType" type="text"></state></p>
</Filed> </Col>
<Filed :span="12" :name="l('productName')">{{entity.productName}}</Filed> <Col span="8">
<Filed :span="12" :name="l('drawnNumber')">{{entity.drawnNumber}}</Filed> <span class="fwBold">{{l('quantity')}}</span>
<Filed :span="12" :name="l('batchNumber')">{{entity.batchNumber}}</Filed> <p>{{entity.quantity}}</p>
<Filed :span="12" :name="l('projectNumber')">{{entity.projectNumber}}</Filed> </Col>
<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>
</Row> </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> </div>
</template> </template>
<script> <script>
...@@ -47,7 +89,7 @@ export default { ...@@ -47,7 +89,7 @@ export default {
l(key) { l(key) {
key = "mes_plan" + "." + key; key = "mes_plan" + "." + key;
return this.$t(key); return this.$t(key);
}, }
}, },
watch: { watch: {
row(v) { row(v) {
...@@ -58,3 +100,20 @@ export default { ...@@ -58,3 +100,20 @@ export default {
} }
}; };
</script> </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 @@ ...@@ -53,7 +53,7 @@
<Modal v-model="editModal" title="编辑" footer-hide width="1200"> <Modal v-model="editModal" title="编辑" footer-hide width="1200">
<Edit :row="rowData" @on-close="cancel" @on-ok="addOk" /> <Edit :row="rowData" @on-close="cancel" @on-ok="addOk" />
</Modal> </Modal>
<Modal v-model="detailModal" title="详情" width="1200"> <Modal v-model="detailModal" title="订单详情" width="900">
<Detail :row="rowData" /> <Detail :row="rowData" />
</Modal> </Modal>
<Modal v-model="splitModal" title="订单分解" width="1200"> <Modal v-model="splitModal" title="订单分解" width="1200">
...@@ -297,7 +297,7 @@ export default { ...@@ -297,7 +297,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", title: "查看" }, attrs: { oprate: "detail", },
on: { click: () => this.detail(params.row) } on: { click: () => this.detail(params.row) }
}, },
"查看" "查看"
...@@ -305,7 +305,7 @@ export default { ...@@ -305,7 +305,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "edit", title: "编辑" }, attrs: { oprate: "edit", },
on: { click: () => this.edit(params.row) }, on: { click: () => this.edit(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -321,7 +321,7 @@ export default { ...@@ -321,7 +321,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "remove", title: "删除" }, attrs: { oprate: "remove", },
on: { click: () => this.remove(params.row) }, on: { click: () => this.remove(params.row) },
style: style:
(params.row.status == 1 && (params.row.status == 1 &&
...@@ -336,7 +336,7 @@ export default { ...@@ -336,7 +336,7 @@ export default {
h( h(
"op", "op",
{ {
attrs: { oprate: "detail", title: "分解" }, attrs: { oprate: "detail", },
on: { click: () => this.split(params.row) }, on: { click: () => this.split(params.row) },
style: style:
(params.row.divideMark != 0 && (params.row.divideMark != 0 &&
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
基本信息 基本信息
</MenuItem> </MenuItem>
<MenuItem name="2" replace> <MenuItem name="2" replace>
主工艺 工艺信息
</MenuItem> </MenuItem>
<!-- <MenuItem name="3" replace> <!-- <MenuItem name="3" replace>
专业工艺 专业工艺
......
...@@ -147,7 +147,7 @@ export default { ...@@ -147,7 +147,7 @@ export default {
{ {
attrs: { attrs: {
oprate: "detail", oprate: "detail",
class: "edit", // class: "edit",
title: "编辑" title: "编辑"
}, },
on: { on: {
......
...@@ -11,52 +11,52 @@ ...@@ -11,52 +11,52 @@
<Input v-model="entity.unicode"></Input> <Input v-model="entity.unicode"></Input>
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="12"> <Col :span="8">
<FormItem :label="l('name')" prop="name"> <FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input> <Input v-model="entity.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('code')" prop="code"> <FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"></Input> <Input v-model="entity.code"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('routingType')" prop="routingType"> <FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary> <Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('productId')" prop="productId"> <FormItem :label="l('productId')" prop="productId">
<ProductSelect v-model="entity.productId"></ProductSelect> <ProductSelect v-model="entity.productId"></ProductSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('version')" prop="version"> <FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input> <Input v-model="entity.version"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('author')" prop="author"> <FormItem :label="l('author')" prop="author">
<Input v-model="entity.author"></Input> <UserSelect v-model="entity.author"></UserSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('departmentId')" prop="departmentId"> <FormItem :label="l('departmentId')" prop="departmentId">
<departmentSelect v-model="entity.departmentId"></departmentSelect> <departmentSelect v-model="entity.departmentId"></departmentSelect>
</FormItem> </FormItem>
</Col> <Col :span="12"> </Col> <Col :span="5">
<FormItem :label="l('isMain')" prop="isMain"> <FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary> <Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="6">
<FormItem :label="l('isSendPpm')" prop="isSendPpm"> <FormItem :label="l('isSendPpm')" prop="isSendPpm">
<Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary> <Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="5">
<FormItem :label="l('isEffect')" prop="isEffect"> <FormItem :label="l('isEffect')" prop="isEffect">
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary> <Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
</FormItem> </FormItem>
...@@ -120,12 +120,24 @@ ...@@ -120,12 +120,24 @@
<InputNumber v-model="entity.versionid"></InputNumber> <InputNumber v-model="entity.versionid"></InputNumber>
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="5"></Input> <i-quill
v-model="entity.remark"
:height="300"
border
v-paste="handleImg"
/>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24">
<FormItem label="多媒体附件" prop="files">
<files />
</FormItem>
</Col>
</Row> </Row>
<FormItem> <FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button> <Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
...@@ -135,8 +147,13 @@ ...@@ -135,8 +147,13 @@
</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
// VueUeditorWrap
},
data() { data() {
return { return {
disabled: false, disabled: false,
...@@ -206,6 +223,27 @@ export default { ...@@ -206,6 +223,27 @@ export default {
}, },
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
},
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.entity.remark += img
}, 1000)
// new R
}
}, },
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
......
...@@ -44,14 +44,13 @@ ...@@ -44,14 +44,13 @@
<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?id='+headerId">工序</MenuItem> <MenuItem name="0" :to="'/technology/details?id='+headerId">工序</MenuItem>
<MenuItem name="1" :to="'/technology/details/routingStep?id='+headerId">工步</MenuItem> <!-- <MenuItem name="1" :to="'/technology/details/routingStep?id='+headerId">工步</MenuItem> -->
<MenuItem name="2" :to="'/technology/details/routingqccard?id='+headerId">质控卡</MenuItem> <MenuItem name="2" :to="'/technology/details/routingqccard?id='+headerId">质控卡</MenuItem>
<MenuItem name="3" :to="'/technology/details/routingsupporting?id='+headerId">工艺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}}
<nuxt-child keep-alive :headerid="headerId"></nuxt-child> <nuxt-child keep-alive :headerid="headerId"></nuxt-child>
</div> </div>
</div> </div>
......
This diff is collapsed.
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index:`${technologyUrl}routingdetail/paged`, index: `${technologyUrl}routingdetail/paged`,
paged(params){ paged(params) {
return Api.post(`${technologyUrl}routingdetail/paged`,params); return Api.post(`${technologyUrl}routingdetail/paged`, params);
}, },
get(params){ get(params) {
return Api.get(`${technologyUrl}routingdetail/get`,params); return Api.get(`${technologyUrl}routingdetail/get`, params);
}, },
create(params){ create(params) {
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`,{params:{id:id}}); return Api.delete(`${technologyUrl}routingdetail/delete`, {
params: {
id: id
}
});
}, },
deletes(params) { deletes(params) {
return Api.post(`${technologyUrl}routingdetail/batchdelete`,params); return Api.post(`${technologyUrl}routingdetail/batchdelete`, params);
} },
} pagedDetails(params) { //根据工艺规程ID获取工序列表
\ No newline at end of file return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params);
},
getdetailsteps(params) { //根据工艺规程ID获取工序及对应工步的列表
return Api.get(`${technologyUrl}routingdetail/getdetailsteps`, params);
},
}
<template> <template>
<div class="detail"> <div class="detail">
<Row> <Row>
<Filed :span="12" :name="l('classId')">{{entity.classId}}</Filed> <Filed :span="12" :name="l('taskSeq')">{{entity.taskSeq}}</Filed>
<Filed :span="12" :name="l('routingHeaderId')">{{entity.routingHeaderId}}</Filed> <Filed :span="12" :name="l('name')">{{entity.name}}</Filed>
<Filed :span="12" :name="l('name')">{{entity.name}}</Filed> <Filed :span="12" :name="l('equipType')">{{entity.equipType}}</Filed>
<Filed :span="12" :name="l('taskSeq')">{{entity.taskSeq}}</Filed> <Filed :span="12" :name="l('resourceType')">
<Filed :span="24" :name="l('description')">{{entity.description}}</Filed> <state code="Process.routing_detail.resource_type" :value="entity.resourceType" type="text"></state>
<Filed :span="12" :name="l('taskContent')">{{entity.taskContent}}</Filed> </Filed>
<Filed :span="12" :name="l('resourceId')">{{entity.resourceId}}</Filed> <Filed :span="12" :name="l('isImportant')">
<Filed :span="12" :name="l('resourceType')">{{entity.resourceType}}</Filed> <state code="Process.state" :value="entity.isImportant" type="text"></state>
<Filed :span="12" :name="l('runtime')">{{entity.runtime}}</Filed> </Filed>
<Filed :span="12" :name="l('setupTime')">{{entity.setupTime}}</Filed> <Filed :span="12" :name="l('isImportantResources')">
<Filed :span="12" :name="l('transportTime')">{{entity.transportTime}}</Filed> <state code="Process.state" :value="entity.isImportantResources" type="text"></state>
<Filed :span="12" :name="l('checkTime')">{{entity.checkTime}}</Filed> </Filed>
<Filed :span="12" :name="l('checkFlag')">{{entity.checkFlag}}</Filed> <Filed :span="12" :name="l('schedulingWorkingHours')">{{entity.schedulingWorkingHours}}</Filed>
<Filed :span="12" :name="l('efficiencyValue')">{{entity.efficiencyValue}}</Filed> <Filed :span="12" :name="l('runtime')">{{entity.runtime}}</Filed>
<Filed :span="12" :name="l('singleOut')">{{entity.singleOut}}</Filed> <Filed :span="12" :name="l('realRuntime')">{{entity.realRuntime}}</Filed>
<Filed :span="12" :name="l('isOutside')">{{entity.isOutside}}</Filed> <Filed :span="12" :name="l('realWorkingHours')">{{entity.realWorkingHours}}</Filed>
<Filed :span="12" :name="l('departmentId')">{{entity.departmentId}}</Filed> <Filed :span="12" :name="l('isOutside')">
<Filed :span="12" :name="l('isImportant')">{{entity.isImportant}}</Filed> <state code="Process.state" :value="entity.isOutside" type="text"></state>
<Filed :span="12" :name="l('milestoneId')">{{entity.milestoneId}}</Filed> </Filed>
<Filed :span="12" :name="l('phaseId')">{{entity.phaseId}}</Filed> <Filed :span="12" :name="l('outsideTime')">{{entity.outsideTime}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed> <Filed :span="12" :name="l('isParticipateIntime')">
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed> <state code="Process.state" :value="entity.isParticipateIntime" type="text"></state>
<Filed :span="12" :name="l('extend')">{{entity.extend}}</Filed> </Filed>
<Filed :span="12" :name="l('outsideTime')">{{entity.outsideTime}}</Filed> <Filed :span="12" :name="l('efficiencyValue')">{{entity.efficiencyValue}}</Filed>
<Filed :span="12" :name="l('performanceHours')">{{entity.performanceHours}}</Filed> <Filed :span="12" :name="l('singleOut')">{{entity.singleOut}}</Filed>
<Filed :span="12" :name="l('resourceCode')">{{entity.resourceCode}}</Filed> <Filed :span="24" :name="l('taskContent')" >
<Filed :span="12" :name="l('isImportantResources')">{{entity.isImportantResources}}</Filed> <div v-html="entity.taskContent" class="html"></div>
<Filed :span="12" :name="l('schedulingWorkingHours')">{{entity.schedulingWorkingHours}}</Filed> </Filed>
<Filed :span="12" :name="l('realWorkingHours')">{{entity.realWorkingHours}}</Filed>
<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> </Row>
</div> </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: { props: {
eid: Number eid: Number
...@@ -66,15 +57,15 @@ ...@@ -66,15 +57,15 @@
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.entity = r.result; this.entity = r.result;
this.$emit('on-load') this.$emit("on-load");
}) });
}, },
handleClose() { handleClose() {
this.$emit('on-close') this.$emit("on-close");
}, },
l(key) { l(key) {
key = "routing_detail" + "." + key; key = "routing_detail" + "." + key;
return this.$t(key) return this.$t(key);
} }
}, },
watch: { watch: {
...@@ -84,5 +75,5 @@ ...@@ -84,5 +75,5 @@
} }
} }
} }
} };
</script> </script>
This diff is collapsed.
<template>
<div class="excute">
<DataGrid
:columns="columnsExpand"
ref="gridExpand"
:data="listExpand"
:tool="false"
:height="gridHeight"
:page="false"
></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>
</template>
<script>
import Api from "./api";
import ApiStep from "./routingStep/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: 100,
render: (h, params) => {
return h("div", { style: "padding-left:10px" }, params.row.stepSeq);
}
},
{
key: "name",
title: this.l("name"),
align: "left"
},
{
key: "status",
title: this.l("status"),
align: "center",
code: "Process.Status",
width: 150
},
{
key: "stepContent",
title: this.l("stepContent"),
align: "left",
width: 800,
tooltip: true,
hide: true
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
type: "user",
width: 200
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "center",
width: 200
},
{
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, params.index) }
},
"编辑"
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
},
"删除"
)
]);
}
}
],
listExpand: [],
gridHeight: 50,
modal: false,
title: "新增",
detail: null,
curId: 0,
index: 0
};
},
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;
}
},
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) {
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
This diff is collapsed.
<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">
<FormItem :label="l('stepSeq')" prop="stepSeq"> <FormItem :label="l('stepSeq')" prop="stepSeq">
<!-- <InputNumber v-model="entity.stepSeq"></InputNumber> --> <!-- <InputNumber v-model="entity.stepSeq"></InputNumber> -->
<Input style="width:300px" v-model="entity.stepSeq"></Input> <InputNumber v-model="entity.stepSeq"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('name')" prop="name"> <FormItem :label="l('name')" prop="name">
<Input style="width:350px" v-model="entity.name"></Input> <Input v-model="entity.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
v-model="entity.stepContent" v-model="entity.stepContent"
:height="260" :height="260"
v-paste="handleImg" v-paste="handleImg"
border
/> />
<!-- <Input v-model="entity.stepContent" type="textarea" :rows="5"></Input> --> <!-- <Input v-model="entity.stepContent" type="textarea" :rows="5"></Input> -->
<!-- <Input v-model="entity.stepContent" type="textarea" :minRows="3", :maxRows="7" ></Input> --> <!-- <Input v-model="entity.stepContent" type="textarea" :minRows="3", :maxRows="7" ></Input> -->
...@@ -115,23 +116,12 @@ export default { ...@@ -115,23 +116,12 @@ export default {
return { return {
disabled: false, disabled: false,
entity: { entity: {
creationTime: null, routingHeaderId: 0,
creatorUserId: null, routingDetailId: 0,
lastModificationTime: null, stepSeq: 0,
lastModifierUserId: null,
isDeleted: null,
deleterUserId: null,
deletionTime: null,
routingHeaderId: null,
routingDetailId: null,
classId: null,
stepSeq: null,
name: "", name: "",
description: "", status: 1,
status: null,
remark: "",
stepContent: "", stepContent: "",
extend: ""
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
...@@ -140,18 +130,21 @@ export default { ...@@ -140,18 +130,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('creationTime')">{{entity.creationTime}}</Filed> <Filed :span="12" :name="l('stepSeq')">{{entity.stepSeq}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed> <Filed :span="12" :name="l('name')">{{entity.name}}</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed> <Filed :span="12" :name="l('status')">
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed> <state
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed> code="Process.state"
<Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed> :value="entity.status+''"
<Filed :span="12" :name="l('deletionTime')">{{entity.deletionTime}}</Filed> type="text"
<Filed :span="12" :name="l('routingHeaderId')">{{entity.routingHeaderId}}</Filed> ></state>
<Filed :span="12" :name="l('routingDetailId')">{{entity.routingDetailId}}</Filed> </Filed>
<Filed :span="12" :name="l('classId')">{{entity.classId}}</Filed> <Filed :span="24" :name="l('stepContent')"><div v-html="entity.stepContent" class="html"></div></Filed>
<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')"><User :value="entity.creatorUserId"></User></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> </Row>
</div> </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: { props: {
eid: Number eid: Number
...@@ -48,15 +41,15 @@ ...@@ -48,15 +41,15 @@
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.entity = r.result; this.entity = r.result;
this.$emit('on-load') this.$emit("on-load");
}) });
}, },
handleClose() { handleClose() {
this.$emit('on-close') this.$emit("on-close");
}, },
l(key) { l(key) {
key = "routing_step" + "." + key; key = "routing_step" + "." + key;
return this.$t(key) return this.$t(key);
} }
}, },
watch: { watch: {
...@@ -66,5 +59,5 @@ ...@@ -66,5 +59,5 @@
} }
} }
} }
} };
</script> </script>
\ No newline at end of file
...@@ -4,12 +4,12 @@ ...@@ -4,12 +4,12 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('stepSeq')" prop="stepSeq"> <FormItem :label="l('stepSeq')" prop="stepSeq">
<!-- <InputNumber v-model="entity.stepSeq"></InputNumber> --> <!-- <InputNumber v-model="entity.stepSeq"></InputNumber> -->
<Input style="width:300px" v-model="entity.stepSeq"></Input> <InputNumber v-model="entity.stepSeq"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('name')" prop="name"> <FormItem :label="l('name')" prop="name">
<Input style="width:350px" v-model="entity.name"></Input> <Input v-model="entity.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="24"> <Col :span="24">
...@@ -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("保存失败");
} }
......
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
data() { data() {
...@@ -174,7 +175,7 @@ export default { ...@@ -174,7 +175,7 @@ export default {
entity: { entity: {
routingHeaderId: null, routingHeaderId: null,
routingDetailId: null, routingDetailId: null,
routingStepId: null, routingStepId: 0,
checkContent: "", checkContent: "",
checkType: null, checkType: null,
checkParams: "", checkParams: "",
...@@ -209,15 +210,13 @@ export default { ...@@ -209,15 +210,13 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,
headid:Number,
}, },
mounted() { mounted() {
this.loadDetails(); this.loadDetails();
this.parms.eid = this.$u.guid() this.parms.eid = this.$u.guid()
this.$refs.refFile.intFiles() this.$refs.refFile.intFiles()
if (this.eid > 0) {
this.load(this.eid);
}
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
...@@ -238,6 +237,7 @@ export default { ...@@ -238,6 +237,7 @@ export default {
this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称 this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称
this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'') this.entity.qualityTemplate=JSON.stringify(url).replace('[','').replace(']','').replace(/\"/g,'')
} }
this.entity.routingHeaderId=this.headid
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
...@@ -271,9 +271,9 @@ export default { ...@@ -271,9 +271,9 @@ export default {
loadDetails() { loadDetails() {
//获取工序列表 //获取工序列表
let parms = { let parms = {
headerID: 181 headerID: this.headid
}; };
Api.pagedDetails(parms).then(r => { ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result; let tempDetails = r.result;
let tempD = []; let tempD = [];
tempDetails.forEach(data => { tempDetails.forEach(data => {
...@@ -310,7 +310,7 @@ export default { ...@@ -310,7 +310,7 @@ export default {
}, },
eid(v) { eid(v) {
if (v > 0) { if (v > 0) {
this.load(v); // this.load(v);
} }
} }
} }
......
...@@ -23,7 +23,4 @@ export default { ...@@ -23,7 +23,4 @@ export default {
deletes(params) { deletes(params) {
return Api.post(`${technologyUrl}routingqccard/batchdelete`, params); return Api.post(`${technologyUrl}routingqccard/batchdelete`, params);
}, },
pagedDetails(params) {//获取工序列表
return Api.get(`${technologyUrl}routingdetail/getlistbyheaderid`, params);
},
} }
...@@ -26,13 +26,19 @@ ...@@ -26,13 +26,19 @@
<Filed :span="12" :name="l('samplingBatch')">{{entity.samplingBatch}}</Filed> <Filed :span="12" :name="l('samplingBatch')">{{entity.samplingBatch}}</Filed>
<Filed :span="12" :name="l('checkType')"> <Filed :span="12" :name="l('checkType')">
<state code="QC.checktype" v-modev="entity.checkType+''"></state> <state code="QC.checktype" :value="entity.checkType+''" type="text"></state>
</Filed> </Filed>
<Filed :span="12" :name="l('routingStepId')" v-if="false">{{entity.routingStepId}}</Filed> <Filed :span="12" :name="l('routingStepId')" v-if="false">{{entity.routingStepId}}</Filed>
<Filed :span="12" :name="l('checkParams')">{{entity.checkParams}}</Filed> <Filed :span="12" :name="l('checkParams')">{{entity.checkParams}}</Filed>
<Filed :span="12" :name="l('measurementUnit')">{{entity.measurementUnit}}</Filed> <Filed :span="12" :name="l('measurementUnit')">{{entity.measurementUnit}}</Filed>
<Filed :span="12" :name="l('isphotograph')">{{entity.isphotograph}}</Filed> <Filed :span="12" :name="l('isphotograph')">
<state
code="Process.state"
:value="entity.isphotograph+''"
type="text"
></state>
</Filed>
<Filed :span="12" :name="l('status')"> <Filed :span="12" :name="l('status')">
<state code="Process.state" :value="entity.status+''" type="text"></state> <state code="Process.state" :value="entity.status+''" type="text"></state>
</Filed> </Filed>
......
...@@ -156,6 +156,7 @@ ...@@ -156,6 +156,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Edit", name: "Edit",
data() { data() {
...@@ -175,6 +176,8 @@ export default { ...@@ -175,6 +176,8 @@ export default {
}; };
}, },
props: { props: {
headid: Number,
eName:String,
eid: Number eid: Number
}, },
mounted() { mounted() {
...@@ -218,9 +221,9 @@ export default { ...@@ -218,9 +221,9 @@ export default {
loadDetails() { loadDetails() {
//获取工序列表 //获取工序列表
let parms = { let parms = {
headerID: 181 headerID: this.headid
}; };
Api.pagedDetails(parms).then(r => { ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result; let tempDetails = r.result;
let tempD = []; let tempD = [];
tempDetails.forEach(data => { tempDetails.forEach(data => {
......
<template> <template>
<div> <div>
{{info}} <DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action">
<DataGrid :columns="columns" ref="grid" :action="action">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
...@@ -16,14 +15,14 @@ ...@@ -16,14 +15,14 @@
</Form> </Form>
</template> </template>
<template slot="searchForm"> <template slot="searchForm">
<Search /> <Search :headid="hid"/>
</template> </template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</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" @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,9 +39,7 @@ export default { ...@@ -40,9 +39,7 @@ export default {
author: "henq", author: "henq",
description: "routing_qc_card 4/27/2020 10:31:00 AM" description: "routing_qc_card 4/27/2020 10:31:00 AM"
}, },
props: { props: ["headerid"],
info: { type: String }
},
data() { data() {
return { return {
action: Api.index, action: Api.index,
...@@ -51,12 +48,14 @@ export default { ...@@ -51,12 +48,14 @@ export default {
op: op:
"checkParams,measurementUnit,qualityTemplate,remark,productionRequirement,standard,qualityTemplateName,samplingBatch", "checkParams,measurementUnit,qualityTemplate,remark,productionRequirement,standard,qualityTemplateName,samplingBatch",
value: null value: null
} },
routingHeaderId: { op: "Equal", value: -1 }
}, },
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: 0,
hid:0,
columns: [ columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
...@@ -256,9 +255,18 @@ export default { ...@@ -256,9 +255,18 @@ export default {
downUrl: fileUrlDown, downUrl: fileUrlDown,
fileUrlPath: "" fileUrlPath: ""
}; };
},
created() {
if(this.headerid!=-1){
this.easySearch.routingHeaderId.value = this.headerid;
}else{
this.easySearch.routingHeaderId.value=this.$route.query.id;
}
this.hid=Number(this.easySearch.routingHeaderId.value)
}, },
mounted() { mounted() {
console.log(this); console.log(this);
this.search()
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
......
...@@ -8,7 +8,13 @@ ...@@ -8,7 +8,13 @@
</Col> </Col>
<Col :span="12" v-if="condition.routingDetailId.show"> <Col :span="12" v-if="condition.routingDetailId.show">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailId')" prop="routingDetailId">
<Input v-model="condition.routingDetailId.value"></Input> <Select v-model="condition.routingDetailId.value">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
...@@ -129,8 +135,12 @@ ...@@ -129,8 +135,12 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
props: {
headid:Number,
},
data() { data() {
return { return {
condition: { condition: {
...@@ -139,7 +149,7 @@ export default { ...@@ -139,7 +149,7 @@ export default {
lastModificationTime: { op: "Range", value: null, show: true }, lastModificationTime: { op: "Range", value: null, show: true },
lastModifierUserId: { op: "Equal", value: null, show: true }, lastModifierUserId: { op: "Equal", value: null, show: true },
deletionTime: { op: "Range", value: null, show: false }, deletionTime: { op: "Range", value: null, show: false },
routingHeaderId: { op: "Equal", value: null, show: false }, routingHeaderId: { op: "Equal", value: this.headid, show: false },
routingDetailId: { op: "Equal", value: null, show: true }, routingDetailId: { op: "Equal", value: null, show: true },
routingStepId: { op: "Equal", value: null, show: false }, routingStepId: { op: "Equal", value: null, show: false },
checkType: { op: "Equal", value: null, show: true }, checkType: { op: "Equal", value: null, show: true },
...@@ -159,8 +169,12 @@ export default { ...@@ -159,8 +169,12 @@ export default {
inspectionTime: { op: "Equal", value: null, show: true }, inspectionTime: { op: "Equal", value: null, show: true },
sampling: { op: "Equal", value: null, show: true }, sampling: { op: "Equal", value: null, show: true },
samplingBatch: { op: "Equal", value: null, show: true } samplingBatch: { op: "Equal", value: null, show: true }
} },
routingDetailList: [],
}; };
},
mounted() {
this.loadDetails();
}, },
methods: { methods: {
handleClose() { handleClose() {
...@@ -169,6 +183,30 @@ export default { ...@@ -169,6 +183,30 @@ export default {
l(key) { l(key) {
key = "routing_qc_card" + "." + key; key = "routing_qc_card" + "." + key;
return this.$t(key); return this.$t(key);
},
loadDetails() {
//获取工序列表
let parms = {
headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
},
watch: {
headid(v) {
if (v > 0) {
// this.load(v);
}
} }
} }
}; };
......
...@@ -17,15 +17,22 @@ ...@@ -17,15 +17,22 @@
<Input v-model="entity.extend"></Input> <Input v-model="entity.extend"></Input>
</FormItem> </FormItem>
</Col> </Col>
-->
<Col :span="8"> <Col :span="8">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber> <InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
-->
<Col :span="8"> <Col :span="8">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailId')" prop="routingDetailId">
<InputNumber v-model="entity.routingDetailId"></InputNumber> <Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
...@@ -105,6 +112,7 @@ ...@@ -105,6 +112,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
data() { data() {
...@@ -113,7 +121,7 @@ export default { ...@@ -113,7 +121,7 @@ export default {
entity: { entity: {
routingHeaderId: null, routingHeaderId: null,
routingDetailId: null, routingDetailId: null,
routingStepId: null, routingStepId: 0,
quantity: null, quantity: null,
materialId: null, materialId: null,
materialType: "", materialType: "",
...@@ -132,23 +140,24 @@ export default { ...@@ -132,23 +140,24 @@ export default {
}, },
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
routingDetailList: [],
}; };
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: Number,
headid: Number
}, },
mounted() { mounted() {
if (this.eid > 0) { this.loadDetails();
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;
Api.create(this.entity) Api.create(this.entity)
.then(r => { .then(r => {
this.disabled = false; this.disabled = false;
...@@ -170,10 +179,21 @@ export default { ...@@ -170,10 +179,21 @@ export default {
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
load(v) { loadDetails() {
Api.get({ id: v }).then(r => { //获取工序列表
this.entity = r.result; let parms = {
this.entity.id = 0; headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
}); });
}, },
l(key) { l(key) {
......
...@@ -17,15 +17,22 @@ ...@@ -17,15 +17,22 @@
<Input v-model="entity.extend"></Input> <Input v-model="entity.extend"></Input>
</FormItem> </FormItem>
</Col> </Col>
-->
<Col :span="8"> <Col :span="8">
<FormItem :label="l('routingHeaderId')" prop="routingHeaderId"> <FormItem :label="l('routingHeaderId')" prop="routingHeaderId">
<InputNumber v-model="entity.routingHeaderId"></InputNumber> <InputNumber v-model="entity.routingHeaderId"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
-->
<Col :span="8"> <Col :span="8">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailName')" prop="routingDetailId">
<InputNumber v-model="entity.routingDetailId"></InputNumber> <Select v-model="entity.routingDetailId">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="8"> <Col :span="8">
...@@ -105,6 +112,7 @@ ...@@ -105,6 +112,7 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Edit", name: "Edit",
data() { data() {
...@@ -113,13 +121,16 @@ export default { ...@@ -113,13 +121,16 @@ export default {
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }] name: [{ required: true, message: "必填", trigger: "blur" }]
} },
routingDetailList: []
}; };
}, },
props: { props: {
headid: Number,
eid: Number eid: Number
}, },
mounted() { mounted() {
this.loadDetails();
if (this.eid > 0) { if (this.eid > 0) {
this.load(this.eid); this.load(this.eid);
} }
...@@ -152,6 +163,23 @@ export default { ...@@ -152,6 +163,23 @@ export default {
} }
}); });
}, },
loadDetails() {
//获取工序列表
let parms = {
headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
......
...@@ -8,7 +8,13 @@ ...@@ -8,7 +8,13 @@
</Col> </Col>
<Col :span="12" v-if="condition.routingDetailId.show"> <Col :span="12" v-if="condition.routingDetailId.show">
<FormItem :label="l('routingDetailId')" prop="routingDetailId"> <FormItem :label="l('routingDetailId')" prop="routingDetailId">
<Input v-model="condition.routingDetailId.value"></Input> <Select v-model="condition.routingDetailId.value">
<Option
v-for="(item,index) in routingDetailList"
:value="item.value"
:key="index"
>{{ item.label }}</Option>
</Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12" v-if="condition.routingStepId.show"> <Col :span="12" v-if="condition.routingStepId.show">
...@@ -94,12 +100,16 @@ ...@@ -94,12 +100,16 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import ApiDetail from "../api";
export default { export default {
name: "Add", name: "Add",
props: {
headid:Number,
},
data() { data() {
return { return {
condition: { condition: {
routingHeaderId: { op: "Equal", value: null, show: true }, routingHeaderId: { op: "Equal", value: this.headid, show: false },
routingDetailId: { op: "Equal", value: null, show: true }, routingDetailId: { op: "Equal", value: null, show: true },
routingStepId: { op: "Equal", value: null, show: false }, routingStepId: { op: "Equal", value: null, show: false },
quantity: { op: "Equal", value: null, show: true }, quantity: { op: "Equal", value: null, show: true },
...@@ -116,8 +126,12 @@ export default { ...@@ -116,8 +126,12 @@ export default {
state: { op: "Equal", value: null, show: true }, state: { op: "Equal", value: null, show: true },
remark: { op: "Equal", value: null, show: false }, remark: { op: "Equal", value: null, show: false },
drawNum: { op: "Equal", value: null, show: true } drawNum: { op: "Equal", value: null, show: true }
} },
routingDetailList: [],
}; };
},
mounted() {
this.loadDetails();
}, },
methods: { methods: {
handleClose() { handleClose() {
...@@ -126,7 +140,24 @@ export default { ...@@ -126,7 +140,24 @@ export default {
l(key) { l(key) {
key = "routingsupporting" + "." + key; key = "routingsupporting" + "." + key;
return this.$t(key); return this.$t(key);
} },
loadDetails() {
//获取工序列表
let parms = {
headerID: this.headid
};
ApiDetail.pagedDetails(parms).then(r => {
let tempDetails = r.result;
let tempD = [];
tempDetails.forEach(data => {
let tempObj = {};
tempObj.value = data.id;
tempObj.label = data.name;
tempD.push(tempObj);
});
this.routingDetailList = tempD;
});
},
} }
}; };
</script> </script>
...@@ -11,52 +11,53 @@ ...@@ -11,52 +11,53 @@
<Input v-model="entity.unicode"></Input> <Input v-model="entity.unicode"></Input>
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="12"> <Col :span="8">
<FormItem :label="l('name')" prop="name"> <FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input> <Input v-model="entity.name"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('code')" prop="code"> <FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"></Input> <Input v-model="entity.code"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('routingType')" prop="routingType"> <FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary> <Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('productId')" prop="productId"> <FormItem :label="l('productId')" prop="productId">
<ProductSelect v-model="entity.productId"></ProductSelect> <ProductSelect v-model="entity.productId"></ProductSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('version')" prop="version"> <FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input> <Input v-model="entity.version"></Input>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('author')" prop="author"> <FormItem :label="l('author')" prop="author">
<Input v-model="entity.author"></Input> <UserSelect v-model="entity.author"></UserSelect>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="8">
<FormItem :label="l('departmentId')" prop="departmentId"> <FormItem :label="l('departmentId')" prop="departmentId">
<departmentSelect v-model="entity.departmentId"></departmentSelect> <departmentSelect v-model="entity.departmentId"></departmentSelect>
</FormItem> </FormItem>
</Col> <Col :span="12"> </Col>
<Col :span="5">
<FormItem :label="l('isMain')" prop="isMain"> <FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary> <Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="6">
<FormItem :label="l('isSendPpm')" prop="isSendPpm"> <FormItem :label="l('isSendPpm')" prop="isSendPpm">
<Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary> <Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="5">
<FormItem :label="l('isEffect')" prop="isEffect"> <FormItem :label="l('isEffect')" prop="isEffect">
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary> <Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
</FormItem> </FormItem>
...@@ -120,10 +121,15 @@ ...@@ -120,10 +121,15 @@
<InputNumber v-model="entity.versionid"></InputNumber> <InputNumber v-model="entity.versionid"></InputNumber>
</FormItem> </FormItem>
</Col>--> </Col>-->
<Col :span="24"> <Col :span="24">
<FormItem :label="l('remark')" prop="remark"> <FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="5"></Input> <i-quill v-model="entity.remark" :height="300" border v-paste="handleImg" />
</FormItem>
</Col>
<Col :span="24">
<FormItem label="多媒体附件" prop="files">
<files />
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -135,7 +141,12 @@ ...@@ -135,7 +141,12 @@
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import iQuill from "@/components/quill";
export default { export default {
components: {
iQuill
// VueUeditorWrap
},
name: "Edit", name: "Edit",
data() { data() {
return { return {
...@@ -182,6 +193,27 @@ export default { ...@@ -182,6 +193,27 @@ export default {
} }
}); });
}, },
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.entity.remark += img;
}, 1000);
// new R
}
},
handleClose() { handleClose() {
this.$emit("on-close"); this.$emit("on-close");
}, },
......
...@@ -6,6 +6,11 @@ ...@@ -6,6 +6,11 @@
.con { .con {
padding: 5px 5px 0px 10px; padding: 5px 5px 0px 10px;
} }
.con_bord{
// margin: 15px 32px;
box-shadow: #c7c7c7 1px 2px 7px 3px;
}
background: rgba(245,246,250,1);
} }
.fullWindow { .fullWindow {
position: fixed; position: fixed;
...@@ -36,11 +41,7 @@ ...@@ -36,11 +41,7 @@
<Icon type="ios-arrow-forward" size="24" /> <Icon type="ios-arrow-forward" size="24" />
</a> </a>
</div> </div>
<Content class="con"> <Content class="con" :class="!showMenu?'con_bord':''">
<!-- <a class="detail_href" @click="view">
<Icon type="ios-undo-outline" />详情页面
</a>-->
<Card class="h100">
<DataGrid :columns="columns" ref="grid" :action="action" class="card_box"> <DataGrid :columns="columns" ref="grid" :action="action" class="card_box">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
...@@ -64,7 +65,6 @@ ...@@ -64,7 +65,6 @@
<Button type="primary" @click="add">新增</Button> <Button type="primary" @click="add">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
</Card>
<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>
...@@ -72,10 +72,21 @@ ...@@ -72,10 +72,21 @@
<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">
{{l('code')}}:
<span class="grayTitle mr10">{{titleObj.code}}</span>
{{l('name')}}:
<span class="grayTitle mr10">{{titleObj.name}}</span>
{{l('routingType')}}:
<span class="grayTitle mr10">{{titleObj.routingType}}</span>
{{l('version')}}:
<span class="grayTitle">{{titleObj.version}}</span>
<!-- {{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;
......
<style lang="less">
.test_layout {
height: 50%;
.bg1{
background:#fefefe ;
}
.fg {
background-color: rgba(234,45,198, 1);
overflow: auto;
}
}
.layout-copy {
text-align: center;
padding: 10px 0 20px;
color: #9ea7b4;
}
</style>
<template>
<div class="flex fd test_layout">
<div>
<Menu mode="horizontal" active-name="1">
<div class="layout-assistant">
<MenuItem name="1">Option 1</MenuItem>
<MenuItem name="2">Option 2</MenuItem>
<MenuItem name="3">Option 3</MenuItem>
</div>
</Menu>
</div>
<div class="fg">
<h4 v-for="i in 200">
{{i}}内容部分
</h4>
</div>
<div>
这是一个问题
</div>
</div>
</template>
<script>
export default {
layout: "empty"
};
</script>
\ No newline at end of file
...@@ -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