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 {
div::-webkit-scrollbar-corner {
background: @scrollbar-corner-bg-color;
}
.ivu-date-picker{
display: block;
width: 100%;
}
/*flex*/
.flex {
display: flex;
......@@ -1094,7 +1097,6 @@ html [type=button] {
background: #1890FF;
color: #fff;
}
background: transparent;
}
......@@ -1105,48 +1107,32 @@ html [type=button] {
a.add {
color: #249E91;
}
// a.add:hover {
// // color: #27AB9D;
// }
a.edit {
// color: #32B187;
color: rgb(6, 147, 212)
}
// a.edit:hover {
// color: #35BD90
// }
a.remove,
a.delete {
color: #FF7A8B;
i:hover {
background: #FF7A8B;
background: orange;
color: #fff;
}
}
a.delete {
color: #FF7A8B;
}
a.empower {
color: #FFBD59;
}
a.disable {
color: #CAD1D9;
.ivu-drawer-wrap{
z-index: 5000;
}
a.icon {
display: inline-block;
width: 28px;
height: 28px;
line-height: 28px;
margin: 0px 0 0 0;
width: 22px;
height: 22px;
line-height: 22px;
margin: 0px 5px 0 0;
border-radius: 50%;
color: #515A6E;
background: #F5F6FA;
......@@ -1155,16 +1141,13 @@ html [type=button] {
font-size: 18px;
}
}
// a.icon:hover {
// background: #27AB9D;
// color: #fff;
// }
// a.icon:active {
// background: #229185;
// color: #fff;
// }
a.disable {
color: #CAD1D9;
cursor:not-allowed;
i:hover {
background:transparent;
}
}
}
......@@ -1313,7 +1296,7 @@ html [type=button] {
left: 0;
text-align: center;
padding: 20px 0;
background: #08080894;
background: #080808;
div {
height: 25px;
......
//-------------蓝色-----------
@Theme: rgba(38, 128, 235, 1);
//滚动条颜色
@scrollbar-track-bg-color: rgb(239, 239, 239);
@scrollbar-thumb-bg-color: rgba(38, 128, 235, 0.5);
......
......@@ -386,7 +386,7 @@ export default {
// }
// });
this.columnsCur = items;
console.log("cur", items,this.columnsCur);
// console.log("cur", items,this.columnsCur);
},
//数据加载
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 {
},
value: {
type: String,
default: '2001-01-01 00:00:00'
default: ''
},
},
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>
<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">
<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>
</slot>
</a>
</Tooltip>
<a class="op" v-else :class="css" @click="handler">
<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>
</slot>
</a>
......@@ -38,12 +44,20 @@ export default {
},
color: {
type: String
}
},
disable: {
type: Boolean,
default: false
},
},
data() {
return {
text: "",
css: "detail"
css: "detail",
colors: this.color,
titles: this.title,
disabled:false,
};
},
created() {
......@@ -63,9 +77,18 @@ export default {
} else if (this.type == "icon") {
this.css = "icon";
}
},
mounted() {
if (this.disable) {
this.colors = "#ccc";
this.titles = ''
}
},
methods: {
handler() {
if (this.disable == 0) {
if (this.oprate == "delete" || this.oprate == "remove") {
this.$Modal.confirm({
title: this.title,
......@@ -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>
......
<template>
<div class="img-p">
<img :src="downUrl + src" />
</div>
</template>
<script>
export default {
......@@ -24,3 +26,8 @@ export default {
},
};
</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>
<div class="ib">
<div class="ib" @click="showLife">
<div class="ib" v-if="!isMore">
<span v-if="type=='text'" :style="style">{{name}}</span>
<Tag v-if="type=='tag'" :color="tagcolor">{{name}}</Tag>
<Badge v-if="type=='dot'" :color="tagcolor" :text="name" />
<Icon v-if="type=='icon'" :type="item.icon" :color="tagcolor" :title="name" size="24" />
<span v-if="type == 'text'" :style="style">{{ name }}</span>
<Tag v-if="type == 'tag'" :color="tagcolor">{{ name }}</Tag>
<Badge v-if="type == 'dot'" :color="tagcolor" :text="name" />
<Icon
v-if="type == 'icon'"
:type="item.icon"
:color="tagcolor"
:title="name"
:size="size"
/>
</div>
<div class="ib" v-else v-for="(li,i) in items" :key="i">
<span v-if="type=='text'" :style="li.style">{{li.name}}</span>
<Tag v-if="type=='tag'" :color="li.tagcolor">{{li.name}}</Tag>
<Badge v-if="type=='dot'" :color="li.tagcolor" :text="li.name" />&nbsp;
<div class="ib" v-else v-for="(li, i) in items" :key="i">
<span v-if="type == 'text'" :style="li.style">{{ li.name }}</span>
<Tag v-if="type == 'tag'" :color="li.tagcolor">{{ li.name }}</Tag>
<Badge v-if="type == 'dot'" :color="li.tagcolor" :text="li.name" />&nbsp;
</div>
<Modal
v-model="modal"
title="生命周期"
width="1200"
footer-hide
:mask-closable="false"
>
<component :is="detail" :code="code" :value="value" :mode="mode" />
</Modal>
</div>
</template>
<script>
......@@ -18,45 +33,52 @@ export default {
name: "state",
data() {
return {
mode: "0",
name: "",
isMore: false,
modal: false,
item: {},
items: [],
data: []
data: [],
detail: null,
};
},
props: {
default: {
type: String,
default: ""
default: "",
},
type: {
type: String,
default: "text",
validator: function(value) {
validator: function (value) {
return ["text", "tag", "dot", "icon"].indexOf(value) != -1;
}
},
},
code: {
type: String,
required: true
required: true,
},
value: {
type: [String, Number],
required: false
required: false,
},
color: {
type: Boolean,
default: true
default: true,
},
size: {
type: Number,
default: 24,
},
icon: {
type: Boolean,
default: false
default: false,
},
img: {
type: Boolean,
default: false
}
default: false,
},
},
created() {
this.data = this.$store.getters.dictionaryByKey(this.code) || [];
......@@ -65,7 +87,7 @@ export default {
setName(v) {
if ((v + "").indexOf(",") == -1) {
var item;
this.data.map(u => {
this.data.map((u) => {
if (u.code == v) {
item = u;
}
......@@ -75,7 +97,7 @@ export default {
this.item = item;
} else {
if (this.value == "undefined") {
this.name = ' '
this.name = " ";
} else {
this.name = this.value;
}
......@@ -84,7 +106,7 @@ export default {
this.isMore = true;
var items = [];
var ul = (v + "").split(",");
this.data.map(u => {
this.data.map((u) => {
if (ul.indexOf(u.code) > -1) {
u.tagcolor = u.color | "default";
u.style = { color: u.color | "inherit" };
......@@ -93,7 +115,11 @@ export default {
});
this.items = items;
}
}
},
showLife() {
this.modal = true;
this.detail = () => import("./life");
},
},
computed: {
tagcolor() {
......@@ -115,9 +141,9 @@ export default {
color:
this.item && this.item.color != "" && this.item.color != null
? this.item.color
: "inherit"
: "inherit",
};
}
},
},
watch: {
value(v) {
......@@ -129,7 +155,7 @@ export default {
this.setName(this.value);
this.$forceUpdate();
}
}
}
},
},
};
</script>
\ No newline at end of file
......@@ -19,13 +19,19 @@
</div>
<div class="fg">
<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>
</template>
<script>
import { forEach } from "lodash";
export default {
name: "",
data() {
......@@ -64,7 +70,24 @@ export default {
},
"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() {
......@@ -124,6 +147,7 @@ export default {
let items = this.$u.clone(this.list);
let expand = this.expand;
let result = [];
search(this.keys, items);
function search(keys, data) {
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>
<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">
<Avatar v-if="user.face" size="large" :src="img"></Avatar>
<Avatar
......@@ -31,6 +33,13 @@ export default {
type: [Number, String],
default: 0,
},
mode:{
type:String,
default:"text",
validator:(v)=>{
return ["text","face"].indexOf(v)>-1
}
}
},
data() {
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 {
// pageIndex: 1,
departmentId: id,
type: this.type,
roleTitle: this.roleTitle,
roleTitle: this.roleTitle, //检验
// pageSize: 0
};
if (this.type == 99) { //开发组
......
This diff is collapsed.
......@@ -2,30 +2,48 @@ import XLSX from 'xlsx';
import Api from '@/plugins/request'
let henq = {};
let pdfInfo = ''
henq.clone = (obj) => {
henq.clone = (data)=> {
var that = henq
var o
if (typeof obj === 'object') {
if (obj === null) {
o = null
const t = that.type(data);
let o;
let i;
let ni;
if (t === "array") {
o = [];
} else if (t === "object") {
o = {};
} else {
if (obj instanceof Array) {
o = []
for (var i = 0, len = obj.length; i < len; i++) {
o.push(that.clone(obj[i]))
return data;
}
} else {
o = {}
for (var j in obj) {
o[j] = that.clone(obj[j])
if (t === "array") {
for (i = 0, ni = data.length; i < ni; i++) {
o.push(that.clone(data[i]));
}
return o;
}
if (t === "object") {
for (i in data) {
o[i] = that.clone(data[i]);
}
} else {
o = obj
return o;
}
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 = () => {
Object.assign(argments)
}
......@@ -524,9 +542,7 @@ henq.makeRules = (list, apiUrl) => {
required: true,
trigger: "blur"
}
}
else if (el.ruleType == 'datetime')
{
} else if (el.ruleType == 'datetime') {
objInfo = {
required: true,
message: "请选择时间",
......@@ -552,4 +568,62 @@ henq.makeRules = (list, apiUrl) => {
return rules
}
//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;
<template>
<div style="padding: 0;" class="excute">
<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>
<div style="padding: 0;" class="excute">
<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">
<Edit :row="rowData" @on-close="cancel" @on-option-ok="addOk" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "../../aps/api";
import Edit from "./edit";
......@@ -29,7 +18,9 @@ export default {
Add
},
props: {
rowId: { type: Number }
rowId: {
type: Number
}
},
data() {
return {
......@@ -47,8 +38,10 @@ export default {
curId: 0,
gridHeight: 150,
size: "small",
columns: [
{ title: " ", width: 130 },
columns: [{
title: " ",
width: 130
},
{
key: "task_seq",
title: this.l("task_seq"),
......@@ -109,7 +102,14 @@ export default {
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"),
align: "left",
easy: true,
......@@ -282,7 +282,9 @@ export default {
width: 140,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h("op", {
attrs: {
icon: "md-create",
......@@ -290,7 +292,9 @@ export default {
title: "編輯工序",
oprate: "edit"
},
on: { click: () => this.edit(params.row) }
on: {
click: () => this.edit(params.row)
}
}),
h("op", {
attrs: {
......@@ -300,7 +304,9 @@ export default {
oprate: "delete",
msg: "确认要刪除工序吗?"
},
on: { click: () => this.remove(params.row, params.index) }
on: {
click: () => this.remove(params.row, params.index)
}
})
]);
}
......@@ -323,7 +329,10 @@ export default {
mounted() {
this.loadData(this.rowId);
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -385,6 +394,7 @@ export default {
}
};
</script>
<style lang="less">
.excute table tr th span,
.excute table tr td {
......
......@@ -13,7 +13,7 @@
</FormItem>
</Col>
<Col :span="12">
<FormItem label="首选资源" prop="resourceType">
<FormItem label="首选资源" prop="resource">
<ResourceSelectCode v-model="entity.resource" @on-change="resourceChange"></ResourceSelectCode>
</FormItem>
</Col>
......@@ -51,10 +51,11 @@ export default {
message: "必填",
trigger: "blur"
}],
resourceType: [{
resource: [{
required: true,
message: "请选择首选资源",
trigger: "change",
type: 'array'
}, ],
},
single: false
......@@ -69,10 +70,10 @@ export default {
}
},
methods: {
load(v) {
this.entity = v;
// load(v) {
// this.entity = v;
},
// },
handleSubmit() {
this.$refs.form.validate(v => {
if (v) {
......@@ -135,9 +136,9 @@ export default {
this.entity.resourceCode = v[1];
this.entity.resourceId = items[1].id;
if (v != null && v.length > 0) {
this.rules.resourceType[0].required = false;
this.rules.resource[0].required = false;
} else {
this.rules.resourceType[0].required = true;
this.rules.resource[0].required = true;
}
},
l(key) {
......@@ -160,7 +161,6 @@ export default {
this.entity.resourceCode = v.first_equip;
let code = v.first_equip;
this.entity.resource = []
//let code = 'PCZYBZBH_20200804_1'
if (code && code != '') {
this.resources.forEach(e => {
if (e.code == code) {
......
......@@ -211,8 +211,7 @@ export default {
title: this.l("equip_type"),
align: "left",
easy: true,
high: true,
hide: true
high: true
},
{
key: "first_equip",
......@@ -470,8 +469,8 @@ export default {
//编辑工序start----
edit(row) {
this.editModal = true;
this.rowData = row;
this.editModal = true;
},
//编辑工序end----
......
......@@ -39,9 +39,9 @@
</Row>
<div class="fa">产品名称:{{ li.productName }}</div>
<div class="time-s">产品数量:{{ li.quantity }}</div>
<!-- <div class="time-s">
<span>工序:{{li.drawnNumber}}</span>
</div> -->
<div class="time-s">
<span>工序:{{ li.drawnNumber }}</span>
</div>
<div class="time-s">
{{ li.demandFinishDate }} ~ {{ li.demandStartDate }}
</div>
......@@ -68,14 +68,33 @@
</RadioGroup>
</FormItem>
<FormItem v-if="formItem.radio == 0">
<UserSelect v-model="user" :multiple="true" />
<UserSelect v-model="user" :multiple="true" :type="2" />
</FormItem>
<FormItem label="班组" v-if="formItem.radio == 1">
<DepartmentSelect
:type="1"
<Select
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"
style="width: 350px"
/>
/> -->
</FormItem>
<FormItem label="备注">
<Input
......@@ -105,7 +124,8 @@ export default {
data() {
return {
list: [],
workShop: [],
listClass: [],
status: "0", //全部排产-1,0为未排产;2为已排查;
formItem: {
radio: "0",
......@@ -126,6 +146,7 @@ export default {
},
created() {
this.orderlist(0);
this.getWorkshop();
},
methods: {
viewClose() {
......@@ -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>
......
<template>
<div class="h100 table-content1">
<div class="h100 table-content1">
<p class="mb10">
订单编号:{{mesCodes}}
<span class="ml20">产品名称:{{productNames}}</span>
<span class="ml20">生产数量:{{counts}}</span>
订单编号:{{ mesCodes }}
<span class="ml20">产品名称:{{ productNames }}</span>
<span class="ml20">生产数量:{{ counts }}</span>
<span class="fr mr20" v-if="false">
<a href="javascript:;">出库单</a>
</span>
......@@ -12,58 +12,120 @@
</span>
</p>
<div class="mb70" v-for="(item,i) in datas" :key="i">
<p class="fwBold">{{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">
<div class="mb70" v-for="(item, i) in datas" :key="i">
<p class="fwBold">
{{ 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">
<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 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>
</Table>
</div>
<FooterToolbar v-show="footerToolbar" class="ftball pt10">
<!--<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">
<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 l><Button type="primary" class="mr10 ml10" @click="application">申请配套</Button></FormItem>
<FormItem l
><Button type="primary" class="mr10 ml10" @click="application"
>申请配套</Button
></FormItem
>
</Form>
</FooterToolbar>
<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 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>
<Col span="12">
<FormItem label="工序">{{entity.routingDetailName}}</FormItem>
<FormItem label="工序">{{ entity.routingDetailName }}</FormItem>
</Col>
<Col span="12">
<FormItem label="物料名">{{entity.materialName}}</FormItem>
<FormItem label="物料名">{{ entity.materialName }}</FormItem>
</Col>
<Col span="12">
<FormItem label="物料编号">{{entity.materialNumber}}</FormItem>
<FormItem label="物料编号">{{ entity.materialNumber }}</FormItem>
</Col>
<Col span="12">
<FormItem label="需求数量">{{entity.needCount}}</FormItem>
<FormItem label="需求数量">{{ entity.needCount }}</FormItem>
</Col>
<Col span="12">
<FormItem label="已申请">{{entity.applicationNumber}}</FormItem>
<FormItem label="已申请">{{ entity.applicationNumber }}</FormItem>
</Col>
<Col span="12">
<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>
</Col>
<Col span="12">
<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>
</Col>
<Col span="24">
......@@ -73,14 +135,16 @@
</Col>
<Col span="24">
<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>
</p>
</Col>
</Row>
</Form>
</Modal>
</div>
</div>
</template>
<script>
......@@ -98,7 +162,8 @@ export default {
curId: 0,
editIndex: -1,
editNum: "",
cols: [{
cols: [
{
type: "selection",
width: 70,
align: "center",
......@@ -148,7 +213,8 @@ export default {
width: "120",
render: (h, params) => {
return h(
"op", {
"op",
{
attrs: {
oprate: "detail",
},
......@@ -157,9 +223,9 @@ export default {
},
},
params.row._disabled &&
params.row.totalCount - params.row.applicationNumber > 0 ?
"临时申请" :
""
params.row.totalCount - params.row.applicationNumber > 0
? "临时申请"
: ""
);
},
},
......@@ -177,22 +243,28 @@ export default {
counts: this.count,
curArr: 0, //标记当前操作工艺规程列表是否为空
ruleValidate: {
QuotationFinishDate: [{
QuotationFinishDate: [
{
required: true,
message: "_",
trigger: "change",
}, ],
finishDate: [{
},
],
finishDate: [
{
required: true,
message: "请选择齐套日期",
trigger: "change",
}, ],
count: [{
},
],
count: [
{
required: true,
message: "请输入申请数量",
type: "number",
trigger: "change",
}, ],
},
],
},
tempList: [],
cRow: null,
......@@ -219,20 +291,18 @@ export default {
productName: String,
drawnNumber: String,
count: Number,
productingPreparationPeople: Number,
},
mounted() {
this.load(this.eid);
},
async fetch({
store,
params
}) {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
load(v) {
Api.matchdetaillist({
id: v
id: v,
}).then((r) => {
if (r.success) {
r.result.forEach((e) => {
......@@ -367,6 +437,7 @@ export default {
creator: this.$store.state.userInfo.userName,
finishDate: this.orderForm.QuotationFinishDate,
orderCode: this.mesCode,
productingPreparationPeople: this.productingPreparationPeople,
},
items: temItems,
};
......
This diff is collapsed.
<template>
<div class="result-aps">
<div class="result-aps">
<Row class="expand-row">
<Col span="4">
<span class="expand-key">工序序号</span>
......@@ -20,7 +20,7 @@
<span class="expand-key">计划结束时间</span>
</Col>
<Col span="3">
<span class="expand-key">设备编号</span>
<span class="expand-key">首选资源</span>
</Col>
</Row>
<Row v-for="(item,index) in dataList" :key="item.index">
......@@ -46,8 +46,9 @@
<span>{{ item.equip_id }}</span>
</Col>
</Row>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
......@@ -76,18 +77,21 @@ export default {
}
};
</script>
<style lang='less'>
<style lang="less">
.result-aps {
.expand-row {
text-align: center;
margin: 5px 0;
font-weight: bold;
}
.expand-value {
text-align: center;
margin: 3px 0;
}
}
td.ivu-table-expanded-cell {
padding: 0 !important;
}
......
......@@ -409,6 +409,7 @@ export default {
Api.fltwostepschedule(data).then((r) => {
if (r.result) {
this.$Message.success("下发成功");
this.result = [];
this.orderlist(this.status);
} else {
this.$Message.info("下发失败");
......
......@@ -24,7 +24,7 @@
style="width:300px"
:multiple="true"
/>-->
<UserSelect v-model="formItem.userIds" :multiple="true" />
<UserSelect v-model="formItem.userIds" :multiple="true" :type="2"/>
</FormItem>
<FormItem label="班组" v-if="mode==2" prop="shopId">
<Select v-model="formItem.shopId" placeholder="请选择" style="width:300px">
......@@ -145,8 +145,8 @@ export default {
closeTag() {},
//部门(班组)
getWorkshop() {
let url = `${systemUrl}/user/userdepartmentsofworkshop`;
this.$api.get(url).then(r => {
let url = `${systemUrl}/department/getdepartmentsbyproterty`;
this.$api.get(url,{Property:2}).then(r => {
if (r.result) {
this.workShop = r.result;
}
......@@ -166,13 +166,13 @@ export default {
}
}
},
data.title
data.name
);
},
handleSelect(data) {
let obj = {
label: data.title,
value: data.value
label: data.name,
value: data.id
};
this.listClass = [];
this.listClass.push(obj);
......
<template>
<div style="padding:30px 0">
<div style="padding:30px 0">
<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> -->
<div class="footers" v-if="footerStatu === '2'" style="text-align:left;">
<Form
:model="formMyCheck"
:label-width="100"
:rules="ruleValidate"
inline
ref="formValidate"
>
<Form :model="formMyCheck" :label-width="100" :rules="ruleValidate" inline ref="formValidate">
<Row>
<Col span="18">
<FormItem label="审批意见:">
......@@ -20,44 +14,20 @@
<Radio label="终止"></Radio>
</RadioGroup>
</FormItem>
<FormItem
label="驳回节点:"
v-if="formMyCheck.radioSp === '驳回'"
prop="rejectToNodeId"
>
<Select
style="width:200px"
clearable
transfer
placeholder="请选择驳回节点"
v-model="formMyCheck.rejectToNodeId"
>
<FormItem label="驳回节点:" v-if="formMyCheck.radioSp === '驳回'" prop="rejectToNodeId">
<Select style="width:200px" clearable transfer placeholder="请选择驳回节点" v-model="formMyCheck.rejectToNodeId">
<Option value class="option-text">请选择驳回节点</Option>
<Option
v-for="(item, index) in nodeList"
:value="item.value"
:label="item.label"
:key="index"
:disabled="item.statu > 0 ? false : true"
></Option>
<Option v-for="(item, index) in nodeList" :value="item.value" :label="item.label" :key="index" :disabled="item.statu > 0 ? false : true"></Option>
</Select>
<RadioGroup type="button" size="small" @on-change="changeToNode">
<Radio label="1">上一节点</Radio>
<Radio label="2">第一节点</Radio>
</RadioGroup>
</FormItem>
<FormItem
label="原因:"
v-if="
<FormItem label="原因:" v-if="
formMyCheck.radioSp === '驳回' || formMyCheck.radioSp === '终止'
"
prop="comment"
>
<Input
v-model="formMyCheck.comment"
style="width:400px;margin-left:10px"
placeholder="请输入原因"
/>
" prop="comment">
<Input v-model="formMyCheck.comment" style="width:400px;margin-left:10px" placeholder="请输入原因" />
</FormItem>
</Col>
<Col span="6" style="text-align:right;padding-right:40px">
......@@ -66,33 +36,18 @@
</Row>
</Form>
</div>
<!-- 订单审里通过form -->
<Modal
v-model="modalCheckOk"
title="订单审里"
width="800"
:scrollable="true"
>
<Form :model="formMyCheck" :label-width="100">
<!-- 订单审核通过form -->
<Modal v-model="modalCheckOk" title="订单审核" width="800" :scrollable="true">
<Form :model="formMyCheck" :label-width="100" v-if="false">
<Row>
<Col span="12">
<FormItem label="工时:" style="width:100%">
<InputNumber
v-model="formMyCheck.workHours"
:step="1"
:min="2"
style="width:240px"
/>
<InputNumber v-model="formMyCheck.workHours" :step="1" :min="2" style="width:240px" />
</FormItem>
</Col>
<Col span="12">
<FormItem label="打印周期:" style="width:100%">
<InputNumber
v-model="formMyCheck.printPeriod"
:step="1"
:min="2"
style="width:240px"
/>
<InputNumber v-model="formMyCheck.printPeriod" :step="1" :min="2" style="width:240px" />
</FormItem>
</Col>
</Row>
......@@ -109,17 +64,17 @@
</Col>
</Row>
</Form>
<br />
<h4>
您确定 <span class="new-red">通过</span> 此订单审批?
</h4>
<br />
<div slot="footer">
<Button @click="modalCheckOk = false">取消</Button>
<Button type="primary" @click="checkOk" v-show="footerStatue">确定</Button>
</div>
</Modal>
<Modal
v-model="modalCheckNo"
title="订单审批"
width="800"
:scrollable="true"
>
<Modal v-model="modalCheckNo" title="订单审批" width="800" :scrollable="true">
<br />
<h4>
您确定 <span class="new-red">{{ statuTitle }}</span> 此订单审批?
......@@ -130,8 +85,9 @@
<Button type="primary" @click="checkFalse">确定</Button>
</div>
</Modal>
</div>
</div>
</template>
<script>
import Api from '../api'
import Detail from './detail'
......@@ -156,7 +112,7 @@ export default {
rejectToNodeId: null
},
modalCheckOk: false,
footerStatue:true,
footerStatue: true,
modalCheckNo: false,
detailId: null,
statuTitle: '',
......@@ -173,31 +129,30 @@ export default {
nextNodeUserIdList: [], //通过时提交的下一个节点UserId
testObj: {},
ruleValidate: {
rejectToNodeId: [
{
rejectToNodeId: [{
required: true,
message: '请选择驳回节点',
type: 'number',
trigger: 'change'
}
],
comment: [
{
}],
comment: [{
required: true,
message: '请输入原因',
trigger: 'blur'
}
]
}]
}
}
},
props: {},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
// await store.dispatch("loadUsers");//加载缓存的用户
},
created() {
this.currentUserId=this.$store.state.userInfo.userId
this.currentUserId = this.$store.state.userInfo.userId
this.detailId = this.$http.common.getquerystring('id')
this.footerStatu = this.$http.common.getquerystring('statu')
this.getDetailInfos(this.detailId)
......@@ -205,31 +160,29 @@ export default {
methods: {
nextCheckOk() {
if (this.formMyCheck.radioSp == '通过') {
this.footerStatue=true
this.footerStatue = true
this.modalCheckOk = true
} else if (this.formMyCheck.radioSp == '驳回') {
this.$refs['formValidate'].validate((valid) => {
if (valid) {
this.modalCheckNo = true
this.statuTitle = '驳回'
} else {
}
} else {}
})
} else {
this.$refs['formValidate'].validate((valid) => {
if (valid) {
this.modalCheckNo = true
this.statuTitle = '终止'
} else {
}
} else {}
})
}
},
show(a){
this.footerStatue=false
let contextDate=JSON.parse(a.contextData)
this.formMyCheck=contextDate
this.modalCheckOk=true
show(a) {
this.footerStatue = false
let contextDate = JSON.parse(a.contextData)
this.formMyCheck = contextDate
this.modalCheckOk = true
},
getDetailInfos(idVal) {
......@@ -241,8 +194,8 @@ export default {
this.testObj = r
if (r.success) {
this.currentNodeID = r.result.currentNodeId
this.passId=r.result.currentRecordId
this.nextNodeUserIdList=this.$refs.userProcess.immutData//获取下一节点的审核人
this.passId = r.result.currentRecordId
this.nextNodeUserIdList = this.$refs.userProcess.immutData //获取下一节点的审核人
this.getNodes(r.result.nodes)
} else {
this.$Message.error('加载失败')
......@@ -301,12 +254,13 @@ export default {
id: this.passId,
comment: '',
nextOperationIdList: this.nextNodeUserIdList,
data: {
workHours: this.formMyCheck.workHours,
printPeriod: this.formMyCheck.printPeriod,
equipment: this.formMyCheck.equipment,
materialWeight: this.formMyCheck.materialWeight
}
data: null,
// {
// workHours: this.formMyCheck.workHours,
// printPeriod: this.formMyCheck.printPeriod,
// equipment: this.formMyCheck.equipment,
// materialWeight: this.formMyCheck.materialWeight
//}
}
Api.pass(param).then((r) => {
if (r.success) {
......
<template>
<div class="pdf-detail table-detail">
<div class="cerioficate-pdf-detail">
<div class="bian-hao">产品合格证编号:{{results.serialNumber}}</div>
<div class="bian-hao">产品合格证编号:{{ results.serialNumber }}</div>
<div class="body-d">
<Row class="row-border right-border">
<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 class="row-border right-border">
<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 class="row-border right-border">
<Col :span="4" class="col-border">产品名称</Col>
<Col :span="8" class="col-border">{{results.productName}}</Col>
<Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">{{results.productStatus}}</Col>
<Col :span="8" class="col-border">{{ results.productName }}</Col>
<!-- <Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">{{results.productStatus}}</Col> -->
</Row>
<Row class="row-border right-border">
<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="8" class="col-border">{{results.materialSerialNumber}}</Col>
<Col :span="8" class="col-border">{{
results.materialSerialNumber
}}</Col>
</Row>
<Row class="row-border right-border">
<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="8" class="col-border">{{results.productCode}}</Col>
<Col :span="8" class="col-border">{{ results.productCode }}</Col>
</Row>
<Row class="row-border right-border">
<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="8" class="col-border">{{results.productQuantity}}</Col>
<Col :span="8" class="col-border">{{ results.productQuantity }}</Col>
</Row>
<!-- <Row class="row-border right-border">
<Col :span="4" class="col-border">增材制造批次号</Col>
......@@ -50,73 +56,84 @@
<Col :span="5" class="col-border">结论</Col>
<Col :span="5" class="col-border">备注</Col>
</Row>
<Row class="row-border right-border" v-for="(item,index) in results.items" :key="index">
<Col :span="1" class="col-border">{{index+1}}</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
class="row-border right-border"
v-for="(item, index) in results.items"
:key="index"
>
<Col :span="1" class="col-border">{{ index + 1 }}</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 class="row-border right-border">
<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 class="row-border right-border bottom-border">
<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="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>
</div>
</div>
</div>
</template>
<script>
import Api from '../api'
import Api from "../api";
export default {
name: 'detail',
name: "detail",
components: {},
props: {
idVal: {
type: String,
default: ''
}
default: "",
},
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
results: {
state: ''
}
}
state: "",
},
};
},
created() {
this.dataImmut = []
this.dataMut = []
this.dataImmut = [];
this.dataMut = [];
Api.get({ Id: this.idVal }).then((r) => {
if (r.success) {
this.results = JSON.parse(r.result.formData)
this.results = JSON.parse(r.result.formData);
// let formStr = r.result.formData.replace(/\"/g, '"')
// this.results = JSON.parse(formStr)[0]
} else {
this.$Message.error('加载失败')
this.$Message.error("加载失败");
}
})
});
},
methods: {
load(v) {},
l(key) {
key = 'waitOpened' + '.' + key
return this.$t(key)
}
key = "waitOpened" + "." + key;
return this.$t(key);
},
watch: {}
}
},
watch: {},
};
</script>
<style lang="less" scoped>
.pdf-detail {
......
This diff is collapsed.
......@@ -69,36 +69,36 @@ export default {
{
key: "code",
title: this.l("code"),
align: "left",
align: "center",
easy: true,
high: true,
},
{ key: "total", title: this.l("total"), high: true },
{ key: "total", title: this.l("total"), high: true, align: "center" },
{
key: "nowTotal",
title: this.l("nowTotal"),
high: true,
},
{ key: "batch", title: this.l("batch"), align: "left", high: true },
{
key: "certificateOfApproval",
title: this.l("certificateOfApproval"),
align: "left",
align: "center",
high: true,
},
{
key: "unitPrice",
title: this.l("unitPrice"),
// { key: "batch", title: this.l("batch"), align: "left", high: true },
// {
// key: "certificateOfApproval",
// title: this.l("certificateOfApproval"),
// align: "left",
// high: true,
// },
// {
// key: "unitPrice",
// title: this.l("unitPrice"),
high: true,
},
{
key: "originalManufacturer",
title: this.l("originalManufacturer"),
align: "left",
high: true,
},
// high: true,
// },
// {
// key: "originalManufacturer",
// title: this.l("originalManufacturer"),
// align: "left",
// high: true,
// },
{
key: "creationTime",
title: this.l("creationTime"),
......@@ -108,7 +108,7 @@ export default {
{
key: "creator",
title: this.l("creatorUserId"),
align: "left",
align: "center",
high: true,
},
{
......
<template>
<div>
<Form ref="form" :model="entity" :rules="rules" :label-width="90">
<Form ref="form" :model="entity" :label-width="90">
<Row>
<Col :span="12">
<FormItem label="名称" prop="name">
<FormItem label="名称" prop="name" :rules="{required: true, message: '必填', trigger: 'blur'}">
<Input v-model="entity.name" placeholder="请输入"></Input>
</FormItem>
</Col>
......@@ -37,7 +37,9 @@
</div>
<Row>
<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>
<InputNumber
v-if="li.dataType==1||li.dataType==2"
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -61,6 +61,11 @@
<dictionary style="width:240px" code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel"></dictionary>
</FormItem>
</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">
<FormItem :label="l('taskRequire')" style="width:100%">
<Input v-model="orderSearchForm.taskRequire" placeholder />
......@@ -163,15 +168,16 @@ export default {
.then((r) => {
if (r.success) {
this.$Message.success("保存成功");
//this.resetFields()
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.$Message.error("保存失败");
console.warn(err);
});
// .catch((err) => {
// this.$Message.error("保存失败");
// 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'
export default {
index: `${PlanUrl}/orderexecutenew/paged_img`,
index: `${PlanUrl}/orderexecutenew/Paged_Img_RoutingDetail`,
paged(params) {
return Api.post(`${PlanUrl}/orderexecutenew/paged_img`, params);
return Api.post(`${PlanUrl}/orderexecutenew/Paged_Img_RoutingDetail`, params);
},
getCardList(params) {
return Api.post(`${PlanUrl}/orderexecutenew/list`, params);
......
This diff is collapsed.
This diff is collapsed.
......@@ -89,11 +89,12 @@
}
.img_box {
text-align: center;
margin: auto;
line-height: 350px;
font-size: 32px;
width: 750px;
height: 350px;
background: #ddd;
// background: #ddd;
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