Commit c7028b80 authored by 康振飞's avatar 康振飞

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

parents bd84957b 45033af3
......@@ -34,24 +34,21 @@ export default {
border-right: none;
margin: 0 -1px -1px -1px;
box-sizing: border-box;
line-height: 70px;
display: flex;
line-height: 40px;
.label {
background: #e8eaf1;
background: #f7f7f7;
display: inline-block;
width: 100px;
width: 110px;
text-align: right;
padding: 0 5px;
line-height: 40px;
float: left;
height: 100%;
padding: 0 10px 0 0;
border-right: 1px solid #ddd;
}
p {
height: 100%;
word-break: break-all;
word-wrap: break-word;
margin: 0 10px 0 110px;
line-height: 20px;
padding-top: 10px;
flex-grow: 1;
padding-left: 10px;
}
}
.ivu-col-span-24 {
......@@ -65,7 +62,7 @@ export default {
}
}
}
.new-detail {
.new_detail {
.ivu-row {
width: 100% !important;
.filed-col {
......@@ -76,7 +73,6 @@ export default {
width: 100px;
text-align: right;
line-height: 40px;
float: left;
height: 100%;
font-weight: bold;
}
......
......@@ -8143,6 +8143,16 @@
"dev": true,
"optional": true
},
"gantt-elastic": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/gantt-elastic/-/gantt-elastic-1.0.11.tgz",
"integrity": "sha512-Im0hemDdfshSl/ZaAYBSl3WEk+W9U7vQbEasWbUk9uk40q4onXxWim9/N3m/izNwo4A2boikkmSo9oTjz5ff0w==",
"requires": {
"dayjs": "^1.8.16",
"resize-observer-polyfill": "^1.5.1",
"vue": "^2.6.10"
}
},
"gensync": {
"version": "1.0.0-beta.1",
"resolved": "http://r.cnpmjs.org/gensync/download/gensync-1.0.0-beta.1.tgz",
......@@ -9538,7 +9548,8 @@
"dependencies": {
"deepmerge": {
"version": "2.2.1",
"bundled": true
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-2.2.1.tgz",
"integrity": "sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA=="
}
}
},
......@@ -19769,6 +19780,11 @@
"resolved": "http://r.cnpmjs.org/resize-detector/download/resize-detector-0.1.10.tgz",
"integrity": "sha1-HaP5YapfkUzLz9N1LVL9Rb7raSw="
},
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
"integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg=="
},
"resolve": {
"version": "1.17.0",
"resolved": "http://r.cnpmjs.org/resolve/download/resolve-1.17.0.tgz",
......@@ -19890,7 +19906,8 @@
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz",
"integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=",
"dev": true
"dev": true,
"optional": true
},
"rx-lite-aggregates": {
"version": "4.0.8",
......@@ -22147,6 +22164,11 @@
"resolved": "http://r.cnpmjs.org/vue/download/vue-2.6.11.tgz",
"integrity": "sha1-dllNh31LEiNEBuhONSdcbVFBJcU="
},
"vue-class-component": {
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/vue-class-component/-/vue-class-component-7.2.3.tgz",
"integrity": "sha512-oEqYpXKaFN+TaXU+mRLEx8dX0ah85aAJEe61mpdoUrq0Bhe/6sWhyZX1JjMQLhVsHAkncyhedhmCdDVSasUtDw=="
},
"vue-client-only": {
"version": "2.0.0",
"resolved": "http://r.cnpmjs.org/vue-client-only/download/vue-client-only-2.0.0.tgz",
......@@ -22278,6 +22300,14 @@
"resolved": "http://r.cnpmjs.org/vue-no-ssr/download/vue-no-ssr-1.1.1.tgz",
"integrity": "sha1-h1875vsK5BVoqDfzrBqA6qE3uZg="
},
"vue-property-decorator": {
"version": "8.4.2",
"resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-8.4.2.tgz",
"integrity": "sha512-IqbARlvgPE2pzKfbecKxsu2yEH0Wv7hfHR6m4eZA3LTnNw9hveAX77vDfLFyTeMISS5N7Kucp/xRSHjcQ6bAfQ==",
"requires": {
"vue-class-component": "^7.1.0"
}
},
"vue-quill-editor": {
"version": "3.0.6",
"resolved": "http://r.cnpmjs.org/vue-quill-editor/download/vue-quill-editor-3.0.6.tgz",
......@@ -22359,6 +22389,14 @@
}
}
},
"vue-slider-component": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/vue-slider-component/-/vue-slider-component-3.1.3.tgz",
"integrity": "sha512-SPFb1I3G2a4thIwghvVNhcvPGCUz6PIZR1ClwtvN4MT44ZUzvqCMDS7osdKz0hdKu4kfanxET8qZn826A/XPxA==",
"requires": {
"vue-property-decorator": "^8.0.0"
}
},
"vue-style-loader": {
"version": "4.1.2",
"resolved": "http://r.cnpmjs.org/vue-style-loader/download/vue-style-loader-4.1.2.tgz",
......@@ -22375,6 +22413,14 @@
}
}
},
"vue-switches": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/vue-switches/-/vue-switches-2.0.1.tgz",
"integrity": "sha512-rDqBtK3TKy1pEvyZeWmnSHVeXqAcn+ozch7LiNThBzr1QMjg5rhvqBY7uWeli/baDDslf6CXmBJbHPwASJLqoA==",
"requires": {
"vue": "^2.2.6"
}
},
"vue-template-compiler": {
"version": "2.6.11",
"resolved": "http://r.cnpmjs.org/vue-template-compiler/download/vue-template-compiler-2.6.11.tgz",
......
......@@ -21,6 +21,7 @@
"dayjs": "^1.8.22",
"echarts": "^4.7.0",
"echarts-liquidfill": "^2.0.5",
"gantt-elastic": "^1.0.11",
"gojs": "^2.1.10",
"iview-loader": "^1.3.0",
"iview-pro": "file:./iview-pro",
......@@ -45,6 +46,8 @@
"vue-i18n": "^8.15.5",
"vue-json-viewer": "^2.2.8",
"vue-quill-editor": "^3.0.6",
"vue-slider-component": "^3.1.3",
"vue-switches": "^2.0.1",
"vue-ueditor-wrap": "^2.4.1",
"vue2-editor": "^2.10.2",
"vuedraggable": "^2.23.0",
......
<template>
<div class="compare">
<div class="btn" style="z-index:9999;position:absolute;right:0">
<Button type="primary" @click="parameter">下发</Button>
<!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div class="compare">
<div class="compare_box" :style="{height:treeHeight+'px'}">
<div class="left_list">
<ul class="left_ul">
<li class="left_ul_title">
隐藏相同
<i-switch size="small" v-model="switch1" @on-change="change" />
<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':''" :key="a">
<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>
......@@ -27,101 +47,54 @@
<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>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
data() {
return {
code: '2',
name: '添加',
code: "2",
name: "添加",
tree: [],
switch1: true,
treeHeight: "",
}
treeHeight: ""
};
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
components: {},
created() {
this.treeHeight = window.innerHeight - 170
this.treeHeight = window.innerHeight - 170;
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.treeHeight = window.screenHeight - 170
window.screenHeight = window.innerHeight;
this.treeHeight = window.screenHeight - 170;
})();
}
};
},
methods: {
// 下发
parameter() {
Api.processschemedispatch({
id: this.id
}).then(r => {
if (r.result) {
this.$Message.success(r.result.retmsg);
this.orderlist();
} else {
this.$Message.success("下发失败");
}
});
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
change(status){
this.$Message.info('开关状态:' + status);
change(status) {
this.$Message.info("开关状态:" + status);
},
// 删除方案
delitedCase(){
this.$Message.info('删除方案');
delitedCase() {
this.$Message.info("删除方案");
},
tabChange(name) {
if(name=='technicalcoordination')
{
this.$refs.technicalcoordination.loadchangelist();
}
if(name=='unqualifiedorder')
{
this.$refs.unqualifiedorder.loadchangelist();
}
},
if (name == "technicalcoordination") {
this.$refs.technicalcoordination.loadchangelist();
}
if (name == "unqualifiedorder") {
this.$refs.unqualifiedorder.loadchangelist();
}
}
}
}
};
</script>
<!--
/**
* @fileoverview Header component
* @license MIT
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @package GanttElasticHeader
*/
-->
<template>
<div class="gantt-elastic__header" :style="{ ...style['header'] }">
<div class="gantt-elastic__header-title" :style="{ ...style['header-title'] }">
<div
class="gantt-elastic__header-title--text"
:style="{ ...style['header-title--text'] }"
v-if="!opts.title.html"
>{{ opts.title.label }}</div>
<div
class="gantt-elastic__header-title--html"
:style="{ ...style['header-title--html'] }"
v-if="opts.title.html"
v-html="opts.title.label"
></div>
</div>
<div class="gantt-elastic__header-options" :style="{ ...style['header-options'] }">
<!-- <button
class="gantt-elastic__header-btn-recenter"
:style="{ ...style['header-btn-recenter'] }"
@click.prevent="recenterPosition"
>
{{ opts.locale.Now }}
</button>-->
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["X-Scale"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="scale"
:max="24"
:min="2"
width="100px"
></vue-slider>
</div>
</label>
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["Y-Scale"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="height"
:max="100"
:min="7"
width="100px"
></vue-slider>
</div>
</label>
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["Before/After"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="scope"
:max="31"
:min="0"
width="100px"
></vue-slider>
</div>
</label>
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["Task list width"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="divider"
:max="100"
:min="0"
width="100px"
></vue-slider>
</div>
</label>
<label
class="gantt-elastic__header-task-list-switch--wrapper"
:style="{ ...style['header-task-list-switch--label'] }"
>
<switches
class="gantt-elastic__header-task-list-switch"
:style="{ ...style['header-task-list-switch'] }"
v-model="root.state.options.taskList.display"
></switches>
{{ opts.locale["Display task list"] }}
</label>
</div>
</div>
</template>
<script>
import vueSlider from "vue-slider-component";
import "vue-slider-component/theme/default.css";
import Switches from "vue-switches";
const defaultStyle = {
header: {
margin: "0px auto",
background: "#f3f5f747",
padding: "10px",
overflow: "hidden",
clear: "both",
display: "flex",
"justify-content": "space-between"
},
"header-title": { float: "left" },
"header-options": { float: "right" },
"header-title--text": {
"font-size": "20px",
"vertical-align": "middle",
"font-weight": "400",
"line-height": "35px",
"padding-left": "22px",
"letter-spacing": "1px"
},
"header-title--html": {
"font-size": "20px",
"vertical-align": "middle",
"font-weight": "400",
"line-height": "35px",
"padding-left": "22px",
"letter-spacing": "1px"
},
"header-btn-recenter": {
background: "#95A5A6",
border: "none",
outline: "none",
cursor: "pointer",
color: "white",
"border-radius": "3px",
"margin-right": "27px",
"font-size": "16px",
padding: "8px 12px"
},
"header-slider": {
"box-sizing": "content-box"
},
"header-slider-wrapper": {
display: "inline-block",
"vertical-align": "middle"
},
"header-slider--slider": { "box-sizing": "content-box" },
"header-slider--process": { "box-sizing": "content-box" },
"header-task-list-switch--label": { "box-sizing": "content-box" },
"header-task-list-switch": {
margin: "0px 15px",
"vertical-align": "middle"
},
"header-label": {}
};
const defaultOptions = {
title: {
// label: "任务甘特图",
html: false
},
locale: {
Now: "Now",
"X-Scale": "缩放-X",
"Y-Scale": "缩放-Y",
"Task list width": "任务列表",
"Before/After": "展开日期",
"Display task list": "是否展开任务列表"
}
};
export default {
name: "GanttHeader",
components: {
vueSlider,
Switches
},
props: ["options", "dynamicStyle"],
inject: ["root"],
data() {
return {
scaleTimeoutId: null,
firstScale: false,
localScale: 0,
localHeight: 0,
localBefore: 0,
localPercent: 0,
sliderOptions: {
xScale: {
value: 0
}
},
style: {},
opts: {}
};
},
created() {
this.localScale = this.root.state.options.times.timeZoom;
this.localHeight = this.root.state.options.row.height;
this.localBefore = this.root.state.options.scope.before;
this.localPercent = this.root.state.options.taskList.percent;
this.sliderOptions.xScale.value = this.root.state.options.times.timeZoom;
this.style = this.root.mergeDeep({}, defaultStyle, this.dynamicStyle);
this.opts = this.root.mergeDeep({}, defaultOptions, this.options);
},
methods: {
getImage() {
this.root.getImage("image/png").then(imgB64 => {
const link = document.createElement("a");
link.href = imgB64;
link.download = "gantt-elastic.png";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
});
},
recenterPosition() {
this.root.$emit("recenterPosition");
},
setScale(value) {
if (this.scaleTimeoutId !== null) {
clearTimeout(this.scaleTimeoutId);
this.scaleTimeoutId = null;
}
// debouncing
if (this.firstScale) {
this.scaleTimeoutId = setTimeout(() => {
this.root.$emit("times-timeZoom-change", value);
this.scaleTimeoutId = null;
}, 50);
} else {
this.root.$emit("times-timeZoom-change", value);
this.firstScale = true;
}
}
},
computed: {
/**
* If there is a component slot specified for header
* @returns {bool}
*/
beforeOptionsIsComponent() {
const headerSlot = this.options.slots.header;
if (
typeof headerSlot.beforeOptions === "object" &&
!Array.isArray(headerSlot.beforeOptions)
) {
return true;
}
return false;
},
/**
* If there is a slot with beforeOptions html content
* @returns {bool}
*/
beforeOptionsIsHtml() {
if (typeof this.options.slots.header.beforeOptions === "string") {
return true;
}
return false;
},
scale: {
get() {
return this.localScale;
},
set(value) {
this.localScale = Number(value);
this.setScale(this.localScale);
}
},
height: {
get() {
return this.localHeight;
},
set(value) {
this.localHeight = Number(value);
this.root.$emit("row-height-change", Number(value));
}
},
scope: {
get() {
return this.localBefore;
},
set(value) {
this.localBefore = Number(value);
this.root.$emit("scope-change", Number(value));
}
},
divider: {
get() {
return this.localPercent;
},
set(value) {
this.localPercent = Number(value);
this.root.$emit("taskList-width-change", Number(value));
}
}
}
};
</script>
<template>
<div class="q-pa-sm">
<gantt-elastic
:options="options"
:tasks="tasks"
@tasks-changed="tasksUpdate"
@options-changed="optionsUpdate"
@dynamic-style-changed="styleUpdate"
>
<gantt-header slot="header"></gantt-header>
</gantt-elastic>
<div class="q-mt-md" />
<!-- <q-btn @click="addTask" icon="mdi-plus" label="Add task" /> -->
</div>
</template>
<style>
</style>
<script>
import GanttElastic from "gantt-elastic";
import GanttHeader from "./components/gantt-header";
import dayjs from "dayjs";
// just helper to get current dates
function getDate(hours) {
const currentDate = new Date();
const currentYear = currentDate.getFullYear();
const currentMonth = currentDate.getMonth();
const currentDay = currentDate.getDate();
const timeStamp = new Date(
currentYear,
currentMonth,
currentDay,
0,
0,
0
).getTime();
return new Date(timeStamp + hours * 60 * 60 * 1000).getTime();
}
let tasks = [
{
id: 1,
label: "任务1",
user:
'<a href="https://www.google.com/search?q=John+Doe" target="_blank" style="color:#0077c0;">John Doe</a>',
start: getDate(-24 * 5),
duration: 15 * 24 * 60 * 60 * 1000,
percent: 85,
type: "project"
//collapsed: true,
},
{
id: 2,
label: "任务2",
user:
'<a href="https://www.google.com/search?q=Peter+Parker" target="_blank" style="color:#0077c0;">Peter Parker</a>',
parentId: 1,
start: getDate(-24 * 4),
duration: 4 * 24 * 60 * 60 * 1000,
percent: 50,
type: "milestone",
collapsed: true,
style: {
base: {
fill: "#1EBC61",
stroke: "#0EAC51"
}
}
},
{
id: 3,
label: "任务3",
user:
'<a href="https://www.google.com/search?q=John+Wayne" target="_blank" style="color:#0077c0;">John Wayne</a>',
parentId: 2,
start: getDate(-24 * 3),
duration: 2 * 24 * 60 * 60 * 1000,
percent: 100,
type: "task"
},
{
id: 4,
label: "任务4",
user:
'<a href="https://www.google.com/search?q=Clark+Kent" target="_blank" style="color:#0077c0;">Clark Kent</a>',
start: getDate(-24 * 2),
duration: 2 * 24 * 60 * 60 * 1000,
percent: 50,
type: "task",
dependentOn: [3]
},
{
id: 5,
label: "任务5",
user:
'<a href="https://www.google.com/search?q=Austin+Powers" target="_blank" style="color:#0077c0;">Austin Powers</a>',
parentId: 4,
start: getDate(0),
duration: 2 * 24 * 60 * 60 * 1000,
percent: 10,
type: "milestone",
style: {
base: {
fill: "#0287D0",
stroke: "#0077C0"
}
}
},
{
id: 6,
label: "任务6",
user:
'<a href="https://www.google.com/search?q=Mario+Bros" target="_blank" style="color:#0077c0;">Mario Bros</a>',
parentId: 5,
start: getDate(24),
duration: 1 * 24 * 60 * 60 * 1000,
percent: 50,
type: "task",
collapsed: true,
style: {
base: {
fill: "#8E44AD",
stroke: "#7E349D"
}
}
},
{
id: 7,
label: "任务7",
user:
'<a href="https://www.google.com/search?q=Knight+Rider" target="_blank" style="color:#0077c0;">Knight Rider</a>',
parentId: 2,
dependentOn: [6],
start: getDate(24 * 2),
duration: 4 * 60 * 60 * 1000,
percent: 20,
type: "task",
collapsed: true
},
{
id: 8,
label: "任务8",
user:
'<a href="https://www.google.com/search?q=Johhny+Bravo" target="_blank" style="color:#0077c0;">Johhny Bravo</a>',
parentId: 7,
dependentOn: [7],
start: getDate(24 * 3),
duration: 1 * 24 * 60 * 60 * 1000,
percent: 0,
type: "task"
},
{
id: 9,
label: "任务9",
user:
'<a href="https://www.google.com/search?q=Dexter\'s+Laboratory" target="_blank" style="color:#0077c0;">Dexter\'s Laboratory</a>',
parentId: 8,
dependentOn: [8, 7],
start: getDate(24 * 4),
duration: 4 * 60 * 60 * 1000,
percent: 20,
type: "task",
style: {
base: {
fill: "#8E44AD",
stroke: "#7E349D"
}
}
},
{
id: 10,
label: "任务10",
user:
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 5),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task"
},
{
id: 11,
label: "任务11",
user:
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 6),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task"
},
{
id: 12,
label: "任务12",
user:
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 7),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task",
parentId: 11
},
{
id: 13,
label: "任务13",
user:
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 8),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task"
},
{
id: 14,
label: "任务14",
user:
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 9),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task"
},
{
id: 15,
label: "任务15",
user:
'<a href="https://www.google.com/search?q=Johnattan+Owens" target="_blank" style="color:#0077c0;">Johnattan Owens</a>',
start: getDate(24 * 16),
duration: 24 * 60 * 60 * 1000,
percent: 0,
type: "task"
}
];
let options = {
taskMapping: {
progress: "percent"
},
maxRows: 100,
maxHeight: 500,
title: {
label: "Your project title as html (link or whatever...)",
html: false
},
row: {
height: 24
},
calendar: {
hour: {
display: false
}
},
chart: {
progress: {
bar: false
},
expander: {
display: true
}
},
taskList: {
expander: {
straight: false
},
columns: [
{
id: 1,
label: "ID",
value: "id",
width: 40
},
{
id: 2,
label: "任务",
value: "label",
width: 200,
expander: true,
html: true,
events: {
click({ data, column }) {
alert("description clicked!\n" + data.label);
}
}
},
{
id: 3,
label: "责任人",
value: "user",
width: 130,
html: true
},
{
id: 4,
label: "开始时间",
value: task => dayjs(task.start).format("YYYY-MM-DD"),
width: 78
},
{
id: 5,
label: "类型",
value: "type",
width: 68
},
{
id: 6,
label: "%",
value: "progress",
width: 35,
style: {
"task-list-header-label": {
"text-align": "center",
width: "100%"
},
"task-list-item-value-container": {
"text-align": "center",
width: "100%"
}
}
}
]
},
locale: {
weekdays: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
months: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月"
]
// name: "en",
// Now: "Now",
// "X-Scale": "Zoom-X",
// "Y-Scale": "Zoom-Y",
// "Task list width": "Task list",
// "Before/After": "Expand",
// "Display task list": "Task list"
}
};
export default {
name: "Gantt",
components: {
GanttElastic,
GanttHeader
},
data() {
return {
tasks,
options,
dynamicStyle: {},
lastId: 16
};
},
methods: {
addTask() {
this.tasks.push({
id: this.lastId++,
label:
'<a href="https://images.pexels.com/photos/423364/pexels-photo-423364.jpeg?auto=compress&cs=tinysrgb&h=650&w=940" target="_blank" style="color:#0077c0;">Yeaahh! you have added a task bro!</a>',
user:
'<a href="https://images.pexels.com/photos/423364/pexels-photo-423364.jpeg?auto=compress&cs=tinysrgb&h=650&w=940" target="_blank" style="color:#0077c0;">Awesome!</a>',
start: getDate(24 * 3),
duration: 1 * 24 * 60 * 60 * 1000,
percent: 50,
type: "project"
});
},
tasksUpdate(tasks) {
this.tasks = tasks;
},
optionsUpdate(options) {
this.options = options;
},
styleUpdate(style) {
this.dynamicStyle = style;
}
}
};
</script>
......@@ -16,10 +16,10 @@
class="left-body"
v-for="(li,index) in list"
:key="index"
@click="listData(li.schedule_Id,index)"
:class="isactive == index ? 'addclass' : '' "
>
<div class="title-t">排产方案:{{li.schedule_Id}}</div>
<Checkbox v-model="li.checked" class="i-checkbox" @on-change="changeCheck(li)"></Checkbox>
<div class="title-t" @click="listData(li.schedule_Id,index)">排产方案:{{li.schedule_Id}}</div>
<div class="fa">排产时间:{{li.plan_Date}}</div>
<div class="fa">
<span>{{li.iNSERTFLAG}} /</span>
......@@ -28,120 +28,54 @@
</div>
</div>
</Sider>
<Content class="tab_card_box">
<Tabs class="tab_card" v-model="name" type="card" :animated="false" @on-click="clickTab">
<TabPane label="结果列表" name="name1">
<resultsList ref="resultsLists" />
</TabPane>
<!-- <TabPane label="结果甘特图" name="name2">结果甘特图</TabPane> -->
<TabPane label="方案对比" name="name3">
<compareList ref="compareList" />
</TabPane>
</Tabs>
<!-- <h4>排产结果</h4>
<div class="btn">
<Button type="primary" @click="parameter">下发</Button>-->
<!-- <Button type="primary">导出</Button>000 -->
<!-- <Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div>
<Table :columns="columns" :data="data"></Table>
</div>-->
<Content>
<Row class="i-row">
<Col span="2" v-if="blacks">
<h4 :text="title">{{title}}</h4>
</Col>
<Col span="10">
<a href="#" @click="comeBlck" class="black">返回</a>
</Col>
<Col span="10" style="text-align: right;" v-if="gant">
<a href="#" @click="gantChart" class="gant">甘特图</a>
</Col>
</Row>
<component :is="detail" :eid="id" />
</Content>
</Layout>
<div class="footer" v-if="showFooter">
<span>已选:{{total}}</span>&nbsp;&nbsp;&nbsp;
<Button type="primary" @click="submit">方案对比</Button>&nbsp;
<Button type="default" @click="cancel">取消</Button>
</div>
<Modal v-model="modal1Gant" fullscreen title="甘特图" footer-hide>
<Gantt />
</Modal>
</div>
</template>
<script>
import Api from "./api";
// import expandRow from "./table-expand.vue";expandRow,
import resultsList from "./result.vue";
import compareList from "./compare.vue";
import Gantt from "./gantt";
export default {
components: { resultsList, compareList },
components: {
Gantt
},
data() {
return {
curId: null,
detail: null,
isactive: 0,
data: [],
list: [],
name:'name1',
id: ""
// columns: [
// {
// type: "expand",
// width: 50,
// render: (h, params) => {
// return h(expandRow, {
// props: {
// row: params.row
// }
// });
// }
// },
// {
// title: "超期预警",
// key: "alert",
// align: "center",
// render: (h, params) => {
// return h("div", [
// h("Icon", {
// props: {
// type:
// params.row.alert == true
// ? "ios-information-circle-outline"
// : "ios-remove-circle-outline"
// },
// style: {
// marginRight: "5px",
// fontSize: "18px",
// fontWeight: "bold",
// color: params.row.alert == true ? "#FE7777" : "#0DD78D"
// }
// })
// ]);
// }
// },
// {
// title: "零件图号",
// key: "part_id",
// align: "center"
// },
// {
// title: "零件名称",
// key: "part_name",
// align: "center"
// },
// {
// title: "计划开始时间",
// key: "plan_start",
// width: 200,
// align: "center"
// },
// {
// title: "计划结束时间",
// key: "plan_start",
// width: 200,
// align: "center"
// },
// {
// title: "投料时间",
// key: "demand_start",
// width: 200,
// align: "center"
// },
// {
// title: "节点时间",
// key: "demand_finish",
// width: 200,
// align: "center"
// },
// {
// title: "计划数量",
// key: "plan_qty",
// align: "center"
// }
// ]
name: "name1",
id: null,
contrastList: [],
title: "",
modal1Gant: false,
showFooter: false,
total: 0,
blacks: false,
gant: false
};
},
async fetch({ store, params }) {
......@@ -151,36 +85,34 @@ export default {
this.orderlist();
},
methods: {
clickTab(name) {
},
clickTab(name) {},
orderlist() {
Api.getall()
.then(r => {
if (r.success) {
if (r.result) {
this.list = r.result;
if (r.result) {
this.listData(r.result[0].schedule_Id, 0);
} else {
this.listData(0, null);
}
this.list.map(u => {
u.checked = false;
});
}
})
.catch(error => {
this.$$Message.error("请求失败");
this.$Message.error("请求失败");
});
},
listData(id, index) {
this.blacks = true;
this.gant = true;
this.detail = () => import("./result");
this.isactive = index;
this.id = id;
Api.paged({ scheduleId: id })
.then(r => {
if (r.success) {
this.data = r.result;
}
})
.catch(error => {
this.$$Message.error("请求失败");
});
this.title = "排产方案结果";
this.list.map(u => {
if ((u.checked = true)) {
u.checked = false;
}
});
this.contrastList = [];
},
clear() {
if (this.list.length > 0) {
......@@ -201,7 +133,10 @@ export default {
});
}
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
parameter() {
Api.processschemedispatch({
id: this.id
......@@ -214,8 +149,53 @@ export default {
}
});
},
comeBlck() {
this.$router.push({ path: "/aps/aps" });
//甘特图
gantChart() {
this.modal1Gant = true;
},
changeCheck(item) {
this.isactive = null;
this.blacks = true;
if (item.checked == true) {
this.contrastList.push(item.schedule_Id);
} else if (item.checked == false) {
let index = this.contrastList.indexOf(item.schedule_Id);
if (index > -1) {
this.contrastList.splice(index, 1);
}
}
if (this.contrastList.length > 1) {
this.showFooter = true;
}
this.total = this.contrastList.length;
if (this.total == 0) {
this.showFooter = false;
}
},
submit() {
if (this.total >= 2) {
this.detail = () => import("./compare");
this.title = "排产方案比对";
this.list.map(u => {
if ((u.checked = true)) {
u.checked = false;
}
});
this.contrastList = [];
this.showFooter = false;
this.gant = false;
} else {
this.$Message.error("请选择大于等于2项方案进去比对");
}
},
cancel() {
this.showFooter = false;
this.list.map(u => {
if ((u.checked = true)) {
u.checked = false;
}
});
this.contrastList = [];
}
}
};
......
<template>
<div class="parameter">
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row :gutter="20">
<Col span="12">
<div class="left-up">
<p class="title-c">参数设置</p>
<FormItem :label="l('plan_method')" prop="plan_method">
<i-switch v-model="entity.plan_method" size="large">
<span slot="open">On</span>
<span slot="close">Off</span>
</i-switch>
</FormItem>
<FormItem :label="l('cal_id')" prop="cal_id">
<Select v-model="entity.cal_id" style="width:150px">
<Option value="beijing">策略1</Option>
<Option value="shanghai">策略2</Option>
<Option value="shenzhen">策略3</Option>
</Select>
</FormItem>
<FormItem :label="l('over_time')" prop="over_time">
<i-switch v-model="entity.over_time" size="large">
<span slot="open">On</span>
<span slot="close">Off</span>
</i-switch>
</FormItem>
<FormItem :label="l('efficiency_value')" prop="efficiency_value">
<Input v-model="entity.efficiency_value" style="width:150px"></Input>
</FormItem>
<FormItem :label="l('run_time')" prop="run_time">
<InputNumber v-model="entity.run_time"></InputNumber>
</FormItem>
<FormItem :label="l('isdiscrete')" prop="isdiscrete">
<i-switch v-model="entity.isdiscrete" size="large">
<span slot="open">On</span>
<span slot="close">Off</span>
</i-switch>
</FormItem>
<FormItem :label="l('discrete_value')" prop="discrete_value">
<InputNumber v-model="entity.discrete_value"></InputNumber>
</FormItem>
<FormItem :label="l('discrete_percent')" prop="discrete_percent">
<InputNumber v-model="entity.discrete_percent"></InputNumber>
</FormItem>
</div>
<div class="left-donw">
<p class="title-c">参数级别</p>
<div class="icon">
<Dropdown trigger="custom" :visible="visible" style="width:150px">
<a href="javascript:void(0)" @click="handleOpen">
<Icon type="md-git-compare" />
</a>
<DropdownMenu slot="list" style="text-align: center;">
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>转序规则</span>
</DropdownItem>
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>加班策略</span>
</DropdownItem>
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>任务平衡</span>
</DropdownItem>
<DropdownItem>
<a href="#">
<Icon type="md-apps" />
</a>
<span>是否离散</span>
</DropdownItem>
<div style="margin:10px;">
<Button type="primary" @click="handleOk">确定</Button>
<Button type="primary" @click="handle">关闭</Button>
</div>
</DropdownMenu>
</Dropdown>
</div>
<div class="slider">
<Slider v-model="entity.value1" :step="25" show-stops></Slider>
<div class="slow"></div>
<div class="fast"></div>
</div>
</div>
</Col>
<Col span="12">
<div class="right-up">
<p class="title-d">多台分配设置</p>
<div class="duo">
<Row>
<Col :span="12">
<FormItem :label="l('multi_machine')" prop="multi_machine">
<i-switch v-model="entity.switch4" size="large">
<span slot="open">On</span>
<span slot="close">Off</span>
</i-switch>
</FormItem>
</Col>
<Col :span="12">
<FormItem label="多台数量" prop="abbre">
<InputNumber v-model="entity.abbre"></InputNumber>
</FormItem>
</Col>
</Row>
<FormItem label="班组结构">
<Select v-model="entity.select6" style="width:150px">
<Option value="beijing">结构1</Option>
<Option value="shanghai">结构2</Option>
<Option value="shenzhen">结构3</Option>
<Option value="shenzhen">结构4</Option>
</Select>
</FormItem>
<div class="check-box">
<CheckboxGroup v-model="entity.fruit">
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
<Checkbox label="10985553333(数控车床 车工班)"></Checkbox>
<br />
</CheckboxGroup>
</div>
</div>
</div>
<div class="left-donw right-down">
<p class="title-c">参数应用</p>
<div class="slider">
<Slider v-model="entity.value2" :step="33.3" show-stops></Slider>
<div class="slow">工序</div>
<div class="ding">订单</div>
<div class="ling">零件</div>
<div class="fast">所有</div>
</div>
</div>
</Col>
</Row>
<FormItem class="click-btn">
<Button type="primary" @click="handleSubmit">确定</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</div>
</template>
<script>
export default {
data() {
return {
entity: {
value1: '100',
value2: '100',
fruit: []
},
visible: false,
rules: {
businessName: [{ required: true, message: '必填', trigger: 'blur' }],
businessCode: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
methods: {
handleSubmit() {},
handleClose() {},
handleOpen() {
this.visible = true
},
handle() {
this.visible = false
},
handleOk() {},
l(key) {
let vkey = 'mes_op_task_plan_simulate' + '.' + key
return this.$t(vkey) || key
}
}
}
</script>
<style lang="less" scoped>
.parameter {
margin: 10px;
.left-up {
position: relative;
border: 1px solid #e0e0e0;
padding: 25px 0;
.title-c {
width: 68px;
padding-left: 5px;
background: #fff;
position: absolute;
top: -9px;
left: 25px;
color: #2680eb;
}
}
.left-donw {
margin-top: 15px;
position: relative;
border: 1px solid #e0e0e0;
padding: 25px 0;
.title-c {
width: 68px;
padding-left: 5px;
background: #fff;
position: absolute;
top: -9px;
left: 25px;
color: #2680eb;
}
.slider {
margin: 0 50px 0 50px;
position: relative;
.slow {
position: absolute;
top: 7px;
left: -5px;
}
.fast {
position: absolute;
top: 7px;
right: -10px;
}
.ding {
position: absolute;
top: 7px;
left: 30%;
}
.ling {
position: absolute;
top: 7px;
right: 30%;
}
}
.icon {
text-align: right;
padding-right: 15px;
margin-top: -15px;
}
}
.right-up {
position: relative;
border: 1px solid #e0e0e0;
padding: 25px 0;
.title-d {
width: 95px;
padding-left: 5px;
margin-left: 10px;
background: #fff;
position: absolute;
top: -9px;
left: 25px;
color: #2680eb;
}
.check-box {
height: 300px;
border-top: 1px solid #e0e0e0;
padding: 15px;
padding-left: 0;
margin-left: 25px;
overflow: auto;
}
}
.right-down {
height: 100px;
}
.click-btn {
text-align: right;
margin-top: 15px;
}
}
</style>
\ No newline at end of file
......@@ -3,10 +3,8 @@
</style>
<template>
<div>
<div class="btn" style="z-index:9999;position:absolute;right:0">
<div class="btn">
<Button type="primary" @click="parameter" v-show="showNext">下发</Button>
<!-- <Button type="primary">导出</Button>000 -->
<Button type="primary" icon="ios-redo" @click="comeBlck">返回</Button>
</div>
<div>
<Table :columns="columns" :data="data"></Table>
......@@ -18,6 +16,7 @@ import Api from "./api";
import expandRow from "./table-expand.vue";
export default {
components: { expandRow },
props: ["eid"],
data() {
return {
isactive: 0,
......@@ -106,37 +105,19 @@ export default {
},
components: {},
created() {
this.orderlist();
this.listData();
},
mounted() {},
methods: {
orderlist() {
Api.getall()
listData() {
Api.paged({ scheduleId: this.eid })
.then(r => {
if (r.success) {
this.list = r.result;
if (r.result) {
this.listData(r.result[0].schedule_Id, 0);
} else {
this.listData(0, null);
}
}
})
.catch(error => {
this.$$Message.error("请求失败");
});
},
listData(id, index) {
this.$emit.isactive = index;
this.id = id;
Api.paged({ scheduleId: id })
.then(r => {
if (r.success) {
if (r.result) {
this.data = r.result;
}
})
.catch(error => {
this.$$Message.error("请求失败");
this.$Message.error("请求失败");
});
},
// 下发
......@@ -187,10 +168,7 @@ export default {
}
});
},
// 返回
comeBlck() {
this.$router.push({ path: "/aps/aps" });
},
tabChange(name) {
if (name == "technicalcoordination") {
this.$refs.technicalcoordination.loadchangelist();
......
.results {
font-family: Microsoft YaHei;
.ivu-layout-sider {
background: none;
height: 90vh;
border-right: 1px solid #e4e6ed;
.btn {
float: right;
margin-top: -44px;
margin-right: 15px;
}
font-family: Microsoft YaHei;
.ivu-layout-sider {
background: rgba(255, 255, 255, 1);
margin-right: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 88vh;
overflow: auto;
.btn {
float: right;
margin-top: -44px;
margin-right: 15px;
}
.addclass {
border-color: #2680eb !important;
}
.addclass {
border-color: #2680eb !important;
}
h4 {
height: 45px;
line-height: 45px;
border-bottom: 1px solid #e4e6ed;
margin-bottom: 15px;
padding-left: 10px;
}
// .left-body:hover {
// border-color: #2680eb;
// }
.left-body {
margin: 10px 15px 10px 30px;
border: 1px solid rgba(228, 230, 237, 1);
border-radius: 4px;
padding: 5px 8px;
.i-checkbox {
margin-left: -30px;
margin-top: 5px;
}
h4 {
height: 38px;
line-height: 38px;
border-bottom: 1px solid #e4e6ed;
margin-bottom: 15px;
margin-right: 15px;
.title-t {
height: 30px;
line-height: 30px;
color: #2680eb;
font-size: 15px;
margin-top: -25px;
}
.left-body:hover {
.title-t:hover {
font-weight: bold;
cursor: pointer;
border-color: #2680eb;
}
.left-body {
margin: 10px 15px 0 0;
border: 1px solid rgba(228, 230, 237, 1);
border-radius: 4px;
padding: 5px 8px;
.title-t {
height: 30px;
line-height: 30px;
color: #2680eb;
font-size: 15px;
font-weight: bold;
}
.fa {
height: 30px;
line-height: 30px;
}
.fa {
height: 30px;
line-height: 30px;
}
.ivu-layout-content {
margin-left: 15px;
.tab_card{
.ivu-tabs-bar{
margin-top: 10px;
}
}
.ivu-layout-content {
margin-left: 5px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
height: 88vh;
overflow: auto;
.i-row {
height: 45px;
line-height: 45px;
border-bottom: 1px solid #e4e6ed;
margin-bottom: 15px;
padding-left: 10px;
.ivu-col {
text-align: left;
}
.btn {
float: right;
margin-top: -52px;
margin-right: 15px;
}
.black:hover {
font-weight: bold;
}
.gant {
margin-right: -20px;
}
.gant:hover {
font-weight: bold;
}
.tab_card {
.ivu-tabs-bar {
margin: 10px;
}
}
.btn {
float: right;
margin-top: -54px;
margin-right: 15px;
}
}
.compare{
.compare_box{
border: 1px solid #ccc;
.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;
}
}
.footer {
width: 100%;
position: absolute;
left: 0;
bottom: 0;
height: 60px;
line-height: 60px;
background: rgba(0, 0, 0, 0.6);
color: #fff;
padding-left: 50px;
}
}
.compare {
.compare_box {
border: 1px solid #ccc;
.left_list {
float: left;
width: 200px;
height: 100%;
border-right: 1px solid #ccc;
.left_ul {
.left_ul_title {
height: 80px;
}
.right_add{
height: 100%;
.dip_bg{
background: #ecf9f4;
}
.list_box{
border-right: 1px solid #ccc;
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;
}
.list_box:last-of-type{
border-right: none;
.case {
color: #2680EB;
}
.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;
}
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
}
}
......@@ -210,7 +210,7 @@ export default {
"op",
{
props: { oprate: "edit", title: "分卡" },
// style: params.row.status == 5 ? "" : "display:none",
style: params.row.status == 5 ? "" : "display:none",
on: { click: () => this.split(params.row) }
},
"分卡"
......
......@@ -46,8 +46,8 @@
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input>
<FormItem :label="l('version')" prop="versionid">
<Dictionary code="Process.Routing.version" v-model="entity.versionid"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
......
......@@ -5,7 +5,7 @@
<Filed :span="6" :name="l('name')">{{info.name}}</Filed>
<Filed :span="5" :name="l('code')">{{info.code}}</Filed>
<Filed :span="5" :name="l('routingType')"><state code="Process.Routing.routingType" :value="info.routingType" type="text"></state></Filed>
<Filed :span="3" :name="l('version')">{{info.version}}</Filed>
<Filed :span="3" :name="l('version')"><state code="Process.Routing.version" :value="info.versionid" type="text"></state></Filed>
</Row>
</div>
</template>
......
......@@ -59,7 +59,7 @@
</Col>
-->
<Col :span="8">
<Col :span="12">
<FormItem :label="l('routingDetailName')" prop="routingDetailId">
<Select v-model="entity.routingDetailId">
<Option
......@@ -70,22 +70,42 @@
</Select>
</FormItem>
</Col>
<Col :span="8">
<Col :span="12">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('standard')" prop="standard">
<Input v-model="entity.standard"></Input>
</FormItem>
</Col>
<Col :span="8">
<Col :span="12">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary
code="QC.checktype"
v-model="entity.checkType"
@on-change="checkChange"
type="radio"
></Dictionary>
</FormItem>
</Col>
<Col :span="12" v-if="raidoDis">
<FormItem :label="l('isphotograph')" prop="isphotograph">
<Dictionary code="Process.state" v-model="entity.isphotograph" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('fillintype')" prop="fillintype">
<Dictionary code="QC.fillintype" v-model="entity.fillintype"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<Col :span="24">
<FormItem :label="l('productionRequirement')" prop="productionRequirement">
<Input v-model="entity.productionRequirement" type="textarea" :rows="2"></Input>
<Input v-model="entity.productionRequirement"></Input>
</FormItem>
</Col>
<Col :span="12">
<Col :span="24">
<FormItem :label="l('checkContent')" prop="checkContent">
<Input v-model="entity.checkContent" type="textarea" :rows="2"></Input>
</FormItem>
......@@ -95,6 +115,7 @@
<files ref="refFile" :parms="parms" files singleFile />
</FormItem>
</Col>
<!--
<Col :span="12">
<FormItem :label="l('isImportant')" prop="isImportant">
<Dictionary code="Process.state" v-model="entity.isImportant" type="radio"></Dictionary>
......@@ -131,32 +152,20 @@
<Input v-model="entity.measurementUnit"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary code="QC.checktype" v-model="entity.checkType"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isphotograph')" prop="isphotograph">
<Dictionary code="Process.state" v-model="entity.isphotograph" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('status')" prop="status">
<Dictionary code="Process.Status" v-model="entity.status" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
-->
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
......@@ -172,6 +181,7 @@ export default {
data() {
return {
disabled: false,
raidoDis: false,
entity: {
routingHeaderId: null,
routingDetailId: null,
......@@ -197,26 +207,29 @@ export default {
samplingBatch: ""
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
routingDetailId: [
{ required: true, message: "请选择工序名称", type: "number" }
],
checkContent: [{ required: true, message: "必填", trigger: "blur" }]
},
routingDetailList: [],
parms: {
app: 'qccard',
parms: {
app: "qccard",
eid: null,
name: '',
field: ''
name: "",
field: ""
}
};
},
props: {
v: Object,
eid: Number,
headid:Number,
headid: Number
},
mounted() {
this.loadDetails();
this.parms.eid = this.$u.guid()
this.$refs.refFile.intFiles()
this.parms.eid = this.$u.guid();
this.$refs.refFile.intFiles();
},
methods: {
handleSubmit() {
......@@ -224,20 +237,26 @@ export default {
if (v) {
this.disabled = true;
this.entity.qualityTemplateName = ''
this.entity.qualityTemplate=''
this.entity.qualityTemplateName = "";
this.entity.qualityTemplate = "";
if (this.$refs.refFile.nameList.length > 0) {
let nameList=this.$refs.refFile.nameList
let names=[]
let url=[]
let nameList = this.$refs.refFile.nameList;
let names = [];
let url = [];
nameList.forEach(e => {
names.push(e.fileName)
url.push(e.filePath)
names.push(e.fileName);
url.push(e.filePath);
});
this.entity.qualityTemplateName = JSON.stringify(names).replace('[','').replace(']','').replace(/\"/g,'')//附件本地库暂存文件名称
this.entity.qualityTemplate=JSON.stringify(url).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.routingHeaderId=this.headid
this.entity.routingHeaderId = this.headid;
Api.create(this.entity)
.then(r => {
......@@ -285,19 +304,34 @@ export default {
this.routingDetailList = tempD;
});
},
//新增时将uid转为eid
//新增时将uid转为eid
updateEid(newId) {
let parms = {
eid: this.parms.eid,
id: newId + ''
}
this.$http.sysUser.updateEid(parms).then((res) => {
id: newId + ""
};
this.$http.sysUser.updateEid(parms).then(res => {
if (res.status) {
// this.$Message.success('修改成功!')
} else {
//this.$Message.error('修改失败!')
}
})
});
},
checkChange(v) {
if (v == 1 || v == 2) {
this.raidoDis = false;
this.entity.isphotograph = null;
} else {
this.raidoDis = true;
if (this.entity.isphotograph == null) {
this.entity.isphotograph = 1;
}
}
},
clearCheck() {
this.raidoDis = false;
this.entity.isphotograph = null;
},
l(key) {
key = "routing_qc_card" + "." + key;
......@@ -310,7 +344,7 @@ export default {
},
eid(v) {
if (v > 0) {
// this.load(v);
// this.load(v);
}
}
}
......
<template>
<div class="detail">
<Row>
<Filed :span="12" :name="l('routingHeaderName')" v-if="false">{{entity.routingHeaderId}}</Filed>
<Filed :span="12" :name="l('routingDetailName')">{{entity.routingDetailId}}</Filed>
<Filed :span="12" :name="l('standard')">{{entity.standard}}</Filed>
<Filed :span="12" :name="l('fillintype')">
<state code="QC.fillintype" :value="entity.fillintype+''" type="text"></state>
......@@ -10,28 +8,11 @@
<Filed :span="12" :name="l('productionRequirement')">{{entity.productionRequirement}}</Filed>
<Filed :span="12" :name="l('checkContent')">{{entity.checkContent}}</Filed>
<Filed :span="12" :name="l('qualityTemplateName')"><a :href="downUrl+entity.qualityTemplate" target="_blank">{{entity.qualityTemplateName}}</a></Filed>
<Filed :span="12" :name="l('isImportant')">
<state code="Process.state" :value="entity.isImportant+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('firstCheck')">
<state code="Process.state" :value="entity.firstCheck+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('inspection')">
<state code="Process.state" :value="entity.inspection+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('inspectionTime')">{{entity.inspectionTime}}</Filed>
<Filed :span="12" :name="l('sampling')">
<state code="Process.state" :value="entity.sampling+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('samplingBatch')">{{entity.samplingBatch}}</Filed>
<Filed :span="12" :name="l('checkType')">
<state code="QC.checktype" :value="entity.checkType+''" type="text"></state>
</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('measurementUnit')">{{entity.measurementUnit}}</Filed>
<Filed :span="12" :name="l('isphotograph')">
<state
code="Process.state"
......@@ -39,12 +20,6 @@
type="text"
></state>
</Filed>
<Filed :span="12" :name="l('status')">
<state code="Process.state" :value="entity.status+''" type="text"></state>
</Filed>
<Filed :span="12" :name="l('extend')" v-if="false">{{entity.extend}}</Filed>
<Filed :span="24" :name="l('remark')">{{entity.remark}}</Filed>
<Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">
<User :value="entity.creatorUserId"></User>
......
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row>
<!--
<Col :span="12">
<FormItem :label="l('creationTime')" prop="creationTime">
<DatePicker type="date" v-model="entity.creationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('creatorUserId')" prop="creatorUserId">
<InputNumber v-model="entity.creatorUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModificationTime')" prop="lastModificationTime">
<DatePicker type="date" v-model="entity.lastModificationTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId">
<InputNumber v-model="entity.lastModifierUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isDeleted')" prop="isDeleted">
<Input v-model="entity.isDeleted"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deleterUserId')" prop="deleterUserId">
<InputNumber v-model="entity.deleterUserId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('deletionTime')" prop="deletionTime">
<DatePicker type="date" v-model="entity.deletionTime"></DatePicker>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('routingStepId')" prop="routingStepId">
<InputNumber v-model="entity.routingStepId"></InputNumber>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('extend')" prop="extend">
<Input v-model="entity.extend"></Input>
</FormItem>
</Col>
-->
<Col :span="8">
<FormItem :label="l('routingDetailName')" prop="routingDetailId">
<Select v-model="entity.routingDetailId">
<Option
......@@ -59,91 +12,56 @@
</Select>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('standard')" prop="standard">
<Input v-model="entity.standard"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('fillintype')" prop="fillintype">
<Dictionary code="QC.fillintype" v-model="entity.fillintype"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('productionRequirement')" prop="productionRequirement">
<Input v-model="entity.productionRequirement" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('checkContent')" prop="checkContent">
<Input v-model="entity.checkContent" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<files ref="refFile" :parms="parms" files singleFile />
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('isImportant')" prop="isImportant">
<Dictionary code="Process.state" v-model="entity.isImportant" type="radio"></Dictionary>
<FormItem :label="l('standard')" prop="standard">
<Input v-model="entity.standard"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('firstCheck')" prop="firstCheck">
<Dictionary code="Process.state" v-model="entity.firstCheck" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('inspection')" prop="inspection">
<Dictionary code="Process.state" v-model="entity.inspection" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('inspectionTime')" prop="inspectionTime">
<InputNumber v-model="entity.inspectionTime"></InputNumber>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('sampling')" prop="sampling">
<Dictionary code="Process.state" v-model="entity.sampling" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('samplingBatch')" prop="samplingBatch">
<Input v-model="entity.samplingBatch"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('measurementUnit')" prop="measurementUnit">
<Input v-model="entity.measurementUnit"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('checkType')" prop="checkType">
<Dictionary code="QC.checktype" v-model="entity.checkType"></Dictionary>
<Dictionary
code="QC.checktype"
v-model="entity.checkType"
@on-change="checkChange"
type="radio"
></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<Col :span="12" v-if="raidoDis">
<FormItem :label="l('isphotograph')" prop="isphotograph">
<Dictionary code="Process.state" v-model="entity.isphotograph" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('status')" prop="status">
<Dictionary code="Process.Status" v-model="entity.status" type="radio"></Dictionary>
<Col :span="12">
<FormItem :label="l('fillintype')" prop="fillintype">
<Dictionary code="QC.fillintype" v-model="entity.fillintype"></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="entity.checkParams" type="textarea" :rows="2"></Input>
<FormItem :label="l('productionRequirement')" prop="productionRequirement">
<Input v-model="entity.productionRequirement"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('checkContent')" prop="checkContent">
<Input v-model="entity.checkContent" type="textarea" :rows="2"></Input>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="2"></Input>
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<files ref="refFile" :parms="parms" files singleFile />
<!--
<a
:href="fileUrlPath"
@click="downFile(entity.qualityTemplate)"
target="_blank"
>{{entity.qualityTemplateName}}</a>
-->
</FormItem>
</Col>
</Row>
......@@ -161,12 +79,18 @@ export default {
data() {
return {
disabled: false,
raidoDis: false,
downUrl: fileUrlDown,
fileUrlPath: "",
entity: {
qualityTemplateName: "",
qualityTemplate: ""
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }]
routingDetailId: [
{ required: true, message: "请选择工序名称", type: "number" }
],
checkContent: [{ required: true, message: "必填", trigger: "blur" }]
},
routingDetailList: [],
parms: {
......@@ -192,9 +116,20 @@ export default {
load(v) {
Api.get({ id: v }).then(r => {
this.$refs.refFile.intFilesClone();
this.parms.eid = v;
this.entity = r.result;
if (r.result.checkType == 1 || r.result.checkType == 2) {
this.raidoDis = false;
this.entity.isphotograph = null;
} else {
this.raidoDis = true;
}
});
},
downFile(path) {
this.fileUrlPath = this.downUrl + path;
},
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
......@@ -257,7 +192,17 @@ export default {
this.routingDetailList = tempD;
});
},
checkChange(v) {
if (v == 1 || v == 2) {
this.raidoDis = false;
this.entity.isphotograph = null;
} else {
this.raidoDis = true;
if (this.entity.isphotograph == null) {
this.entity.isphotograph = 1;
}
}
},
l(key) {
key = "routing_qc_card" + "." + key;
return this.$t(key);
......
......@@ -21,7 +21,7 @@
<Button type="primary" @click="add">新增</Button>
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide>
<Modal v-model="modal" :title="title" width="1000" footer-hide>
<component :is="detail" :eid="curId" :headid="hid" @on-close="cancel" @on-ok="ok" />
</Modal>
</div>
......@@ -58,7 +58,6 @@ export default {
curId: 0,
hid: 0,
columns: [
{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
......@@ -71,30 +70,16 @@ export default {
key: "routingDetailName",
title: this.l("routingDetailName"),
align: "left",
high: true
},
{
key: "checkType",
title: this.l("checkType"),
align: "left",
high: true,
code: "QC.checktype",
width:100,
tooltip:true,
},
{
key: "checkParams",
title: this.l("checkParams"),
align: "left",
easy: true,
high: true
},
{
key: "measurementUnit",
title: this.l("measurementUnit"),
align: "left",
easy: true,
high: true,
hide:true,
tooltip:true,
},
{
key: "fillintype",
......@@ -103,6 +88,14 @@ export default {
high: true,
code: "QC.fillintype",
width:140,
},
{
key: "checkType",
title: this.l("checkType"),
align: "center",
high: true,
code: "QC.checktype",
width:100,
},
{
key: "isphotograph",
......@@ -113,12 +106,12 @@ export default {
width:100,
},
{
key: "status",
title: this.l("status"),
align: "center",
key: "standard",
title: this.l("standard"),
align: "left",
easy: true,
high: true,
code: "Process.Status",
width:80,
tooltip:true,
},
{
key: "productionRequirement",
......@@ -126,15 +119,16 @@ export default {
align: "left",
easy: true,
high: true,
hide: true
tooltip:true,
},
{
key: "checkContent",
title: this.l("checkContent"),
align: "left",
easy: true,
high: true,
tooltip:true,
},
// {
// key: "standard",
// title: this.l("standard"),
// align: "left",
// easy: true,
// high: true,
// },
{
key: "qualityTemplateName",
title: this.l("qualityTemplateName"),
......@@ -155,53 +149,6 @@ export default {
]);
}
},
{
key: "isImportant",
title: this.l("isImportant"),
align: "center",
high: true,
code: "Process.state",
width:100,
},
{
key: "firstCheck",
title: this.l("firstCheck"),
align: "center",
high: true,
code: "Process.state",
width:100,
},
{
key: "inspection",
title: this.l("inspection"),
align: "center",
high: true,
code: "Process.state",
width:80,
},
{
key: "inspectionTime",
title: this.l("inspectionTime"),
align: "left",
high: true,
hide: true
},
{
key: "sampling",
title: this.l("sampling"),
align: "center",
high: true,
code: "Process.state",
width:80,
},
{
key: "samplingBatch",
title: this.l("samplingBatch"),
align: "left",
easy: true,
high: true,
hide: true
},
{
key: "creationTime",
title: this.l("creationTime"),
......
......@@ -23,10 +23,15 @@
<Dictionary code="QC.checktype" v-model="condition.checkType.value"></Dictionary>
</FormItem>
</Col>
<Col :span="24" v-if="condition.checkParams.show">
<Col :span="12" v-if="condition.checkParams.show">
<FormItem :label="l('checkParams')" prop="checkParams">
<Input v-model="condition.checkParams.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.standard.show">
<FormItem :label="l('standard')" prop="standard">
<Input v-model="condition.standard.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.measurementUnit.show">
<FormItem :label="l('measurementUnit')" prop="measurementUnit">
......@@ -63,11 +68,7 @@
<Input v-model="condition.productionRequirement.value"></Input>
</FormItem>
</Col>
<Col :span="24" v-if="condition.standard.show">
<FormItem :label="l('standard')" prop="standard">
<Input v-model="condition.standard.value"></Input>
</FormItem>
</Col>
<Col :span="12" v-if="condition.qualityTemplateName.show">
<FormItem :label="l('qualityTemplateName')" prop="qualityTemplateName">
<Input v-model="condition.qualityTemplateName.value"></Input>
......@@ -153,22 +154,22 @@ export default {
routingDetailId: { op: "Equal", value: null, show: true },
routingStepId: { op: "Equal", value: null, show: false },
checkType: { op: "Equal", value: null, show: true },
checkParams: { op: "Equal", value: null, show: false },
measurementUnit: { op: "Equal", value: null, show: true },
checkParams: { op: "Equal", value: null, show: true },
measurementUnit: { op: "Equal", value: null, show: false },
fillintype: { op: "Equal", value: null, show: true },
qualityTemplate: { op: "Equal", value: null, show: false },
isphotograph: { op: "Equal", value: null, show: true },
status: { op: "Equal", value: null, show: true },
status: { op: "Equal", value: null, show: false },
remark: { op: "Equal", value: null, show: false },
productionRequirement: { op: "Equal", value: null, show: false },
standard: { op: "Equal", value: null, show: false },
productionRequirement: { op: "Equal", value: null, show: true },
standard: { op: "Equal", value: null, show: true },
qualityTemplateName: { op: "Equal", value: null, show: false },
isImportant: { op: "Equal", value: null, show: true },
firstCheck: { op: "Equal", value: null, show: true },
inspection: { op: "Equal", value: null, show: true },
inspectionTime: { op: "Equal", value: null, show: true },
sampling: { op: "Equal", value: null, show: true },
samplingBatch: { op: "Equal", value: null, show: true }
isImportant: { op: "Equal", value: null, show: false },
firstCheck: { op: "Equal", value: null, show: false },
inspection: { op: "Equal", value: null, show: false },
inspectionTime: { op: "Equal", value: null, show: false },
sampling: { op: "Equal", value: null, show: false },
samplingBatch: { op: "Equal", value: null, show: false }
},
routingDetailList: [],
};
......
......@@ -11,16 +11,17 @@
<Input v-model="entity.unicode"></Input>
</FormItem>
</Col>-->
<Col :span="8">
<FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input>
<Col :span="8">
<FormItem :label="l('code')" prop="code">
<Input v-model="entity.code" disabled></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"></Input>
<FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('routingType')" prop="routingType">
<Dictionary code="Process.Routing.routingType" v-model="entity.routingType"></Dictionary>
......@@ -42,8 +43,8 @@
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('version')" prop="version">
<Input v-model="entity.version"></Input>
<FormItem :label="l('version')" prop="versionid">
<Dictionary code="Process.Routing.version" v-model="entity.versionid"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
......@@ -51,17 +52,18 @@
<departmentSelect v-model="entity.departmentId" @on-change="departChange"></departmentSelect>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isSendPpm')" prop="isSendPpm">
<Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isEffect')" prop="isEffect">
<Dictionary code="Process.Status" v-model="entity.isEffect" type="radio"></Dictionary>
</FormItem>
</Col>
<!--
<!--
<Col :span="8">
<FormItem :label="l('isSendPpm')" prop="isSendPpm">
<Dictionary code="Process.Status" v-model="entity.isSendPpm" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="8">
<FormItem :label="l('isMain')" prop="isMain">
<Dictionary code="Process.state" v-model="entity.isMain" type="radio"></Dictionary>
......
......@@ -81,9 +81,9 @@
</div>
</Modal>
<!-- 工艺更改弹框 -->
<routingchangeorder ref="routingchangeorder"></routingchangeorder>
<!-- 工艺更改表弹框 -->
<changelist ref="changelist"></changelist>
<routingchangeorder ref="routingchangeorder"></routingchangeorder>
<!-- 工艺更改表弹框 -->
<changelist ref="changelist"></changelist>
<div class="fullWindow flex fd" v-if="viewModal">
<div class="top flex">
<div v-width="200">
......@@ -116,14 +116,20 @@
<script>
import Api from "./api";
import service from '@/plugins/request'
import service from "@/plugins/request";
import Search from "./search";
import ProductTree from "@/components/page/productTree.vue";
import sendAudit from "./sendAudit.vue";
import routingchangeorder from '../processDesign/Process/routingchangeorder.vue'
import changelist from '../processDesign/Process/changelist.vue'
import routingchangeorder from "../processDesign/Process/routingchangeorder.vue";
import changelist from "../processDesign/Process/changelist.vue";
export default {
components: { ProductTree, Search, sendAudit,routingchangeorder,changelist },
components: {
ProductTree,
Search,
sendAudit,
routingchangeorder,
changelist
},
head: {
title: "工艺规程",
author: "henq",
......@@ -147,7 +153,6 @@ export default {
uId: "",
documentShow: false,
columns: [
{
key: "code",
title: this.l("code"),
......@@ -171,7 +176,21 @@ export default {
width: 100,
code: "Process.Routing.phase"
},
{ key: "version", title: this.l("version"), align: "left", high: true,width: 100, },
{
key: "versionid",
title: this.l("version"),
align: "center",
high: true,
width: 100,
code:"Process.Routing.version"
},
{
title: this.l("approvalStatus"),
key: "approvalStatus",
align: "center",
width: "120",
code:"process.RoutingStatus"
},
{
key: "routingType",
title: this.l("routingType"),
......@@ -212,7 +231,7 @@ export default {
// { key:"upDetailId",title:this.l("upDetailId") ,hide:true ,align:"left" ,high:true },
//{ key: "classId", title: this.l("classId"), align: "left", hide: true },
//{ key: "unicode", title: this.l("unicode"),align: "left",easy: false,hide: true},
// { key:"status",title:this.l("status") ,align:"left" ,high:true ,code:'Process.Status' },
// { key:"approvalStatus",title:this.l("approvalStatus") ,align:"left" ,high:true ,code:'process.RoutingStatus' },
// { key:"approvalStatusRemark",title:this.l("approvalStatusRemark") ,align:"left" ,high:true },
// { key:"auditUserId1",title:this.l("auditUserId1") ,align:"left" ,high:true },
......@@ -285,7 +304,7 @@ export default {
attrs: { oprate: "edit" },
on: { click: () => this.edit(params.row) }
},
"编辑"
params.row.approvalStatus == 4||params.row.approvalStatus == 0 ? "编辑" : ""
),
h(
"op",
......@@ -293,15 +312,15 @@ export default {
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row.id) }
},
"删除"
params.row.approvalStatus == 4||params.row.approvalStatus == 0 ? "删除" : ""
),
h(
"op",
{
attrs: { oprate: "detail" },
// on: { click: () => this.TechnologyChange(params.row) }
attrs: { oprate: "detail" }
// on: { click: () => this.TechnologyChange(params.row) }
},
"新增更改单"
params.row.approvalStatus == 1 ? "新增更改单" : ""
),
h(
"op",
......@@ -462,48 +481,46 @@ export default {
},
//工艺更改
TechnologyChange(row) {
this.$refs.routingchangeorder.flag = 0
this.$refs.routingchangeorder.routing_header_Id = row.id
var userId =this.$store.state.userInfo.userId
this.$refs.routingchangeorder.flag = 0;
this.$refs.routingchangeorder.routing_header_Id = row.id;
var userId = this.$store.state.userInfo.userId;
let parma = {
Id: userId
}
this.$refs.routingchangeorder.changeorder_code = ''
this.$http.sysUser.getuserinfo(parma).then((res) => {
};
this.$refs.routingchangeorder.changeorder_code = "";
this.$http.sysUser.getuserinfo(parma).then(res => {
if (res.result) {
this.$refs.routingchangeorder.formValidate = {
technical_name: row.name,
technical_code: row.code,
department_name: res.result.departmentTitle,
propose_user_name: res.result.userName
}
};
}
})
var url1 = `${designUrl}/routingheader/GetCodeByType?code=JSWJGGD`
service.get(`${url1}`).then((response) => {
this.$refs.routingchangeorder.changeorder_code = response.result
})
this.$refs.routingchangeorder.modelChange = true
});
var url1 = `${designUrl}/routingheader/GetCodeByType?code=JSWJGGD`;
service.get(`${url1}`).then(response => {
this.$refs.routingchangeorder.changeorder_code = response.result;
});
this.$refs.routingchangeorder.modelChange = true;
},
Main(data) {
// this.eid1 = ''
this.seleId = data.row.id
this.$refs.changelist.seleId = data.row.id
let url = `${designUrl}/routingheaderchangeorder/getpaged`
service
.get(`${url}`, { routing_header_id: this.seleId })
.then((res) => {
//console.log(res)
this.$refs.changelist.data2 = res.result.items
this.$refs.changelist.myloading = false
if (this.$refs.changelist.data2.length == 0) {
this.$Message.error('该工艺规程没有更改单!')
this.$refs.changelist.show3 = false
return
}
this.$refs.changelist.show3 = true
})
this.seleId = data.row.id;
this.$refs.changelist.seleId = data.row.id;
let url = `${designUrl}/routingheaderchangeorder/getpaged`;
service.get(`${url}`, { routing_header_id: this.seleId }).then(res => {
//console.log(res)
this.$refs.changelist.data2 = res.result.items;
this.$refs.changelist.myloading = false;
if (this.$refs.changelist.data2.length == 0) {
this.$Message.error("该工艺规程没有更改单!");
this.$refs.changelist.show3 = false;
return;
}
this.$refs.changelist.show3 = true;
});
}
}
};
......
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