Commit c3af3724 authored by zhanglongtao's avatar zhanglongtao

Merge branch 'master' into pro_zlt_workhour

# Conflicts:
#	i18n/locale/zh-CN.js
parents 995aa358 eb1d86de
+ eslint-plugin-node@11.1.0
added 3 packages from 2 contributors, updated 1 package and moved 1 package in 24.979s
...@@ -45,7 +45,10 @@ div::-webkit-scrollbar-thumb:hover { ...@@ -45,7 +45,10 @@ div::-webkit-scrollbar-thumb:hover {
div::-webkit-scrollbar-corner { div::-webkit-scrollbar-corner {
background: @scrollbar-corner-bg-color; background: @scrollbar-corner-bg-color;
} }
.ivu-date-picker{
display: block;
width: 100%;
}
/*flex*/ /*flex*/
.flex { .flex {
display: flex; display: flex;
...@@ -1094,7 +1097,6 @@ html [type=button] { ...@@ -1094,7 +1097,6 @@ html [type=button] {
background: #1890FF; background: #1890FF;
color: #fff; color: #fff;
} }
background: transparent; background: transparent;
} }
...@@ -1105,48 +1107,32 @@ html [type=button] { ...@@ -1105,48 +1107,32 @@ html [type=button] {
a.add { a.add {
color: #249E91; color: #249E91;
} }
// a.add:hover {
// // color: #27AB9D;
// }
a.edit { a.edit {
// color: #32B187;
color: rgb(6, 147, 212) color: rgb(6, 147, 212)
} }
// a.edit:hover {
// color: #35BD90
// }
a.remove, a.remove,
a.delete { a.delete {
color: #FF7A8B;
i:hover { i:hover {
background: #FF7A8B; background: orange;
color: #fff; color: #fff;
} }
} }
a.delete {
color: #FF7A8B;
}
a.empower { a.empower {
color: #FFBD59; color: #FFBD59;
} }
.ivu-drawer-wrap{
a.disable { z-index: 5000;
color: #CAD1D9;
} }
a.icon { a.icon {
display: inline-block; display: inline-block;
width: 28px; width: 22px;
height: 28px; height: 22px;
line-height: 28px; line-height: 22px;
margin: 0px 0 0 0; margin: 0px 5px 0 0;
border-radius: 50%; border-radius: 50%;
color: #515A6E; color: #515A6E;
background: #F5F6FA; background: #F5F6FA;
...@@ -1155,16 +1141,13 @@ html [type=button] { ...@@ -1155,16 +1141,13 @@ html [type=button] {
font-size: 18px; font-size: 18px;
} }
} }
a.disable {
// a.icon:hover { color: #CAD1D9;
// background: #27AB9D; cursor:not-allowed;
// color: #fff; i:hover {
// } background:transparent;
}
// a.icon:active { }
// background: #229185;
// color: #fff;
// }
} }
...@@ -1313,7 +1296,7 @@ html [type=button] { ...@@ -1313,7 +1296,7 @@ html [type=button] {
left: 0; left: 0;
text-align: center; text-align: center;
padding: 20px 0; padding: 20px 0;
background: #08080894; background: #080808;
div { div {
height: 25px; height: 25px;
......
//-------------蓝色----------- //-------------蓝色-----------
@Theme: rgba(38, 128, 235, 1);
//滚动条颜色 //滚动条颜色
@scrollbar-track-bg-color: rgb(239, 239, 239); @scrollbar-track-bg-color: rgb(239, 239, 239);
@scrollbar-thumb-bg-color: rgba(38, 128, 235, 0.5); @scrollbar-thumb-bg-color: rgba(38, 128, 235, 0.5);
......
...@@ -386,7 +386,7 @@ export default { ...@@ -386,7 +386,7 @@ export default {
// } // }
// }); // });
this.columnsCur = items; this.columnsCur = items;
console.log("cur", items,this.columnsCur); // console.log("cur", items,this.columnsCur);
}, },
//数据加载 //数据加载
load() { load() {
......
<template>
<DatePicker
v-if="edit"
:open="open"
:value="value3"
type="datetimerange"
@on-change="handleChange"
@on-clear="handleClear"
@on-ok="handleClear"
confirm
>
<div
class="time-range ivu-input"
href="javascript:void(0)"
@click="handleClick"
>
<Icon type="ios-calendar-outline"></Icon>
<div class="time-view" v-if="startDate && endDate">
<span>{{ startDate }}</span>
<span class="jian-tou">{{ jg }} {{ unit }}</span>
<span>{{ endDate }}</span>
</div>
<span v-else v-text="placeholder"> </span>
</div>
</DatePicker>
<div class="time-view" v-else-if="!edit && startDate && endDate">
<span>{{ startDate }}</span>
<span class="jian-tou">{{ jg }} {{ unit }}</span>
<span>{{ endDate }}</span>
</div>
</template>
<script>
import dayjs from "dayjs";
export default {
name: "",
model: {
prop: "value",
event: "on-change",
},
data() {
return {
value3: [this.value[this.start],this.value[this.endDate]],
open: false,
};
},
props: {
value: Object,
start: {
type: String,
default: "startDate",
},
unit: {
type: String,
default: "天",
},
placeholder: {
type: String,
default: "请选择时间范围",
},
end: {
type: String,
default: "endDate",
},
mode: {
type: String,
default: "h", //h:小时,d:天,w:周,m:月
},
timeValue: {
type: [String, Object],
default: "",
},
edit: {
type: Boolean,
default: false,
},
work: {
type: [String, Number], //传入的work为0,转换为小时,1为天,2为周,3为月
default: 8,
},
},
created() {
},
methods: {
handleClick() {
this.open = !this.open;
},
handleChange(date, t) {
if (date.length == 2) {
this.value3 = date;
// this.value[this.start] = date[0];
// this.value[this.end] = dayjs(date[1]).format("YYYY-MM-DD 23:59:59");
this.$set(this.value,this.start,date[0])
this.$set(this.value,this.end,dayjs(date[1]).format("YYYY-MM-DD 23:59:59"))
this.$emit("on-change", this.value);
}
this.open = false;
},
handleClear() {
this.open = false;
},
},
computed: {
startDate() {
if (this.value && this.value[this.start]) {
var start = dayjs(this.value[this.start]);
return start.format("YYYY-MM-DD");
}
},
endDate() {
if (this.value&&this.value[this.end]) {
var end = dayjs(this.value[this.end]);
return end.format("YYYY-MM-DD");
}
},
jg(){
if (this.value&&this.value[this.start] && this.value[this.end]) {
var start = dayjs(this.value[this.start]);
var end = dayjs(this.value[this.end]);
return end.diff(start,'day')+1;
}
}
},
watch: {
// value(v){
// this.value=[v[this.start],v[this.end]]
// }
},
};
</script>
<style lang="less">
.time-view {
display: inline-block;
span{size: 12px}
span.jian-tou {
min-width:60px;
text-align: center;
display: inline-block;
background-image: url("../../assets/imgicon/range.png");
background-size: 100%;
background-repeat: no-repeat;
background-position: 100% 80%;
// border-bottom: #eee 2px solid;
size: 12px;
color: orange;
}
}
</style>
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
}, },
value: { value: {
type: String, type: String,
default: '2001-01-01 00:00:00' default: ''
}, },
}, },
created() { created() {
......
This diff is collapsed.
<template>
<div class="datalife">
<div class="bigBing" :style="{width:220*bigNum+'px'}" v-if="mode">
<div v-for="(item, index) in data" :key="index" class="linebox">
<div class="box" :class="curIndex == index ? 'boxBorder1':curIndex<index ? ' boxBorder2':' boxBorder' " >
<Tag type="dot" :color="item.color?item.color:tagColor" >{{ item.name }}</Tag>
</div>
<div class="line" :class="[curIndex == index ? 'borderBotCol1' : curIndex<index? 'borderBotCol2':'borderBotCol']" v-if="bigNum != index+1" >
<span class="item arrow-right" :class="[curIndex==index? 'boxBorder1' :curIndex<index? 'boxBorder2':'boxBorder']" ></span>
</div>
</div>
</div>
<div class="bigBing" :style="{width:240*bigNum+'px'}" v-else>
<div class="lifeBox" v-for="(item, index) in data" :key="index">
<div class="arrow-left">
<b class="right" v-if="index != 0">
<i class="right-arrow" :class="curIndex==index ? 'rightCol1' :curIndex<index ? 'rightCol2' : 'rightCol' " ></i><i class="right-arrow2"></i>
</b>
</div>
<div class="lifeBoxfish" :class="[curIndex==index? 'boxBorder1' : curIndex<index ? 'boxBorder2' : 'boxBorder', bigNum != index + 1 ? 'borderR' : 'borderR1', ]" >
<Tag type="dot" :color="item.color?item.color:tagColor">{{ item.name }}</Tag>
</div>
<div class="arrow-right">
<b class="right" v-if="bigNum != index + 1"
><i class="right-arrow" :class="curIndex==index ? 'rightCol1' : curIndex<index ? 'rightCol2' : 'rightCol' " ></i><i class="right-arrow2"></i
></b>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: "life",
data() {
return {
data:[],
tagColor:'#000',
bigNum: 0,
curIndex:-1,
};
},
props:{
code:{
//字典编码
type:String,
default:"Process.routing_detail.resource_type"
},
row:{
//行数据
type:Object
},
value:{
//当前值
type:[String,Number]
},
mode:{
//显示形式
type:String,
default:""
}
},
created() {
this.data = this.$store.getters.dictionaryByKey(this.code) || [];
this.bigNum = this.data.length;
this.data.forEach((u,i)=>{
if(u.code==this.value){
this.curIndex=i;
}
})
},
methods: {
},
};
</script>
<style lang="less" >
.datalife {
overflow-x: auto;
.linebox {
display: inline-flex;
.box {
background: white;
border-radius: 4px;
width: 120px;
height: 50px;
line-height: 50px;
margin: 10px 0 20px 8px;
text-align: center;
border: 3px solid;
.ivu-tag-dot{
font-weight: bolder;
font-size: 14px;
height: 100%;
line-height: 43px;
border: 0px solid #e8eaec !important;
width: 100%;
background: transparent !important;
}
}
.boxBorder {
border-color: #0dd78d;
}
.boxBorder1 {
border-color: #5b9ff0;
}
.boxBorder2 {
border-color: #b8bcc4;
}
.borderBotCol {
border-bottom: 3px solid #0dd78d;
}
.borderBotCol1 {
border-bottom: 3px solid #5b9ff0;
}
.borderBotCol2 {
border-bottom: 3px solid #b8bcc4;
}
.line {
position: relative;
width: 100px;
height: 20px;
margin-top: 21px;
margin-left: -3px;
z-index: 3;
border-left: 4px solid white;
/* 向右的箭头 */
.item {
position: absolute;
right: -6px;
top: 10px;
float: left;
clear: both;
margin-bottom: 23px;
}
.arrow-right {
font-size: 0;
line-height: 0;
border-width: 10px;
border-right-width: 0;
border-style: dashed;
border-left-style: solid;
border-top-color: transparent;
border-bottom-color: transparent;
}
}
}
.lifeBox {
display: inline-flex;
position: relative;
width: 220px;
.lifeBoxfish {
line-height: 50px;
text-align: center;
width: 200px;
// padding: 0 20px;
height: 50px;
border: 3px solid;
margin: 10px 0 20px 8px;
background: white;
.ivu-tag-dot{
font-weight: bolder;
font-size: 14px;
height: 100%;
line-height: 43px;
border: 0px solid #e8eaec !important;
width: 100%;
background: transparent !important;
}
.borderR {
border-right-color: #0dd78d;
}
.borderR1 {
border-right-color: transparent;
}
}
.boxBorder {
border-color: #0dd78d;
}
.boxBorder1 {
border-color: #5b9ff0;
}
.boxBorder2 {
border-color: #b8bcc4;
}
.arrow-left {
position: relative;
/*右箭头*/
.right {
width: 30px;
height: 50px;
position: absolute;
left: 8px;
top: 10px;
}
.right-arrow,
.right-arrow2 {
width: 0;
height: 0;
display: block;
position: absolute;
left: 0;
top: 0;
border-top: 25px transparent dashed;
border-right: 2px transparent dashed;
border-bottom: 25px transparent dashed;
/* border-left: 10px white solid !important; */
overflow: hidden;
}
.right-arrow {
left: 1px;
/*重要*/
border-left: 17px solid;
}
.right-arrow2 {
border-left: 16px white solid;
}
.rightCol{
border-left-color: #0dd78d;
}
.rightCol1{
border-left-color: #5b9ff0;
}
.rightCol2{
border-left-color: #b8bcc4;
}
}
.arrow-right {
position: relative;
/*右箭头*/
.right {
width: 30px;
height: 50px;
position: absolute;
left: -2px;
top: 10px;
}
.right-arrow,
.right-arrow2 {
width: 0;
height: 0;
display: block;
position: absolute;
left: 0;
top: 0;
border-top: 25px transparent dashed;
border-right: 2px transparent dashed;
border-bottom: 25px transparent dashed;
/* border-left: 10px white solid !important; */
overflow: hidden;
}
.right-arrow {
left: 1px;
/*重要*/
border-left: 17px solid;
}
.right-arrow2 {
border-left: 16px white solid;
}
.rightCol{
border-left-color: #0dd78d;
}
.rightCol1{
border-left-color: #5b9ff0;
}
.rightCol2{
border-left-color: #b8bcc4;
}
}
}
}
</style>
\ No newline at end of file
<template> <template>
<Tooltip trigger="hover" v-if="title" :content="title" placement="top-end"> <a v-if="disable" class="disable">
<slot>
<Icon v-if="type=='icon'" :type="icon" :color="colors" />
<span v-else="type=='text'" v-text="text"></span>
</slot>
</a>
<Tooltip trigger="hover" v-else-if="title" :content="titles" placement="top-end">
<a class="op" :class="css" @click="handler"> <a class="op" :class="css" @click="handler">
<slot> <slot>
<Icon v-if="type=='icon'" :type="icon" :color="color" /> <Icon v-if="type=='icon'" :type="icon" :color="colors" />
<span v-else="type=='text'" v-text="text"></span> <span v-else="type=='text'" v-text="text"></span>
</slot> </slot>
</a> </a>
</Tooltip> </Tooltip>
<a class="op" v-else :class="css" @click="handler"> <a class="op" v-else :class="css" @click="handler">
<slot> <slot>
<Icon v-if="type=='icon'" :type="icon" :color="color" /> <Icon v-if="type=='icon'" :type="icon" :color="colors" />
<span v-else="type=='text'" v-text="text"></span> <span v-else="type=='text'" v-text="text"></span>
</slot> </slot>
</a> </a>
...@@ -38,12 +44,20 @@ export default { ...@@ -38,12 +44,20 @@ export default {
}, },
color: { color: {
type: String type: String
} },
disable: {
type: Boolean,
default: false
},
}, },
data() { data() {
return { return {
text: "", text: "",
css: "detail" css: "detail",
colors: this.color,
titles: this.title,
disabled:false,
}; };
}, },
created() { created() {
...@@ -63,9 +77,18 @@ export default { ...@@ -63,9 +77,18 @@ export default {
} else if (this.type == "icon") { } else if (this.type == "icon") {
this.css = "icon"; this.css = "icon";
} }
},
mounted() {
if (this.disable) {
this.colors = "#ccc";
this.titles = ''
}
}, },
methods: { methods: {
handler() { handler() {
if (this.disable == 0) {
if (this.oprate == "delete" || this.oprate == "remove") { if (this.oprate == "delete" || this.oprate == "remove") {
this.$Modal.confirm({ this.$Modal.confirm({
title: this.title, title: this.title,
...@@ -79,6 +102,32 @@ export default { ...@@ -79,6 +102,32 @@ export default {
} }
} }
} }
},
watch: {
v() {},
disable(v) {
if (v) {
this.colors = "#ccc";
this.titles = '';
} else {
this.colors = this.color;
this.titles = this.title;
}
this.disable = v
},
color(v) {
if (v && v != '') {
this.colors = v
}
},
title(v) {
if (v && v != '') {
this.titles = v
}
},
},
}; };
</script> </script>
......
<template> <template>
<div class="img-p">
<img :src="downUrl + src" /> <img :src="downUrl + src" />
</div>
</template> </template>
<script> <script>
export default { export default {
...@@ -24,3 +26,8 @@ export default { ...@@ -24,3 +26,8 @@ export default {
}, },
}; };
</script> </script>
<style lang="less" scoped>
.img-p {
text-align: center;
}
</style>
\ No newline at end of file
<template>
<div class="flex fd tree-menu">
<!-- 任务结构 -->
<div class="p-list">
<h3>
<Dropdown @on-click="clickItem">
<a href="javascript:void(0)">
{{ downName }}
<Icon type="ios-arrow-down"></Icon>
</a>
<DropdownMenu slot="list">
<DropdownItem
v-for="item in projectList"
:key="item.id"
:name="item.id"
>{{ item.title }}</DropdownItem
>
</DropdownMenu>
</Dropdown>
</h3>
<div class="mr10 mt10 icon-d">
<ButtonGroup class="fr" size="small">
<Button
:icon="expand ? 'md-arrow-dropright' : 'md-arrow-dropdown'"
@click="toggle"
title="展开/合并"
></Button>
<Button
icon="md-refresh"
title="刷新"
@click="loadTree(curId)"
></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup>
</div>
</div>
<div class="search">
<Input search placeholder="请输入关键字" v-model="keys" clearable />
</div>
<div class="fg">
<div class="tree">
<Tree
:data="data"
:render="renderContent"
ref="tree"
@on-select-change="change"
></Tree>
</div>
</div>
</div>
</template>
<script>
export default {
name: "",
data() {
return {
keys: "",
expand: true,
list: [],
downName: "",
projectList: [],
curdId: this.curId,
};
},
props: {
curId: {
type: String,
},
},
created() {
this.listSlecet();
// this.loadTree();
},
methods: {
clickItem(val) {
console.log(val);
this.projectList.forEach((e) => {
if (val == e.id) {
this.downName = e.title;
}
});
this.curdId = val;
this.loadTree();
},
listSlecet() {
let data = {
conditions: [],
sortBy: "id",
isDesc: false,
};
this.$api.post(`${material}/projectmain/list`, data).then((r) => {
if (r.result) {
this.projectList = r.result;
if (this.curId) {
this.projectList.map(u=>{
if(u.id==this.curId){
this.downName = u.title;
}
})
} else {
this.downName = this.projectList[0].title;
this.curdId = this.projectList[0].id;
}
this.loadTree(this.curId);
}
});
},
loadTree() {
let params = {
conditions: [
{
fieldName: "projectId",
fieldValue: this.curdId,
conditionalType: "Equal",
},
],
};
this.$api.post(`${material}/projectplan/list`, params).then((r) => {
var data = this.$u.toTree(
r.result,
null,
(u) => {
u.value = u.id;
u.expand = true;
u.selected = false;
u.checked = false;
},
"upId"
);
this.list = this.$u.clone(data);
});
},
toggle() {
this.expand = !this.expand;
},
renderContent(h, { root, node, data }) {
var items = this.$store.getters.dictionaryByKey(
"mes.project_plan.Status"
);
var item = items.filter((u) => {
return u.code == data.status;
})[0];
// console.warn("jjjjjj", items, item);
var color = item.color || "black";
return h("div", [
h("state", {
props: {
code: "mes.project_plan.Type",
type: "icon",
value: data.type + "",
size: 16,
},
}),
h("Badge", {
props: {
color: color,
text: data.title,
},
}),
]);
},
change(v, b) {
// console.log(b);
let ids = [];
let productIds = [];
// if (b.bomId !== 0) {
// ids.push(b.bomId);
// }
var curentId = "";
curentId = b.id;
productIds.push(b.value);
if (b.children) {
addId(b.children);
function addId(data) {
data.map((u) => {
// if (u.bomId !== 0) {
// ids.push(u.bomId);
// }
productIds.push(u.value);
if (u.children) {
addId(u.children);
}
});
}
}
this.$emit("on-select", curentId, b, productIds);
},
hide() {
this.$emit("on-hide");
},
},
computed: {
data() {
let items = this.$u.clone(this.list);
let expand = this.expand;
let result = [];
search(this.keys, items);
function search(keys, data) {
data.map((u) => {
if (keys.length < 2) {
u.expand = expand;
result.push(u);
} else {
u.expand = expand;
if (u.title.indexOf(keys) > -1) {
result.push(u);
} else if (u.children) {
search(keys, u.children);
}
}
});
}
return result;
},
},
watch: {
curId(v) {
if (v) {
this.curdId = v;
this.loadTree();
}
},
},
};
</script>
<style lang="less">
.tree-menu {
border: 1px solid #ddd;
.p-list {
position: relative;
}
.icon-d {
position: absolute;
top: 0;
right: 0;
}
}
</style>
<template> <template>
<div class="ib"> <div class="ib" @click="showLife">
<div class="ib" v-if="!isMore"> <div class="ib" v-if="!isMore">
<span v-if="type=='text'" :style="style">{{name}}</span> <span v-if="type == 'text'" :style="style">{{ name }}</span>
<Tag v-if="type=='tag'" :color="tagcolor">{{name}}</Tag> <Tag v-if="type == 'tag'" :color="tagcolor">{{ name }}</Tag>
<Badge v-if="type=='dot'" :color="tagcolor" :text="name" /> <Badge v-if="type == 'dot'" :color="tagcolor" :text="name" />
<Icon v-if="type=='icon'" :type="item.icon" :color="tagcolor" :title="name" size="24" /> <Icon
v-if="type == 'icon'"
:type="item.icon"
:color="tagcolor"
:title="name"
:size="size"
/>
</div> </div>
<div class="ib" v-else v-for="(li,i) in items" :key="i"> <div class="ib" v-else v-for="(li, i) in items" :key="i">
<span v-if="type=='text'" :style="li.style">{{li.name}}</span> <span v-if="type == 'text'" :style="li.style">{{ li.name }}</span>
<Tag v-if="type=='tag'" :color="li.tagcolor">{{li.name}}</Tag> <Tag v-if="type == 'tag'" :color="li.tagcolor">{{ li.name }}</Tag>
<Badge v-if="type=='dot'" :color="li.tagcolor" :text="li.name" />&nbsp; <Badge v-if="type == 'dot'" :color="li.tagcolor" :text="li.name" />&nbsp;
</div> </div>
<Modal
v-model="modal"
title="生命周期"
width="1200"
footer-hide
:mask-closable="false"
>
<component :is="detail" :code="code" :value="value" :mode="mode" />
</Modal>
</div> </div>
</template> </template>
<script> <script>
...@@ -18,45 +33,52 @@ export default { ...@@ -18,45 +33,52 @@ export default {
name: "state", name: "state",
data() { data() {
return { return {
mode: "0",
name: "", name: "",
isMore: false, isMore: false,
modal: false,
item: {}, item: {},
items: [], items: [],
data: [] data: [],
detail: null,
}; };
}, },
props: { props: {
default: { default: {
type: String, type: String,
default: "" default: "",
}, },
type: { type: {
type: String, type: String,
default: "text", default: "text",
validator: function(value) { validator: function (value) {
return ["text", "tag", "dot", "icon"].indexOf(value) != -1; return ["text", "tag", "dot", "icon"].indexOf(value) != -1;
} },
}, },
code: { code: {
type: String, type: String,
required: true required: true,
}, },
value: { value: {
type: [String, Number], type: [String, Number],
required: false required: false,
}, },
color: { color: {
type: Boolean, type: Boolean,
default: true default: true,
},
size: {
type: Number,
default: 24,
}, },
icon: { icon: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
img: { img: {
type: Boolean, type: Boolean,
default: false default: false,
} },
}, },
created() { created() {
this.data = this.$store.getters.dictionaryByKey(this.code) || []; this.data = this.$store.getters.dictionaryByKey(this.code) || [];
...@@ -65,7 +87,7 @@ export default { ...@@ -65,7 +87,7 @@ export default {
setName(v) { setName(v) {
if ((v + "").indexOf(",") == -1) { if ((v + "").indexOf(",") == -1) {
var item; var item;
this.data.map(u => { this.data.map((u) => {
if (u.code == v) { if (u.code == v) {
item = u; item = u;
} }
...@@ -75,7 +97,7 @@ export default { ...@@ -75,7 +97,7 @@ export default {
this.item = item; this.item = item;
} else { } else {
if (this.value == "undefined") { if (this.value == "undefined") {
this.name = ' ' this.name = " ";
} else { } else {
this.name = this.value; this.name = this.value;
} }
...@@ -84,7 +106,7 @@ export default { ...@@ -84,7 +106,7 @@ export default {
this.isMore = true; this.isMore = true;
var items = []; var items = [];
var ul = (v + "").split(","); var ul = (v + "").split(",");
this.data.map(u => { this.data.map((u) => {
if (ul.indexOf(u.code) > -1) { if (ul.indexOf(u.code) > -1) {
u.tagcolor = u.color | "default"; u.tagcolor = u.color | "default";
u.style = { color: u.color | "inherit" }; u.style = { color: u.color | "inherit" };
...@@ -93,7 +115,11 @@ export default { ...@@ -93,7 +115,11 @@ export default {
}); });
this.items = items; this.items = items;
} }
} },
showLife() {
this.modal = true;
this.detail = () => import("./life");
},
}, },
computed: { computed: {
tagcolor() { tagcolor() {
...@@ -115,9 +141,9 @@ export default { ...@@ -115,9 +141,9 @@ export default {
color: color:
this.item && this.item.color != "" && this.item.color != null this.item && this.item.color != "" && this.item.color != null
? this.item.color ? this.item.color
: "inherit" : "inherit",
}; };
} },
}, },
watch: { watch: {
value(v) { value(v) {
...@@ -129,7 +155,7 @@ export default { ...@@ -129,7 +155,7 @@ export default {
this.setName(this.value); this.setName(this.value);
this.$forceUpdate(); this.$forceUpdate();
} }
} },
} },
}; };
</script> </script>
\ No newline at end of file
...@@ -19,13 +19,19 @@ ...@@ -19,13 +19,19 @@
</div> </div>
<div class="fg"> <div class="fg">
<div class="tree"> <div class="tree">
<Tree :data="data" :render="renderContent" ref="tree" @on-select-change="change"></Tree> <Tree
:data="data"
:render="renderContent"
ref="tree"
@on-select-change="change"
></Tree>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { forEach } from "lodash";
export default { export default {
name: "", name: "",
data() { data() {
...@@ -64,7 +70,24 @@ export default { ...@@ -64,7 +70,24 @@ export default {
}, },
"upId" "upId"
); );
this.list = this.$u.clone(data); let creatorUserId = this.$store.state.userInfo.userId;
console.log(creatorUserId);
let list = this.$u.clone(data);
let newlist = [];
list.filter((e, index) => {
let userIds = [];
let obj = {};
if (e.upId == 0) {
userIds = e.userIds.split(",");
userIds.forEach((v) => {
if (creatorUserId == v) {
newlist.push(e);
}
});
}
});
// console.log(newlist);
this.list = newlist;
}); });
}, },
toggle() { toggle() {
...@@ -124,6 +147,7 @@ export default { ...@@ -124,6 +147,7 @@ export default {
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) => {
......
<template>
<div class="time-view">{{ date }}</div>
</template>
<script>
export default {
name: "",
data() {
return {};
},
props: {
timeValue: {
type: [String, Object],
default: "",
},
// mode: {
// type: [String, Object],
// default: "",
// },
},
computed: {
date() {
var date1 = new Date(this.timeValue.startDate).getTime(); //开始时间,时间戳
var date2 = new Date(this.timeValue.endDate).getTime(); //结束时间,时间戳
var date3 = 0;
date3 = date2 - date1;
var timeSpanStr;
if (date3 <= 1000 * 60 * 1) {
timeSpanStr = "刚刚";
} else if (1000 * 60 * 1 < date3 && date3 <= 1000 * 60 * 60) {
timeSpanStr = Math.round(date3 / (1000 * 60)) + "分钟";
} else if (1000 * 60 * 60 * 1 < date3 && date3 <= 1000 * 60 * 60 * 24) {
timeSpanStr = Math.round(date3 / (1000 * 60 * 60)) + "小时";
} else if (
1000 * 60 * 60 * 24 <
date3
// && date3 <= 1000 * 60 * 60 * 24 * 30
) {
timeSpanStr = Math.round(date3 / (1000 * 60 * 60 * 24)) + "天";
}
return timeSpanStr;
// var result = "";
// var minute = 1000 * 60;
// var hour = minute * 60;
// var day = hour * 24;
// var month = day * 30;
// if (date3 < 0) return;
// var monthC = date3 / month;
// var weekC = date3 / (7 * day);
// var dayC = date3 / day;
// var hourC = date3 / hour;
// var minC = date3 / minute;
// if (monthC >= 1) {
// result = "" + parseInt(monthC) + "月";
// } else if (weekC >= 1) {
// result = "" + parseInt(weekC) + "周";
// } else if (dayC >= 1) {
// result = "" + parseInt(dayC) + "天";
// } else if (hourC >= 1) {
// result = "" + parseInt(hourC) + "小时";
// } else if (minC >= 1) {
// result = "" + parseInt(minC) + "分钟";
// } else {
// result = "刚刚";
// }
// return result;
},
},
mounted() {},
methods: {},
watch: {},
};
</script>
<style lang="less">
</style>
This diff is collapsed.
<template> <template>
<Poptip placement="bottom-start" trigger="hover" width="240" transfer> <Poptip placement="bottom-start" trigger="hover" width="240" transfer>
<label :class="css">{{ user.name }}</label> <label v-if="mode=='text'" :class="css">{{ user.name }}</label>
<Avatar v-else :style="{background:user.gender=='男'?'#1479D7':'#f56a00'}"
:src="img">{{user.name}}</Avatar>
<div slot="content"> <div slot="content">
<Avatar v-if="user.face" size="large" :src="img"></Avatar> <Avatar v-if="user.face" size="large" :src="img"></Avatar>
<Avatar <Avatar
...@@ -31,6 +33,13 @@ export default { ...@@ -31,6 +33,13 @@ export default {
type: [Number, String], type: [Number, String],
default: 0, default: 0,
}, },
mode:{
type:String,
default:"text",
validator:(v)=>{
return ["text","face"].indexOf(v)>-1
}
}
}, },
data() { data() {
return { return {
......
<template>
<div>
<Select
:placeholder="placeholder"
v-model="name"
@on-change="change"
:multiple="multiple"
clearable
filterable
transfer
>
<Option
v-for="item in users"
:value="item.userId"
:key="item.userId"
:label="item.note"
:disabled="item.status == 0"
>
<div class="user">
<Icon v-if="item.authority==1" type="md-person" size="18" color="gold"/>
<Icon v-if="item.authority==2" type="md-person" size="18" color="green"/>
<Icon v-if="item.authority==0" type="md-person" size="18" />
{{ item.note }}
<State
code="project.group.role"
:value="item.role"
class="mr10"
type="tag"
/>
</div>
</Option>
</Select>
</div>
</template>
<script>
export default {
model: {
prop: "value",
event: "on-change",
},
data() {
return {
name: this.value,
users: this.data,
};
},
created() {
this.load();
},
props: {
value: [String, Number, Array],
placeholder: {
type: String,
default: "请选择人员",
},
multiple: {
type: Boolean,
default: false,
},
projectId: {
type: String,
},
},
methods: {
load() {
if (this.projectId) {
var params = {
conditions: [
{
fieldName: "projectId",
fieldValue: this.projectId,
conditionalType: "Equal",
},
],
};
//
this.$api
.post(`${material}/projectgroupuser/list`, params)
.then((r) => {
this.users = r.result;
});
}
},
change(event) {
let name = "";
this.users.forEach((e) => {
if (e.id == event) {
name = e.label;
}
});
this.$emit("on-change", event, name);
},
// 加载人员
},
watch: {
projectId(v) {
if (v) {
this.load();
}
},
},
};
</script>
<style lang="less">
@import "../../assets/css/custom.less";
.userGroup {
}
</style>
...@@ -124,7 +124,7 @@ export default { ...@@ -124,7 +124,7 @@ export default {
// pageIndex: 1, // pageIndex: 1,
departmentId: id, departmentId: id,
type: this.type, type: this.type,
roleTitle: this.roleTitle, roleTitle: this.roleTitle, //检验
// pageSize: 0 // pageSize: 0
}; };
if (this.type == 99) { //开发组 if (this.type == 99) { //开发组
......
This diff is collapsed.
...@@ -2,30 +2,48 @@ import XLSX from 'xlsx'; ...@@ -2,30 +2,48 @@ import XLSX from 'xlsx';
import Api from '@/plugins/request' import Api from '@/plugins/request'
let henq = {}; let henq = {};
let pdfInfo = '' let pdfInfo = ''
henq.clone = (obj) => { henq.clone = (data)=> {
var that = henq var that = henq
var o const t = that.type(data);
if (typeof obj === 'object') { let o;
if (obj === null) { let i;
o = null let ni;
if (t === "array") {
o = [];
} else if (t === "object") {
o = {};
} else { } else {
if (obj instanceof Array) { return data;
o = []
for (var i = 0, len = obj.length; i < len; i++) {
o.push(that.clone(obj[i]))
} }
} else { if (t === "array") {
o = {} for (i = 0, ni = data.length; i < ni; i++) {
for (var j in obj) { o.push(that.clone(data[i]));
o[j] = that.clone(obj[j])
} }
return o;
} }
if (t === "object") {
for (i in data) {
o[i] = that.clone(data[i]);
} }
} else { return o;
o = obj
} }
return o
} }
henq.type=(obj) =>{
const { toString } = Object.prototype;
const map = {
"[object Boolean]": "boolean",
"[object Number]": "number",
"[object String]": "string",
"[object Function]": "function",
"[object Array]": "array",
"[object Date]": "date",
"[object RegExp]": "regExp",
"[object Undefined]": "undefined",
"[object Null]": "null",
"[object Object]": "object",
};
return map[toString.call(obj)];
},
henq.merge = () => { henq.merge = () => {
Object.assign(argments) Object.assign(argments)
} }
...@@ -524,9 +542,7 @@ henq.makeRules = (list, apiUrl) => { ...@@ -524,9 +542,7 @@ henq.makeRules = (list, apiUrl) => {
required: true, required: true,
trigger: "blur" trigger: "blur"
} }
} } else if (el.ruleType == 'datetime') {
else if (el.ruleType == 'datetime')
{
objInfo = { objInfo = {
required: true, required: true,
message: "请选择时间", message: "请选择时间",
...@@ -552,4 +568,62 @@ henq.makeRules = (list, apiUrl) => { ...@@ -552,4 +568,62 @@ henq.makeRules = (list, apiUrl) => {
return rules return rules
} }
//colums验证end //colums验证end
//获取当天、明天、昨天、本周、上周、本月、上月的日期 start
//获取今天的日期
henq.getToday = () => {
let myDate = new Date();
let nowDate = myDate.getFullYear() + "-" + (myDate.getMonth() + 1) + "-" + myDate.getDate();
return nowDate
}
//获取明天的日期
henq.getTomorrow = () => {
let myDate = new Date();
myDate.setTime(myDate.getTime() + 24 * 60 * 60 * 1000);
let tomorrowDate =
myDate.getFullYear() +
"-" +
(myDate.getMonth() + 1) +
"-" +
myDate.getDate();
return tomorrowDate
}
//获取昨天的日期
henq.getYestoday = () => {
let myDate = new Date();
myDate.setTime(myDate.getTime() - 24 * 60 * 60 * 1000);
let yestoayDate =
myDate.getFullYear() +
"-" +
(myDate.getMonth() + 1) +
"-" +
myDate.getDate();
return yestoayDate
}
//获取本周的日期
henq.getCurMonday = (val) => {
let nowTemp = new Date(); //当前时间
let oneDayLong = 24 * 60 * 60 * 1000; //一天的毫秒数
let c_time = nowTemp.getTime(); //当前时间的毫秒时间
let c_day = nowTemp.getDay() || 7; //当前时间的星期几
let m_time = c_time - (c_day - val) * oneDayLong; //当前周一的毫秒时间
let monday = new Date(m_time); //设置周一时间对象
let m_year = monday.getFullYear();
let m_month = monday.getMonth() + 1;
let m_date = monday.getDate();
return m_year + '-' + m_month + '-' + m_date
}
henq.getCurMonth = (val) => {
let nowTemp = new Date(); //当前时间
let m_year = nowTemp.getFullYear();
let m_month = nowTemp.getMonth() + 1+val;
if(m_month==0)
{
m_month=12
m_year=m_year-1
}
return m_year + '-' + m_month
}
//获取当天、明天、昨天、本周、上周、本月、上月的日期 end
export default henq; export default henq;
<template> <template>
<div style="padding: 0;" class="excute"> <div style="padding: 0;" class="excute">
<DataGrid <DataGrid style="margin-top:2px; margin-bottom: -5px;" :columns="columns" ref="grid" :easy="false" :high="false" :set="false" :border="false" :data="data1" :height="gridHeight" :page="false" :size="size"></DataGrid>
style="margin-top:2px; margin-bottom: -5px;"
:columns="columns"
ref="grid"
:easy="false"
:high="false"
:set="false"
:border="false"
:data="data1"
:height="gridHeight"
:page="false"
:size="size"
></DataGrid>
<Modal v-model="editModal" title="编辑" footer-hide width="800"> <Modal v-model="editModal" title="编辑" footer-hide width="800">
<Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" /> <Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "../../aps/api"; import Api from "../../aps/api";
import Edit from "./edit"; import Edit from "./edit";
...@@ -29,7 +18,9 @@ export default { ...@@ -29,7 +18,9 @@ export default {
Add Add
}, },
props: { props: {
rowId: { type: Number } rowId: {
type: Number
}
}, },
data() { data() {
return { return {
...@@ -47,8 +38,10 @@ export default { ...@@ -47,8 +38,10 @@ export default {
curId: 0, curId: 0,
gridHeight: 150, gridHeight: 150,
size: "small", size: "small",
columns: [ columns: [{
{ title: " ", width: 130 }, title: " ",
width: 130
},
{ {
key: "task_seq", key: "task_seq",
title: this.l("task_seq"), title: this.l("task_seq"),
...@@ -109,7 +102,14 @@ export default { ...@@ -109,7 +102,14 @@ export default {
hide: true hide: true
}, },
{ {
key: "first_equip", key: "equip_type",
title: this.l("equip_type"),
align: "left",
easy: true,
high: true
},
{
key: "firsT_EQUIP_CODE",
title: this.l("first_equip"), title: this.l("first_equip"),
align: "left", align: "left",
easy: true, easy: true,
...@@ -282,7 +282,9 @@ export default { ...@@ -282,7 +282,9 @@ export default {
width: 140, width: 140,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", {
class: "action"
}, [
h("op", { h("op", {
attrs: { attrs: {
icon: "md-create", icon: "md-create",
...@@ -290,7 +292,9 @@ export default { ...@@ -290,7 +292,9 @@ export default {
title: "編輯工序", title: "編輯工序",
oprate: "edit" oprate: "edit"
}, },
on: { click: () => this.edit(params.row) } on: {
click: () => this.edit(params.row)
}
}), }),
h("op", { h("op", {
attrs: { attrs: {
...@@ -300,7 +304,9 @@ export default { ...@@ -300,7 +304,9 @@ export default {
oprate: "delete", oprate: "delete",
msg: "确认要刪除工序吗?" msg: "确认要刪除工序吗?"
}, },
on: { click: () => this.remove(params.row, params.index) } on: {
click: () => this.remove(params.row, params.index)
}
}) })
]); ]);
} }
...@@ -323,7 +329,10 @@ export default { ...@@ -323,7 +329,10 @@ export default {
mounted() { mounted() {
this.loadData(this.rowId); this.loadData(this.rowId);
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
...@@ -385,6 +394,7 @@ export default { ...@@ -385,6 +394,7 @@ export default {
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
.excute table tr th span, .excute table tr th span,
.excute table tr td { .excute table tr td {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem label="首选资源" prop="resourceType"> <FormItem label="首选资源" prop="resource">
<ResourceSelectCode v-model="entity.resource" @on-change="resourceChange"></ResourceSelectCode> <ResourceSelectCode v-model="entity.resource" @on-change="resourceChange"></ResourceSelectCode>
</FormItem> </FormItem>
</Col> </Col>
...@@ -51,10 +51,11 @@ export default { ...@@ -51,10 +51,11 @@ export default {
message: "必填", message: "必填",
trigger: "blur" trigger: "blur"
}], }],
resourceType: [{ resource: [{
required: true, required: true,
message: "请选择首选资源", message: "请选择首选资源",
trigger: "change", trigger: "change",
type: 'array'
}, ], }, ],
}, },
single: false single: false
...@@ -69,10 +70,10 @@ export default { ...@@ -69,10 +70,10 @@ export default {
} }
}, },
methods: { methods: {
load(v) { // load(v) {
this.entity = v; // this.entity = v;
}, // },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(v => { this.$refs.form.validate(v => {
if (v) { if (v) {
...@@ -135,9 +136,9 @@ export default { ...@@ -135,9 +136,9 @@ export default {
this.entity.resourceCode = v[1]; this.entity.resourceCode = v[1];
this.entity.resourceId = items[1].id; this.entity.resourceId = items[1].id;
if (v != null && v.length > 0) { if (v != null && v.length > 0) {
this.rules.resourceType[0].required = false; this.rules.resource[0].required = false;
} else { } else {
this.rules.resourceType[0].required = true; this.rules.resource[0].required = true;
} }
}, },
l(key) { l(key) {
...@@ -160,7 +161,6 @@ export default { ...@@ -160,7 +161,6 @@ export default {
this.entity.resourceCode = v.first_equip; this.entity.resourceCode = v.first_equip;
let code = v.first_equip; let code = v.first_equip;
this.entity.resource = [] this.entity.resource = []
//let code = 'PCZYBZBH_20200804_1'
if (code && code != '') { if (code && code != '') {
this.resources.forEach(e => { this.resources.forEach(e => {
if (e.code == code) { if (e.code == code) {
......
...@@ -211,8 +211,7 @@ export default { ...@@ -211,8 +211,7 @@ export default {
title: this.l("equip_type"), title: this.l("equip_type"),
align: "left", align: "left",
easy: true, easy: true,
high: true, high: true
hide: true
}, },
{ {
key: "first_equip", key: "first_equip",
...@@ -470,8 +469,8 @@ export default { ...@@ -470,8 +469,8 @@ export default {
//编辑工序start---- //编辑工序start----
edit(row) { edit(row) {
this.editModal = true;
this.rowData = row; this.rowData = row;
this.editModal = true;
}, },
//编辑工序end---- //编辑工序end----
......
...@@ -39,9 +39,9 @@ ...@@ -39,9 +39,9 @@
</Row> </Row>
<div class="fa">产品名称:{{ li.productName }}</div> <div class="fa">产品名称:{{ li.productName }}</div>
<div class="time-s">产品数量:{{ li.quantity }}</div> <div class="time-s">产品数量:{{ li.quantity }}</div>
<!-- <div class="time-s"> <div class="time-s">
<span>工序:{{li.drawnNumber}}</span> <span>工序:{{ li.drawnNumber }}</span>
</div> --> </div>
<div class="time-s"> <div class="time-s">
{{ li.demandFinishDate }} ~ {{ li.demandStartDate }} {{ li.demandFinishDate }} ~ {{ li.demandStartDate }}
</div> </div>
...@@ -68,14 +68,33 @@ ...@@ -68,14 +68,33 @@
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem v-if="formItem.radio == 0"> <FormItem v-if="formItem.radio == 0">
<UserSelect v-model="user" :multiple="true" /> <UserSelect v-model="user" :multiple="true" :type="2" />
</FormItem> </FormItem>
<FormItem label="班组" v-if="formItem.radio == 1"> <FormItem label="班组" v-if="formItem.radio == 1">
<DepartmentSelect <Select
:type="1" v-model="formItem.shopId"
placeholder="请选择"
style="width: 300px"
>
<Option
v-for="(item, index) in listClass"
:key="index"
:value="item.value"
:label="item.label"
style="display: none"
></Option>
<Tree
key="mytree"
:data="workShop"
ref="mytree"
:render="renderContent"
></Tree>
</Select>
<!-- <DepartmentSelect
:type="2"
v-model="formItem.shopId" v-model="formItem.shopId"
style="width: 350px" style="width: 350px"
/> /> -->
</FormItem> </FormItem>
<FormItem label="备注"> <FormItem label="备注">
<Input <Input
...@@ -105,7 +124,8 @@ export default { ...@@ -105,7 +124,8 @@ export default {
data() { data() {
return { return {
list: [], list: [],
workShop: [],
listClass: [],
status: "0", //全部排产-1,0为未排产;2为已排查; status: "0", //全部排产-1,0为未排产;2为已排查;
formItem: { formItem: {
radio: "0", radio: "0",
...@@ -126,6 +146,7 @@ export default { ...@@ -126,6 +146,7 @@ export default {
}, },
created() { created() {
this.orderlist(0); this.orderlist(0);
this.getWorkshop();
}, },
methods: { methods: {
viewClose() { viewClose() {
...@@ -252,7 +273,42 @@ export default { ...@@ -252,7 +273,42 @@ export default {
}, },
}); });
}, },
// closeTag() {} //部门(班组)
getWorkshop() {
let url = `${systemUrl}/department/getdepartmentsbyproterty`;
this.$api.get(url, { Property: 2 }).then((r) => {
if (r.result) {
this.workShop = r.result;
}
});
},
renderContent(h, { root, node, data }) {
//渲染树的样式
return h(
"span",
{
style: {
cursor: "pointer",
},
on: {
click: () => {
this.handleSelect(data); //手动选择树节点
},
},
},
data.name
);
},
handleSelect(data) {
let obj = {
label: data.name,
value: data.id,
};
this.listClass = [];
this.listClass.push(obj);
this.formItem.shopId = this.listClass[0].value;
this.formItem.shopName = this.listClass[0].label;
},
}, },
}; };
</script> </script>
......
<template> <template>
<div class="h100 table-content1"> <div class="h100 table-content1">
<p class="mb10"> <p class="mb10">
订单编号:{{mesCodes}} 订单编号:{{ mesCodes }}
<span class="ml20">产品名称:{{productNames}}</span> <span class="ml20">产品名称:{{ productNames }}</span>
<span class="ml20">生产数量:{{counts}}</span> <span class="ml20">生产数量:{{ counts }}</span>
<span class="fr mr20" v-if="false"> <span class="fr mr20" v-if="false">
<a href="javascript:;">出库单</a> <a href="javascript:;">出库单</a>
</span> </span>
...@@ -12,58 +12,120 @@ ...@@ -12,58 +12,120 @@
</span> </span>
</p> </p>
<div class="mb70" v-for="(item,i) in datas" :key="i"> <div class="mb70" v-for="(item, i) in datas" :key="i">
<p class="fwBold">{{item.routingHeader}}------{{item.routingHeaderCode}}</p> <p class="fwBold">
<Table border :columns="cols" :data="item.suport" :ref="'table'+item.routingHeaderId" class="tableCommon" @on-selection-change="selectionChange(i)" @on-select-cancel="selectListCancel" @on-select-all-cancel="selectAllCancel" @on-select="selectList" @on-select-all="selectListAll"> {{ item.routingHeader }}------{{ item.routingHeaderCode }}
</p>
<Table
border
:columns="cols"
:data="item.suport"
:ref="'table' + item.routingHeaderId"
class="tableCommon"
@on-selection-change="selectionChange(i)"
@on-select-cancel="selectListCancel"
@on-select-all-cancel="selectAllCancel"
@on-select="selectList"
@on-select-all="selectListAll"
>
<template slot-scope="{ row, index }" slot="counts"> <template slot-scope="{ row, index }" slot="counts">
<InputNumber :max="row.totalCount-row.applicationNumber" :min="0" v-model="row.count" @on-change="inputChange1(i,row,index)" :disabled="row._disabled" /> <InputNumber
:max="row.totalCount - row.applicationNumber"
:min="0"
v-model="row.count"
@on-change="inputChange1(i, row, index)"
:disabled="row._disabled"
/>
</template> </template>
<template slot-scope="{ row, index }" slot="remarks"> <template slot-scope="{ row, index }" slot="remarks">
<Input type="text" v-model="row.remark" @on-change="inputChange1(i,row,index)" :disabled="row._disabled" /> <Input
type="text"
v-model="row.remark"
@on-change="inputChange1(i, row, index)"
:disabled="row._disabled"
/>
</template> </template>
</Table> </Table>
</div> </div>
<FooterToolbar v-show="footerToolbar" class="ftball pt10"> <FooterToolbar v-show="footerToolbar" class="ftball pt10">
<!--<div class="tip">已选{{selectItems.length}}项</div>--> <!--<div class="tip">已选{{selectItems.length}}项</div>-->
<Form :model="orderForm" :inline="true" :label-width="0" ref="formValidate" :rules="ruleValidate"> <Form
:model="orderForm"
:inline="true"
:label-width="0"
ref="formValidate"
:rules="ruleValidate"
>
<FormItem prop="QuotationFinishDate"> <FormItem prop="QuotationFinishDate">
<DatePicker v-model="orderForm.QuotationFinishDate" type="date" style="color:black" placeholder="请选择齐套日期" @on-change="getTimeQuotationFD"></DatePicker> <DatePicker
v-model="orderForm.QuotationFinishDate"
type="date"
style="color: black"
placeholder="请选择齐套日期"
@on-change="getTimeQuotationFD"
></DatePicker>
</FormItem> </FormItem>
<FormItem l><Button type="primary" class="mr10 ml10" @click="application">申请配套</Button></FormItem> <FormItem l
><Button type="primary" class="mr10 ml10" @click="application"
>申请配套</Button
></FormItem
>
</Form> </Form>
</FooterToolbar> </FooterToolbar>
<Modal v-model="modalAccessoryList" :title="title" fullscreen footer-hide> <Modal v-model="modalAccessoryList" :title="title" fullscreen footer-hide>
<component :is="detailAcc" :eid="orderId" :mesCode="mesCodes" :productName="productNames" :drawnNumber="drawnNumber" :count="counts" @on-close="cancel" @on-ok="onOk" /> <component
:is="detailAcc"
:eid="orderId"
:mesCode="mesCodes"
:productName="productNames"
:drawnNumber="drawnNumber"
:count="counts"
@on-close="cancel"
@on-ok="onOk"
/>
</Modal> </Modal>
<Modal v-model="modalAccSet" title="临时设置" footer-hide width="800"> <Modal v-model="modalAccSet" title="临时设置" footer-hide width="800">
<Form :model="entity" :label-width="110" ref="formValidateSet" :rules="ruleValidate"> <Form
:model="entity"
:label-width="110"
ref="formValidateSet"
:rules="ruleValidate"
>
<Row> <Row>
<Col span="12"> <Col span="12">
<FormItem label="工序">{{entity.routingDetailName}}</FormItem> <FormItem label="工序">{{ entity.routingDetailName }}</FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="物料名">{{entity.materialName}}</FormItem> <FormItem label="物料名">{{ entity.materialName }}</FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="物料编号">{{entity.materialNumber}}</FormItem> <FormItem label="物料编号">{{ entity.materialNumber }}</FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="需求数量">{{entity.needCount}}</FormItem> <FormItem label="需求数量">{{ entity.needCount }}</FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="已申请">{{entity.applicationNumber}}</FormItem> <FormItem label="已申请">{{ entity.applicationNumber }}</FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="可再申请" prop="count"> <FormItem label="可再申请" prop="count">
<InputNumber :max="entity.needCount-entity.applicationNumber" :min="0" v-model="entity.count" /> <InputNumber
:max="entity.needCount - entity.applicationNumber"
:min="0"
v-model="entity.count"
/>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="齐套日期" prop="finishDate"> <FormItem label="齐套日期" prop="finishDate">
<DatePicker v-model="entity.finishDate" type="date" placeholder="请选择齐套日期" @on-change="getTimeFinish"></DatePicker> <DatePicker
v-model="entity.finishDate"
type="date"
placeholder="请选择齐套日期"
@on-change="getTimeFinish"
></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
<Col span="24"> <Col span="24">
...@@ -73,14 +135,16 @@ ...@@ -73,14 +135,16 @@
</Col> </Col>
<Col span="24"> <Col span="24">
<p class="fr"> <p class="fr">
<Button type="primary" class="mr10 ml10" @click="application1">申请配套</Button> <Button type="primary" class="mr10 ml10" @click="application1"
>申请配套</Button
>
<Button @click="canelSet">取消</Button> <Button @click="canelSet">取消</Button>
</p> </p>
</Col> </Col>
</Row> </Row>
</Form> </Form>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
...@@ -98,7 +162,8 @@ export default { ...@@ -98,7 +162,8 @@ export default {
curId: 0, curId: 0,
editIndex: -1, editIndex: -1,
editNum: "", editNum: "",
cols: [{ cols: [
{
type: "selection", type: "selection",
width: 70, width: 70,
align: "center", align: "center",
...@@ -148,7 +213,8 @@ export default { ...@@ -148,7 +213,8 @@ export default {
width: "120", width: "120",
render: (h, params) => { render: (h, params) => {
return h( return h(
"op", { "op",
{
attrs: { attrs: {
oprate: "detail", oprate: "detail",
}, },
...@@ -157,9 +223,9 @@ export default { ...@@ -157,9 +223,9 @@ export default {
}, },
}, },
params.row._disabled && params.row._disabled &&
params.row.totalCount - params.row.applicationNumber > 0 ? params.row.totalCount - params.row.applicationNumber > 0
"临时申请" : ? "临时申请"
"" : ""
); );
}, },
}, },
...@@ -177,22 +243,28 @@ export default { ...@@ -177,22 +243,28 @@ export default {
counts: this.count, counts: this.count,
curArr: 0, //标记当前操作工艺规程列表是否为空 curArr: 0, //标记当前操作工艺规程列表是否为空
ruleValidate: { ruleValidate: {
QuotationFinishDate: [{ QuotationFinishDate: [
{
required: true, required: true,
message: "_", message: "_",
trigger: "change", trigger: "change",
}, ], },
finishDate: [{ ],
finishDate: [
{
required: true, required: true,
message: "请选择齐套日期", message: "请选择齐套日期",
trigger: "change", trigger: "change",
}, ], },
count: [{ ],
count: [
{
required: true, required: true,
message: "请输入申请数量", message: "请输入申请数量",
type: "number", type: "number",
trigger: "change", trigger: "change",
}, ], },
],
}, },
tempList: [], tempList: [],
cRow: null, cRow: null,
...@@ -219,20 +291,18 @@ export default { ...@@ -219,20 +291,18 @@ export default {
productName: String, productName: String,
drawnNumber: String, drawnNumber: String,
count: Number, count: Number,
productingPreparationPeople: Number,
}, },
mounted() { mounted() {
this.load(this.eid); this.load(this.eid);
}, },
async fetch({ async fetch({ store, params }) {
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
load(v) { load(v) {
Api.matchdetaillist({ Api.matchdetaillist({
id: v id: v,
}).then((r) => { }).then((r) => {
if (r.success) { if (r.success) {
r.result.forEach((e) => { r.result.forEach((e) => {
...@@ -367,6 +437,7 @@ export default { ...@@ -367,6 +437,7 @@ export default {
creator: this.$store.state.userInfo.userName, creator: this.$store.state.userInfo.userName,
finishDate: this.orderForm.QuotationFinishDate, finishDate: this.orderForm.QuotationFinishDate,
orderCode: this.mesCode, orderCode: this.mesCode,
productingPreparationPeople: this.productingPreparationPeople,
}, },
items: temItems, items: temItems,
}; };
......
This diff is collapsed.
<template> <template>
<div class="result-aps"> <div class="result-aps">
<Row class="expand-row"> <Row class="expand-row">
<Col span="4"> <Col span="4">
<span class="expand-key">工序序号</span> <span class="expand-key">工序序号</span>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<span class="expand-key">计划结束时间</span> <span class="expand-key">计划结束时间</span>
</Col> </Col>
<Col span="3"> <Col span="3">
<span class="expand-key">设备编号</span> <span class="expand-key">首选资源</span>
</Col> </Col>
</Row> </Row>
<Row v-for="(item,index) in dataList" :key="item.index"> <Row v-for="(item,index) in dataList" :key="item.index">
...@@ -46,8 +46,9 @@ ...@@ -46,8 +46,9 @@
<span>{{ item.equip_id }}</span> <span>{{ item.equip_id }}</span>
</Col> </Col>
</Row> </Row>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
export default { export default {
...@@ -76,18 +77,21 @@ export default { ...@@ -76,18 +77,21 @@ export default {
} }
}; };
</script> </script>
<style lang='less'>
<style lang="less">
.result-aps { .result-aps {
.expand-row { .expand-row {
text-align: center; text-align: center;
margin: 5px 0; margin: 5px 0;
font-weight: bold; font-weight: bold;
} }
.expand-value { .expand-value {
text-align: center; text-align: center;
margin: 3px 0; margin: 3px 0;
} }
} }
td.ivu-table-expanded-cell { td.ivu-table-expanded-cell {
padding: 0 !important; padding: 0 !important;
} }
......
...@@ -409,6 +409,7 @@ export default { ...@@ -409,6 +409,7 @@ export default {
Api.fltwostepschedule(data).then((r) => { Api.fltwostepschedule(data).then((r) => {
if (r.result) { if (r.result) {
this.$Message.success("下发成功"); this.$Message.success("下发成功");
this.result = [];
this.orderlist(this.status); this.orderlist(this.status);
} else { } else {
this.$Message.info("下发失败"); this.$Message.info("下发失败");
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
style="width:300px" style="width:300px"
:multiple="true" :multiple="true"
/>--> />-->
<UserSelect v-model="formItem.userIds" :multiple="true" /> <UserSelect v-model="formItem.userIds" :multiple="true" :type="2"/>
</FormItem> </FormItem>
<FormItem label="班组" v-if="mode==2" prop="shopId"> <FormItem label="班组" v-if="mode==2" prop="shopId">
<Select v-model="formItem.shopId" placeholder="请选择" style="width:300px"> <Select v-model="formItem.shopId" placeholder="请选择" style="width:300px">
...@@ -145,8 +145,8 @@ export default { ...@@ -145,8 +145,8 @@ export default {
closeTag() {}, closeTag() {},
//部门(班组) //部门(班组)
getWorkshop() { getWorkshop() {
let url = `${systemUrl}/user/userdepartmentsofworkshop`; let url = `${systemUrl}/department/getdepartmentsbyproterty`;
this.$api.get(url).then(r => { this.$api.get(url,{Property:2}).then(r => {
if (r.result) { if (r.result) {
this.workShop = r.result; this.workShop = r.result;
} }
...@@ -166,13 +166,13 @@ export default { ...@@ -166,13 +166,13 @@ export default {
} }
} }
}, },
data.title data.name
); );
}, },
handleSelect(data) { handleSelect(data) {
let obj = { let obj = {
label: data.title, label: data.name,
value: data.value value: data.id
}; };
this.listClass = []; this.listClass = [];
this.listClass.push(obj); this.listClass.push(obj);
......
<template> <template>
<div style="padding:30px 0"> <div style="padding:30px 0">
<Detail :idVal="detailId" /> <Detail :idVal="detailId" />
<Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" @node-click="show"/> <Process ref="userProcess" :idVal="detailId" :resulstInfo="testObj" @node-click="show" />
<!-- <Footer :idVal="detailId" :footerStatu="footerStatu" @showModalCheckOk='modalCheckOk=true'></Footer> --> <!-- <Footer :idVal="detailId" :footerStatu="footerStatu" @showModalCheckOk='modalCheckOk=true'></Footer> -->
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;"> <div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
<Form <Form :model="formMyCheck" :label-width="100" :rules="ruleValidate" inline ref="formValidate">
:model="formMyCheck"
:label-width="100"
:rules="ruleValidate"
inline
ref="formValidate"
>
<Row> <Row>
<Col span="18"> <Col span="18">
<FormItem label="审批意见:"> <FormItem label="审批意见:">
...@@ -20,44 +14,20 @@ ...@@ -20,44 +14,20 @@
<Radio label="终止"></Radio> <Radio label="终止"></Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem <FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
label="驳回节点:" <Select style="width:200px" clearable transfer placeholder="请选择驳回节点" v-model="formMyCheck.rejectToNodeId">
v-if="formMyCheck.radioSp === '驳回'"
prop="rejectToNodeId"
>
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.rejectToNodeId"
>
<Option value class="option-text">请选择驳回节点</Option> <Option value class="option-text">请选择驳回节点</Option>
<Option <Option v-for="(item, index) in nodeList" :value="item.value" :label="item.label" :key="index" :disabled="item.statu > 0 ? false : true"></Option>
v-for="(item, index) in nodeList"
:value="item.value"
:label="item.label"
:key="index"
:disabled="item.statu > 0 ? false : true"
></Option>
</Select> </Select>
<RadioGroup type="button" size="small" @on-change="changeToNode"> <RadioGroup type="button" size="small" @on-change="changeToNode">
<Radio label="1">上一节点</Radio> <Radio label="1">上一节点</Radio>
<Radio label="2">第一节点</Radio> <Radio label="2">第一节点</Radio>
</RadioGroup> </RadioGroup>
</FormItem> </FormItem>
<FormItem <FormItem label="原因:" v-if="
label="原因:"
v-if="
formMyCheck.radioSp === '驳回' || formMyCheck.radioSp === '终止' formMyCheck.radioSp === '驳回' || formMyCheck.radioSp === '终止'
" " prop="comment">
prop="comment" <Input v-model="formMyCheck.comment" style="width:400px;margin-left:10px" placeholder="请输入原因" />
>
<Input
v-model="formMyCheck.comment"
style="width:400px;margin-left:10px"
placeholder="请输入原因"
/>
</FormItem> </FormItem>
</Col> </Col>
<Col span="6" style="text-align:right;padding-right:40px"> <Col span="6" style="text-align:right;padding-right:40px">
...@@ -66,33 +36,18 @@ ...@@ -66,33 +36,18 @@
</Row> </Row>
</Form> </Form>
</div> </div>
<!-- 订单审里通过form --> <!-- 订单审核通过form -->
<Modal <Modal v-model="modalCheckOk" title="订单审核" width="800" :scrollable="true">
v-model="modalCheckOk" <Form :model="formMyCheck" :label-width="100" v-if="false">
title="订单审里"
width="800"
:scrollable="true"
>
<Form :model="formMyCheck" :label-width="100">
<Row> <Row>
<Col span="12"> <Col span="12">
<FormItem label="工时:" style="width:100%"> <FormItem label="工时:" style="width:100%">
<InputNumber <InputNumber v-model="formMyCheck.workHours" :step="1" :min="2" style="width:240px" />
v-model="formMyCheck.workHours"
:step="1"
:min="2"
style="width:240px"
/>
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="打印周期:" style="width:100%"> <FormItem label="打印周期:" style="width:100%">
<InputNumber <InputNumber v-model="formMyCheck.printPeriod" :step="1" :min="2" style="width:240px" />
v-model="formMyCheck.printPeriod"
:step="1"
:min="2"
style="width:240px"
/>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -109,17 +64,17 @@ ...@@ -109,17 +64,17 @@
</Col> </Col>
</Row> </Row>
</Form> </Form>
<br />
<h4>
您确定 <span class="new-red">通过</span> 此订单审批?
</h4>
<br />
<div slot="footer"> <div slot="footer">
<Button @click="modalCheckOk = false">取消</Button> <Button @click="modalCheckOk = false">取消</Button>
<Button type="primary" @click="checkOk" v-show="footerStatue">确定</Button> <Button type="primary" @click="checkOk" v-show="footerStatue">确定</Button>
</div> </div>
</Modal> </Modal>
<Modal <Modal v-model="modalCheckNo" title="订单审批" width="800" :scrollable="true">
v-model="modalCheckNo"
title="订单审批"
width="800"
:scrollable="true"
>
<br /> <br />
<h4> <h4>
您确定 <span class="new-red">{{ statuTitle }}</span> 此订单审批? 您确定 <span class="new-red">{{ statuTitle }}</span> 此订单审批?
...@@ -130,8 +85,9 @@ ...@@ -130,8 +85,9 @@
<Button type="primary" @click="checkFalse">确定</Button> <Button type="primary" @click="checkFalse">确定</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from '../api' import Api from '../api'
import Detail from './detail' import Detail from './detail'
...@@ -156,7 +112,7 @@ export default { ...@@ -156,7 +112,7 @@ export default {
rejectToNodeId: null rejectToNodeId: null
}, },
modalCheckOk: false, modalCheckOk: false,
footerStatue:true, footerStatue: true,
modalCheckNo: false, modalCheckNo: false,
detailId: null, detailId: null,
statuTitle: '', statuTitle: '',
...@@ -173,31 +129,30 @@ export default { ...@@ -173,31 +129,30 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {}, testObj: {},
ruleValidate: { ruleValidate: {
rejectToNodeId: [ rejectToNodeId: [{
{
required: true, required: true,
message: '请选择驳回节点', message: '请选择驳回节点',
type: 'number', type: 'number',
trigger: 'change' trigger: 'change'
} }],
], comment: [{
comment: [
{
required: true, required: true,
message: '请输入原因', message: '请输入原因',
trigger: 'blur' trigger: 'blur'
} }]
]
} }
} }
}, },
props: {}, props: {},
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch('loadDictionary') // 加载数据字典
// await store.dispatch("loadUsers");//加载缓存的用户 // await store.dispatch("loadUsers");//加载缓存的用户
}, },
created() { created() {
this.currentUserId=this.$store.state.userInfo.userId this.currentUserId = this.$store.state.userInfo.userId
this.detailId = this.$http.common.getquerystring('id') this.detailId = this.$http.common.getquerystring('id')
this.footerStatu = this.$http.common.getquerystring('statu') this.footerStatu = this.$http.common.getquerystring('statu')
this.getDetailInfos(this.detailId) this.getDetailInfos(this.detailId)
...@@ -205,31 +160,29 @@ export default { ...@@ -205,31 +160,29 @@ export default {
methods: { methods: {
nextCheckOk() { nextCheckOk() {
if (this.formMyCheck.radioSp == '通过') { if (this.formMyCheck.radioSp == '通过') {
this.footerStatue=true this.footerStatue = true
this.modalCheckOk = true this.modalCheckOk = true
} else if (this.formMyCheck.radioSp == '驳回') { } else if (this.formMyCheck.radioSp == '驳回') {
this.$refs['formValidate'].validate((valid) => { this.$refs['formValidate'].validate((valid) => {
if (valid) { if (valid) {
this.modalCheckNo = true this.modalCheckNo = true
this.statuTitle = '驳回' this.statuTitle = '驳回'
} else { } else {}
}
}) })
} else { } else {
this.$refs['formValidate'].validate((valid) => { this.$refs['formValidate'].validate((valid) => {
if (valid) { if (valid) {
this.modalCheckNo = true this.modalCheckNo = true
this.statuTitle = '终止' this.statuTitle = '终止'
} else { } else {}
}
}) })
} }
}, },
show(a){ show(a) {
this.footerStatue=false this.footerStatue = false
let contextDate=JSON.parse(a.contextData) let contextDate = JSON.parse(a.contextData)
this.formMyCheck=contextDate this.formMyCheck = contextDate
this.modalCheckOk=true this.modalCheckOk = true
}, },
getDetailInfos(idVal) { getDetailInfos(idVal) {
...@@ -241,8 +194,8 @@ export default { ...@@ -241,8 +194,8 @@ export default {
this.testObj = r this.testObj = r
if (r.success) { if (r.success) {
this.currentNodeID = r.result.currentNodeId this.currentNodeID = r.result.currentNodeId
this.passId=r.result.currentRecordId this.passId = r.result.currentRecordId
this.nextNodeUserIdList=this.$refs.userProcess.immutData//获取下一节点的审核人 this.nextNodeUserIdList = this.$refs.userProcess.immutData //获取下一节点的审核人
this.getNodes(r.result.nodes) this.getNodes(r.result.nodes)
} else { } else {
this.$Message.error('加载失败') this.$Message.error('加载失败')
...@@ -301,12 +254,13 @@ export default { ...@@ -301,12 +254,13 @@ export default {
id: this.passId, id: this.passId,
comment: '', comment: '',
nextOperationIdList: this.nextNodeUserIdList, nextOperationIdList: this.nextNodeUserIdList,
data: { data: null,
workHours: this.formMyCheck.workHours, // {
printPeriod: this.formMyCheck.printPeriod, // workHours: this.formMyCheck.workHours,
equipment: this.formMyCheck.equipment, // printPeriod: this.formMyCheck.printPeriod,
materialWeight: this.formMyCheck.materialWeight // equipment: this.formMyCheck.equipment,
} // materialWeight: this.formMyCheck.materialWeight
//}
} }
Api.pass(param).then((r) => { Api.pass(param).then((r) => {
if (r.success) { if (r.success) {
......
<template> <template>
<div class="pdf-detail table-detail"> <div class="pdf-detail table-detail">
<div class="cerioficate-pdf-detail"> <div class="cerioficate-pdf-detail">
<div class="bian-hao">产品合格证编号:{{results.serialNumber}}</div> <div class="bian-hao">产品合格证编号:{{ results.serialNumber }}</div>
<div class="body-d"> <div class="body-d">
<Row class="row-border right-border"> <Row class="row-border right-border">
<Col :span="4" class="col-border">用户单位</Col> <Col :span="4" class="col-border">用户单位</Col>
<Col :span="20" class="col-border">{{results.userUnit}}</Col> <Col :span="20" class="col-border">{{ results.userUnit }}</Col>
</Row> </Row>
<Row class="row-border right-border"> <Row class="row-border right-border">
<Col :span="4" class="col-border">任务依据</Col> <Col :span="4" class="col-border">任务依据</Col>
<Col :span="20" class="col-border">{{results.taskBased}}</Col> <Col :span="20" class="col-border">{{ results.taskBased }}</Col>
</Row> </Row>
<Row class="row-border right-border"> <Row class="row-border right-border">
<Col :span="4" class="col-border">产品名称</Col> <Col :span="4" class="col-border">产品名称</Col>
<Col :span="8" class="col-border">{{results.productName}}</Col> <Col :span="8" class="col-border">{{ results.productName }}</Col>
<Col :span="4" class="col-border">产品状态</Col> <!-- <Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">{{results.productStatus}}</Col> <Col :span="8" class="col-border">{{results.productStatus}}</Col> -->
</Row> </Row>
<Row class="row-border right-border"> <Row class="row-border right-border">
<Col :span="4" class="col-border">产品编号</Col> <Col :span="4" class="col-border">产品编号</Col>
<Col :span="8" class="col-border">{{results.productSerialNumber}}</Col> <Col :span="8" class="col-border">{{
results.productSerialNumber
}}</Col>
<Col :span="4" class="col-border">原材料批号</Col> <Col :span="4" class="col-border">原材料批号</Col>
<Col :span="8" class="col-border">{{results.materialSerialNumber}}</Col> <Col :span="8" class="col-border">{{
results.materialSerialNumber
}}</Col>
</Row> </Row>
<Row class="row-border right-border"> <Row class="row-border right-border">
<Col :span="4" class="col-border">原材料编号</Col> <Col :span="4" class="col-border">原材料编号</Col>
<Col :span="8" class="col-border">{{results.materialCode}}</Col> <Col :span="8" class="col-border">{{ results.materialCode }}</Col>
<Col :span="4" class="col-border">产品代号(图号)</Col> <Col :span="4" class="col-border">产品代号(图号)</Col>
<Col :span="8" class="col-border">{{results.productCode}}</Col> <Col :span="8" class="col-border">{{ results.productCode }}</Col>
</Row> </Row>
<Row class="row-border right-border"> <Row class="row-border right-border">
<Col :span="4" class="col-border">原材料合格证编号</Col> <Col :span="4" class="col-border">原材料合格证编号</Col>
<Col :span="8" class="col-border">{{results.materialCertificationNumber}}</Col> <Col :span="8" class="col-border">{{
results.materialCertificationNumber
}}</Col>
<Col :span="4" class="col-border">数量</Col> <Col :span="4" class="col-border">数量</Col>
<Col :span="8" class="col-border">{{results.productQuantity}}</Col> <Col :span="8" class="col-border">{{ results.productQuantity }}</Col>
</Row> </Row>
<!-- <Row class="row-border right-border"> <!-- <Row class="row-border right-border">
<Col :span="4" class="col-border">增材制造批次号</Col> <Col :span="4" class="col-border">增材制造批次号</Col>
...@@ -50,73 +56,84 @@ ...@@ -50,73 +56,84 @@
<Col :span="5" class="col-border">结论</Col> <Col :span="5" class="col-border">结论</Col>
<Col :span="5" class="col-border">备注</Col> <Col :span="5" class="col-border">备注</Col>
</Row> </Row>
<Row class="row-border right-border" v-for="(item,index) in results.items" :key="index"> <Row
<Col :span="1" class="col-border">{{index+1}}</Col> class="row-border right-border"
<Col :span="5" class="col-border">{{item.name}}</Col> v-for="(item, index) in results.items"
<Col :span="5" class="col-border">{{item.require}}</Col> :key="index"
<Col :span="3" class="col-border">{{item.result}}</Col> >
<Col :span="5" class="col-border">{{item.conclusion}}</Col> <Col :span="1" class="col-border">{{ index + 1 }}</Col>
<Col :span="5" class="col-border">{{item.remark}}</Col> <Col :span="5" class="col-border">{{ item.name }}</Col>
<Col :span="5" class="col-border">{{ item.require }}</Col>
<Col :span="3" class="col-border">{{ item.result }}</Col>
<Col :span="5" class="col-border">{{ item.conclusion }}</Col>
<Col :span="5" class="col-border">{{ item.remark }}</Col>
</Row> </Row>
<Row class="row-border right-border"> <Row class="row-border right-border">
<Col :span="4" class="col-border">结论</Col> <Col :span="4" class="col-border">结论</Col>
<Col :span="20" class="col-border">{{results.conclusion}}</Col> <Col :span="20" class="col-border">{{ results.conclusion }}</Col>
</Row> </Row>
<Row class="row-border right-border bottom-border"> <Row class="row-border right-border bottom-border">
<Col :span="4" class="col-border">检验员 / 时间</Col> <Col :span="4" class="col-border">检验员 / 时间</Col>
<Col :span="8" class="col-border">{{results.examUser}} {{results.examDate}}</Col> <Col :span="8" class="col-border">
<User :value="parseInt(results.examUser)" />&nbsp;{{
results.examDate
}}</Col
>
<Col :span="4" class="col-border">批准人 / 时间</Col> <Col :span="4" class="col-border">批准人 / 时间</Col>
<Col :span="8" class="col-border">{{results.approveUser}} {{results.approveDate}}</Col> <Col :span="8" class="col-border">
<User :value="parseInt(results.approveUser)" />&nbsp;
{{ results.approveDate }}</Col
>
</Row> </Row>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Api from '../api' import Api from "../api";
export default { export default {
name: 'detail', name: "detail",
components: {}, components: {},
props: { props: {
idVal: { idVal: {
type: String, type: String,
default: '' default: "",
} },
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
data() { data() {
return { return {
results: { results: {
state: '' state: "",
} },
} };
}, },
created() { created() {
this.dataImmut = [] this.dataImmut = [];
this.dataMut = [] this.dataMut = [];
Api.get({ Id: this.idVal }).then((r) => { Api.get({ Id: this.idVal }).then((r) => {
if (r.success) { if (r.success) {
this.results = JSON.parse(r.result.formData) this.results = JSON.parse(r.result.formData);
// let formStr = r.result.formData.replace(/\"/g, '"') // let formStr = r.result.formData.replace(/\"/g, '"')
// this.results = JSON.parse(formStr)[0] // this.results = JSON.parse(formStr)[0]
} else { } else {
this.$Message.error('加载失败') this.$Message.error("加载失败");
} }
}) });
}, },
methods: { methods: {
load(v) {}, load(v) {},
l(key) { l(key) {
key = 'waitOpened' + '.' + key key = "waitOpened" + "." + key;
return this.$t(key) return this.$t(key);
}
}, },
watch: {} },
} watch: {},
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdf-detail { .pdf-detail {
......
This diff is collapsed.
...@@ -69,36 +69,36 @@ export default { ...@@ -69,36 +69,36 @@ export default {
{ {
key: "code", key: "code",
title: this.l("code"), title: this.l("code"),
align: "left", align: "center",
easy: true, easy: true,
high: true, high: true,
}, },
{ key: "total", title: this.l("total"), high: true }, { key: "total", title: this.l("total"), high: true, align: "center" },
{ {
key: "nowTotal", key: "nowTotal",
title: this.l("nowTotal"), title: this.l("nowTotal"),
align: "center",
high: true,
},
{ key: "batch", title: this.l("batch"), align: "left", high: true },
{
key: "certificateOfApproval",
title: this.l("certificateOfApproval"),
align: "left",
high: true, high: true,
}, },
{ // { key: "batch", title: this.l("batch"), align: "left", high: true },
key: "unitPrice", // {
title: this.l("unitPrice"), // key: "certificateOfApproval",
// title: this.l("certificateOfApproval"),
// align: "left",
// high: true,
// },
// {
// key: "unitPrice",
// title: this.l("unitPrice"),
high: true, // high: true,
}, // },
{ // {
key: "originalManufacturer", // key: "originalManufacturer",
title: this.l("originalManufacturer"), // title: this.l("originalManufacturer"),
align: "left", // align: "left",
high: true, // high: true,
}, // },
{ {
key: "creationTime", key: "creationTime",
title: this.l("creationTime"), title: this.l("creationTime"),
...@@ -108,7 +108,7 @@ export default { ...@@ -108,7 +108,7 @@ export default {
{ {
key: "creator", key: "creator",
title: this.l("creatorUserId"), title: this.l("creatorUserId"),
align: "left", align: "center",
high: true, high: true,
}, },
{ {
......
<template> <template>
<div> <div>
<Form ref="form" :model="entity" :rules="rules" :label-width="90"> <Form ref="form" :model="entity" :label-width="90">
<Row> <Row>
<Col :span="12"> <Col :span="12">
<FormItem label="名称" prop="name"> <FormItem label="名称" prop="name" :rules="{required: true, message: '必填', trigger: 'blur'}">
<Input v-model="entity.name" placeholder="请输入"></Input> <Input v-model="entity.name" placeholder="请输入"></Input>
</FormItem> </FormItem>
</Col> </Col>
...@@ -37,7 +37,9 @@ ...@@ -37,7 +37,9 @@
</div> </div>
<Row> <Row>
<Col v-for="li in fileds" :key="li.field" :span="li.span"> <Col v-for="li in fileds" :key="li.field" :span="li.span">
<FormItem :label="li.title" :prop="li.name"> <!-- type: li.dataType==1?'number':li.dataType==4?'date':'string' -->
<!-- :rules="li.required?{required: true, message: '必填', trigger: 'blur', }:''" -->
<FormItem :label="li.title" :prop="li.field" >
<Input v-if="li.dataType==0" v-model="entity[li.field]"></Input> <Input v-if="li.dataType==0" v-model="entity[li.field]"></Input>
<InputNumber <InputNumber
v-if="li.dataType==1||li.dataType==2" v-if="li.dataType==1||li.dataType==2"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -61,6 +61,11 @@ ...@@ -61,6 +61,11 @@
<dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel"></dictionary> <dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel"></dictionary>
</FormItem> </FormItem>
</Col> </Col>
<Col span="8">
<FormItem :label="l('productionType')" style="width:100%" prop="productionType">
<dictionary style="width:240px" code="plan.order.productionType" v-model="orderSearchForm.productionType"></dictionary>
</FormItem>
</Col>
<Col span="24"> <Col span="24">
<FormItem :label="l('taskRequire')" style="width:100%"> <FormItem :label="l('taskRequire')" style="width:100%">
<Input v-model="orderSearchForm.taskRequire" placeholder /> <Input v-model="orderSearchForm.taskRequire" placeholder />
...@@ -163,15 +168,16 @@ export default { ...@@ -163,15 +168,16 @@ export default {
.then((r) => { .then((r) => {
if (r.success) { if (r.success) {
this.$Message.success("保存成功"); this.$Message.success("保存成功");
//this.resetFields()
this.$emit("on-ok"); this.$emit("on-ok");
} else { } else {
this.$Message.error("保存失败"); this.$Message.error("保存失败");
} }
}) })
.catch((err) => { // .catch((err) => {
this.$Message.error("保存失败"); // this.$Message.error("保存失败");
console.warn(err); // console.warn(err);
}); // });
} }
}); });
}, },
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index: `${PlanUrl}/orderexecutenew/paged_img`, index: `${PlanUrl}/orderexecutenew/Paged_Img_RoutingDetail`,
paged(params) { paged(params) {
return Api.post(`${PlanUrl}/orderexecutenew/paged_img`, params); return Api.post(`${PlanUrl}/orderexecutenew/Paged_Img_RoutingDetail`, params);
}, },
getCardList(params) { getCardList(params) {
return Api.post(`${PlanUrl}/orderexecutenew/list`, params); return Api.post(`${PlanUrl}/orderexecutenew/list`, params);
......
This diff is collapsed.
This diff is collapsed.
...@@ -89,11 +89,12 @@ ...@@ -89,11 +89,12 @@
} }
.img_box { .img_box {
text-align: center; text-align: center;
margin: auto;
line-height: 350px; line-height: 350px;
font-size: 32px; font-size: 32px;
width: 750px; width: 750px;
height: 350px; height: 350px;
background: #ddd; // background: #ddd;
margin: 10px 0 0 170px; margin: 10px 0 0 170px;
} }
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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