Commit 8986812c authored by 周远喜's avatar 周远喜

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

parents 0fee44df c44f2790
<template>
<div class="flex fd tree-menu">
<h3>
任务结构
<div class="fr mr10 mt10">
<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"></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup>
</div>
</h3>
<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: []
};
},
props: {
curId: {
type: String,
default: '',
},
},
created() {
this.loadTree();
},
methods: {
loadTree() {
let params = {
conditions: [{
fieldName: "projectId",
fieldValue: this.curId,
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
}) {
// let type = "md-folder";
// if (data.isProduct != 0) {
// type = "ios-image";
// }
return h("div", [
h("state", {
props: {
code: "mes.project_plan.Type",
type: "icon",
value: data.type + ""
}
}),
h(
"span", {
style: {
// color: data.isProduct == 0 ? "#000" : "rgba(38, 128, 235, 1)"
}
},
data.title
),
h("state", {
props: {
code: "mes.project_plan.Status",
type: "text",
value: data.status
}
}),
]);
},
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.loadTree();
}
},
},
};
</script>
<style lang="less">
@import "../../assets/css/custom.less";
.tree-menu {
h3 {
height: 50px;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 50px;
color: @left-tree-header-color;
background: @left-tree-header-bg-color;
opacity: 1;
padding-left: 10px;
}
.search {
height: 50px;
padding: 5px 10px;
}
.fg {
flex: none;
// height:0;
overflow: auto;
padding-left: 10px;
}
.tree {
height: calc(100vh - 215px);
overflow: auto;
}
}
</style>
...@@ -373,6 +373,7 @@ export default { ...@@ -373,6 +373,7 @@ export default {
showAi: false, showAi: false,
showAll: false, showAll: false,
showRun: false, showRun: false,
isPrescheduleStatu: 0,
}; };
}, },
mounted() { mounted() {
...@@ -402,10 +403,14 @@ export default { ...@@ -402,10 +403,14 @@ export default {
let statueArry = []; let statueArry = [];
let tempmesCodeList = []; let tempmesCodeList = [];
this.resultsStatusArr = []; this.resultsStatusArr = [];
this.isPrescheduleStatu = 0
value.forEach((data) => { value.forEach((data) => {
var that = this; var that = this;
statueArry.push(data.id); statueArry.push(data.id);
this.resultsStatusArr.push(data.mainRoutingSetStatus); this.resultsStatusArr.push(data.mainRoutingSetStatus);
if (data.isPreschedule == 2) {
this.isPrescheduleStatu = 2
}
tempmesCodeList.push(data.mesCode); tempmesCodeList.push(data.mesCode);
}); });
...@@ -463,7 +468,7 @@ export default { ...@@ -463,7 +468,7 @@ export default {
this.scheduleType = null; this.scheduleType = null;
this.scheduleTypeName = ""; this.scheduleTypeName = "";
this.listBatchIds = this.listBatchIds1; this.listBatchIds = this.listBatchIds1;
if (this.scheduleStatus == 1) { if (this.scheduleStatus == 1 && this.isPrescheduleStatu != 2) {
this.scheduleModal = true; this.scheduleModal = true;
} else { } else {
this.$Message.error("所选订单里存在未派发订单!"); this.$Message.error("所选订单里存在未派发订单!");
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</template> </template>
<template slot-scope="{ row, index }" slot="note"> <template slot-scope="{ row, index }" slot="note">
<span v-if="edit != index" v-text="row.note"></span> <span v-if="edit != index" v-text="row.note"></span>
<Input v-else type="text" v-model.trim="cur.note" /> <Input v-else type="text" v-model.trim="cur.note" :disabled="true" />
</template> </template>
<template slot-scope="{ row, index }" slot="action"> <template slot-scope="{ row, index }" slot="action">
<div v-if="edit != index" class="action"> <div v-if="edit != index" class="action">
...@@ -214,6 +214,9 @@ export default { ...@@ -214,6 +214,9 @@ export default {
this.cur=this.$u.clone(row); this.cur=this.$u.clone(row);
this.edit = index this.edit = index
}, },
changeUser(val, item) {
this.cur.note = item
},
//选择权限 //选择权限
changeAuthority(val) { changeAuthority(val) {
if (this.authorityCur != 1 && this.authorityCount == 1 && val == 1) { if (this.authorityCur != 1 && this.authorityCount == 1 && val == 1) {
......
<template> <template>
<div> <div>
<Card> <Card>
<EditGrid :columns="columns" ref="grid" :items="list" <EditGrid :columns="columns" ref="grid" :items="list">
> <template slot="easySearch">
<template slot="easySearch"><Form ref="formInline" :model="easySearch" inline><FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem> <Form ref="formInline" :model="easySearch" inline>
<FormItem><Button type="primary" @click="search">查询</Button> <FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem>
</FormItem> <FormItem><Button type="primary" @click="search">查询</Button>
</Form></template> </FormItem>
<!-- <template slot="searchForm"> </Form>
</template>
<!-- <template slot="searchForm">
<Search /> <Search />
</template> --> </template> -->
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add(null)">新增</Button> <Button type="primary" @click="add(null)">新增</Button>
</template> </template>
</EditGrid> </EditGrid>
</Card> </Card>
<Modal v-model="modal" :title="title" width="1200" footer-hide> <Modal v-model="modal" :title="title" width="1200" footer-hide>
<component :is="detail" :eid="curId" :v="row" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :v="row" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Search from "./search"; import Search from "./search";
export default { export default {
name: "list", name: "list",
components: { components: {
Search, Search,
},
head: {
title: "项目计划",
author: "henq",
description: "project_plan 10/19/2020 10:23:07 AM",
},
props:{
eid:{
type:String
}, },
data:{ head: {
type:Object, title: "项目计划",
default:()=>{ author: "henq",
return { description: "project_plan 10/19/2020 10:23:07 AM",
id:"33930562-a9f7-bd95-88ab-d01eb1c4c369", },
title:"示例项目" props: {
eid: {
type: String
},
data: {
type: Object,
default: () => {
return {
id: "33930562-a9f7-bd95-88ab-d01eb1c4c369",
title: "示例项目"
}
}
} }
} },
} data() {
}, return {
data() { entity: {},
return { row: {},
entity:{}, action: Api.index,
row:{}, easySearch: {
action: Api.index, keys: {
easySearch: { op: "title",
keys: { op: "title", value: null }, value: null
}, },
modal: false, },
title: "新增", modal: false,
detail: null, title: "新增",
curId:null, detail: null,
list: [], curId: null,
columns: [ list: [],
// { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true }, columns: [
// { key:"creationTime",title:this.l("creationTime") ,align:"left" ,high:true }, // { key:"id",title:this.$t("id") ,hide:true ,align:"left" ,high:true },
// { key:"creatorUserId",title:this.l("creatorUserId") ,align:"left" ,high:true }, // { key:"creationTime",title:this.l("creationTime") ,align:"left" ,high:true },
// { key:"lastModificationTime",title:this.l("lastModificationTime") ,align:"left" ,high:true }, // { key:"creatorUserId",title:this.l("creatorUserId") ,align:"left" ,high:true },
// { key:"lastModifierUserId",title:this.l("lastModifierUserId") ,align:"left" ,high:true }, // { key:"lastModificationTime",title:this.l("lastModificationTime") ,align:"left" ,high:true },
// { key:"isDeleted",title:this.l("isDeleted") ,align:"left" ,high:true }, // { key:"lastModifierUserId",title:this.l("lastModifierUserId") ,align:"left" ,high:true },
// { key:"deletionTime",title:this.l("deletionTime") ,align:"left" ,high:true }, // { key:"isDeleted",title:this.l("isDeleted") ,align:"left" ,high:true },
// { key:"deleterUserId",title:this.l("deleterUserId") ,align:"left" ,high:true }, // { key:"deletionTime",title:this.l("deletionTime") ,align:"left" ,high:true },
// { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true }, // { key:"deleterUserId",title:this.l("deleterUserId") ,align:"left" ,high:true },
// { key:"upId",title:this.l("upId") ,align:"left" ,high:true }, // { key:"projectId",title:this.l("projectId") ,align:"left" ,high:true },
// { type: "selection", width: 80, align: "center" }, // { key:"upId",title:this.l("upId") ,align:"left" ,high:true },
{ // { type: "selection", width: 80, align: "center" },
title: "操作", {
key: "action", title: "操作",
width: 150, key: "action",
align: "center", width: 150,
// render:(h,params)=>{ align: "center",
// return h("Actions" // render:(h,params)=>{
// ,{ // return h("Actions"
// attrs:{ // ,{
// row:params, // attrs:{
// row:params,
// }, // },
// on:{ // on:{
// 'on-click':this.rowclick // 'on-click':this.rowclick
// } // }
// } // }
// ) // )
// } // }
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", {
h( class: "action"
"op", }, [
h(
"op", {
attrs: {
icon: "md-arrow-dropright-circle",
type: "icon",
title: "派发",
oprate: "edit",
},
on: {
click: () => this.copy(params.row.id)
},
},
),
h(
"op", {
attrs: {
icon: "md-add",
type: "icon",
title: "新增子任务",
oprate: "edit",
},
on: {
click: () => this.add(params.row)
},
}
),
h(
"op", {
attrs: {
icon: "md-eye",
type: "icon",
title: "编辑",
oprate: "edit",
},
on: {
click: () => this.edit(params.row.id)
},
}
),
h(
"op", {
attrs: {
icon: "ios-trash",
type: "icon",
title: "删除",
oprate: "delete",
msg: "确认要删除吗?"
},
on: {
click: () => this.remove(params.row.id)
},
}
),
]);
},
},
{ {
attrs: { icon: "md-arrow-dropright-circle", attrs: { icon: "md-arrow-dropright-circle",
type: "icon", type: "icon",
...@@ -104,19 +166,14 @@ export default { ...@@ -104,19 +166,14 @@ export default {
}, },
on: { click: () => this.copy(params.row.id) }, on: { click: () => this.copy(params.row.id) },
}, },
),
h(
"op",
{ {
attrs: { icon: "md-add", key: "title",
type: "icon", title: this.l("title"),
title: "新增子任务", align: "left",
oprate: "edit",}, tree: true,
on: { click: () => this.add(params.row) }, easy: true,
} high: true,
), },
h(
"op",
{ {
attrs: { icon: "md-create", attrs: { icon: "md-create",
type: "icon", type: "icon",
...@@ -128,163 +185,131 @@ export default { ...@@ -128,163 +185,131 @@ export default {
h( h(
"op", "op",
{ {
attrs: { icon: "ios-trash", key: "endDate",
type: "icon", title: this.l("endDate"),
title: "删除", align: "left",
oprate: "delete", high: true,
msg: "确认要删除吗?" }, type: "date"
on: { click: () => this.remove(params.row.id) }, },
// {
// key: "attachment",
// title: this.l("attachment"),
// align: "left",
// high: true,
// },
{
key: "executor",
title: this.l("executor"),
align: "left",
high: true,
type: "users",
},
],
};
},
mounted() {
console.log(this);
this.search();
},
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.search();
this.modal = false;
this.curId = null;
},
search() {
// this.$refs.grid.reload(this.easySearch);
var params = {
conditions: [{
fieldName: "projectId",
conditionalType: 'Equal',
fieldValue: this.eid
}],
// conditions: []
};
Api.list(params).then((r) => {
let res = r.result;
var data = this.$u.toTree(
res,
null,
(u) => {
// console.log(u);
u.expanded = true;
u.selected = false;
u.checked = false;
},
"upId"
);
this.list = data;
});
},
// rowclick(row,li){
// return {
// test(){
// alert(1);
// }
// }
// },
add(row) {
if (row) {
this.curId = row.id;
this.row = row
} else {
this.curId = null;
this.row = {
projectId: this.data.id,
} }
), }
]);
}, this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
}, },
{ copy(id) {
key: "type", this.curId = id;
width: 90, this.title = "克隆";
title: this.l("type"), this.detail = () => import("./add");
align: "left", this.modal = true;
high: true,
code: "mes.project_plan.Type",
}, },
{ view(id) {
key: "title", this.curId = id;
title: this.l("title"), this.title = "详情";
align: "left", this.detail = () => import("./detail");
tree: true, this.modal = true;
easy: true,
high: true,
}, },
{ edit(id) {
key: "status", this.curId = id;
title: this.l("status"), this.title = "编辑";
align: "left", this.detail = () => import("./edit");
high: true, this.modal = true;
code: "mes.project_plan.Status",
}, },
{ remove(id) {
key: "startDate", Api.delete(id).then((r) => {
title: this.l("startDate"), if (r.success) {
align: "left", this.search();
high: true this.$Message.success("删除成功");
,type:"date" }
});
}, },
{ key: "endDate", title: this.l("endDate"), align: "left", high: true,type:"date" }, cancel() {
// { this.curId = null;
// key: "attachment", this.modal = false;
// title: this.l("attachment"), },
// align: "left", l(key) {
// high: true, let vkey = "project_plan" + "." + key;
// }, return this.$t(vkey) || key;
{
key: "executor",
title: this.l("executor"),
align: "left",
high: true,
type:"users",
}, },
],
};
},
mounted() {
console.log(this);
this.search();
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.search();
this.modal = false;
this.curId = null;
},
search() {
// this.$refs.grid.reload(this.easySearch);
var params = {
conditions: [{
fieldName:"projectId",
conditionalType: 'Equal',
fieldValue:this.eid
}],
// conditions: []
};
Api.list(params).then((r) => {
let res = r.result;
var data = this.$u.toTree(
res,
null,
(u) => {
// console.log(u);
u.expanded = true;
u.selected = false;
u.checked = false;
},
"upId"
);
this.list =data;
});
},
// rowclick(row,li){
// return {
// test(){
// alert(1);
// }
// }
// },
add(row) {
if(row){
this.curId=row.id;
this.row=row
}else{
this.curId=null;
this.row={
projectId:this.data.id
}
}
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.search();
this.$Message.success("删除成功");
}
});
},
cancel() {
this.curId = null;
this.modal = false;
},
l(key) {
let vkey = "project_plan" + "." + key;
return this.$t(vkey) || key;
}, },
},
}; };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
<template> <template>
<div class=".detail-document"> <div class=".detail-document">
<div class="top-title"> <div class="top-title">
<div class="new-detail row-left"> <div class="new-detail row-left">
<Row> <Row>
<Filed :span="12" :name="l('title') + ':'">{{ entity.title }}</Filed> <Filed :span="12" :name="l('title') + ':'">{{ entity.title }}</Filed>
<Filed :span="12" :name="l('state') + ':'"> <Filed :span="12" :name="l('state') + ':'">
<state code="project.main.state" :value="entity.state" <state code="project.main.state" :value="entity.state" />
/></Filed> </Filed>
<!-- <Filed :span="12" :name="l('phase')">{{ entity.phase }}</Filed> --> <!-- <Filed :span="12" :name="l('phase')">{{ entity.phase }}</Filed> -->
<Filed :span="12" :name="l('startDate') + ':'">{{ <Filed :span="12" :name="l('startDate') + ':'">{{
entity.startDate entity.startDate
}}</Filed> }}</Filed>
<Filed :span="12" :name="l('endDate') + ':'">{{ <Filed :span="12" :name="l('endDate') + ':'">{{
entity.endDate entity.endDate
}}</Filed> }}</Filed>
</Row> </Row>
...@@ -43,66 +43,53 @@ ...@@ -43,66 +43,53 @@
</ul> </ul>
</div> </div>
<div class="body-document"> <div class="body-document">
<h4 v-text="title"></h4> <h4 v-text="title"></h4>
<keep-alive> <keep-alive>
<component v-bind:is="detail" :eid="eid" :data="entity"></component> <component v-bind:is="detail" :eid="eid" :data="entity"></component>
</keep-alive> </keep-alive>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
export default { export default {
name: "Add", name: "Add",
data() { data() {
return { return {
modal: false, modal: false,
title: "详细信息", title: "详细信息",
detail: null, detail: null,
curId: this.eid, curId: this.eid,
avatorPath: "", avatorPath: "",
entity: {}, entity: {},
rules: { rules: {
name: [{ required: true, message: "必填", trigger: "blur" }], name: [{
code: [{ required: true, message: "必填", trigger: "blur" }], required: true,
}, message: "必填",
fileds: [], trigger: "blur"
parms: { }],
app: "material", code: [{
eid: null, required: true,
name: "", message: "必填",
field: "", trigger: "blur"
}, }],
}; },
}, fileds: [],
props: ["eid"], parms: {
mounted() { app: "material",
if (this.eid) { eid: null,
this.load(this.eid); name: "",
} field: "",
this.detail = () => import("./details"); },
}, };
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
// this.$emit("on-load");
});
},
details() {
this.title = "详细信息";
this.detail = () => import("./details");
}, },
template() { props: ["eid"],
// this.curId = this.eid; mounted() {
this.title = "项目模板"; if (this.eid) {
this.detail = () => import("../plan"); this.load(this.eid);
}, }
task() { this.detail = () => import("./details");
// this.curId = this.eid;
this.title = "项目任务";
// this.detail = () => import("./add");
}, },
group() { group() {
// this.curId = this.eid; // this.curId = this.eid;
...@@ -113,74 +100,85 @@ export default { ...@@ -113,74 +100,85 @@ export default {
key = "project_main" + "." + key; key = "project_main" + "." + key;
return this.$t(key); return this.$t(key);
}, },
}, watch: {
watch: { eid(v) {
eid(v) { if (v > 0) {
if (v > 0) { this.load(v);
this.load(v); }
} },
}, },
},
}; };
</script> </script>
<style lang="less"> <style lang="less">
.top-title { .top-title {
// margin: 10px; // margin: 10px;
background: #fff; background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15); box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
position: relative; position: relative;
border-radius: 5px; border-radius: 5px;
.row-left {
width: 1100px; .row-left {
} width: 1100px;
ul { }
display: -webkit-inline-box;
display: inline-box; ul {
position: absolute; display: -webkit-inline-box;
bottom: 5px; display: inline-box;
right: 0px; position: absolute;
li { bottom: 5px;
width: 70px; right: 0px;
span {
color: #e0e0e0; li {
} width: 70px;
span {
color: #e0e0e0;
}
}
} }
}
} }
.body-document { .body-document {
margin-top: 10px;
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
border-radius: 8px;
min-height: 80vh;
h4 {
height: 50px;
line-height: 50px;
background: #515a6e;
padding: 0 10px;
color: #f5f6fa;
border-radius: 5px 5px 0 0;
}
.img-touxiang {
width: 230px;
height: 230px;
float: right;
margin-top: 10px; margin-top: 10px;
margin-right: 10px; background: #fff;
img { box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
width: 100%; border-radius: 8px;
height: 100%; min-height: 80vh;
border-radius: 5px;
h4 {
height: 50px;
line-height: 50px;
background: #515a6e;
padding: 0 10px;
color: #f5f6fa;
border-radius: 5px 5px 0 0;
}
.img-touxiang {
width: 230px;
height: 230px;
float: right;
margin-top: 10px;
margin-right: 10px;
img {
width: 100%;
height: 100%;
border-radius: 5px;
}
} }
}
.detail-d { .detail-d {
padding-left: 20px; padding-left: 20px;
.filed-d {
border-top: 1px solid #e0e0e0; .filed-d {
border-top: 1px solid #e0e0e0;
}
} }
}
} }
.detail-document { .detail-document {
background-color: #f5f7f9 !important; background-color: #f5f7f9 !important;
} }
</style> </style>
\ No newline at end of file
...@@ -81,18 +81,21 @@ export default { ...@@ -81,18 +81,21 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: Number eid: String,
pid: String,
}, },
mounted() { mounted() {
if (this.eid > 0) { // if (this.eid != '' && this.eid != null) {
this.load(this.eid); // this.load(this.eid);
} // }
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
this.disabled = true; this.disabled = true;
this.entity.projectId = this.eid;
this.entity.planId = this.pid;
this.entity.status = 0 this.entity.status = 0
Api.create(this.entity).then((r) => { Api.create(this.entity).then((r) => {
this.disabled = false; this.disabled = false;
...@@ -152,9 +155,9 @@ export default { ...@@ -152,9 +155,9 @@ export default {
this.entity = this.$u.clone(this.v) this.entity = this.$u.clone(this.v)
}, },
eid(v) { eid(v) {
if (v > 0) { //if (v != '' && v != null) {
this.load(v); // this.load(v);
} //}
} }
} }
} }
......
<template> <template>
<Layout class="full"> <Layout class="full">
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300"> <Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" /> <ProjectTaskTree :curId="projectId" @on-hide="onHide" @on-select="productSearch" />
</Sider> </Sider>
<div v-if="!showMenu" class="show_menu"> <div v-if="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开"> <a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" /> <Icon type="ios-arrow-forward" size="24" />
</a> </a>
</div> </div>
<Content class="content" :class="!showMenu ? 'con_bord' : ''"> <Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" inline>
<FormItem> <FormItem>
<div class="taskMenu"> <div class="taskMenu">
<Menu mode="horizontal" active-name="2" @on-select="onSelect"> <Menu mode="horizontal" active-name="2" @on-select="onSelect">
<MenuItem name="1"> 所有 </MenuItem> <MenuItem name="1">
<MenuItem name="2"> 未关闭 </MenuItem> 所有
<MenuItem name="3"> 指派给我 </MenuItem> </MenuItem>
<MenuItem name="4"> 由我参与 </MenuItem> <MenuItem name="2">
<MenuItem name="5"> 已延期 </MenuItem> 未关闭
<Submenu name="6"> </MenuItem>
<template slot="title"> 更多 </template> <MenuItem name="3">
<MenuGroup title="更多"> 指派给我
<MenuItem name="6-1">状态1</MenuItem> </MenuItem>
<MenuItem name="6-2">状态2</MenuItem> <MenuItem name="4">
<MenuItem name="6-3">状态3</MenuItem> 由我参与
</MenuGroup> </MenuItem>
</Submenu> <MenuItem name="5">
</Menu> 已延期
</div> </MenuItem>
<div class="taskTab" v-if="false"> <!--
<Tabs value="statu2"> <Submenu name="6">
<TabPane label="所有" name="statu1" /> <template slot="title">
<TabPane label="未关闭" name="statu2" /> 更多
<TabPane label="指派给我" name="statu3" /> </template>
<TabPane label="由我参与" name="statu4" /> <MenuGroup title="更多">
<TabPane label="已延期" name="statu5" /> <MenuItem name="6-1">状态1</MenuItem>
</Tabs> <MenuItem name="6-2">状态2</MenuItem>
</div> <MenuItem name="6-3">状态3</MenuItem>
</FormItem> </MenuGroup>
<FormItem prop="keys" </Submenu>
><Input -->
placeholder="请输入项目标题/计划名称/任务标题" </Menu>
v-model="easySearch.keys.value" </div>
v-width="240" <div class="taskTab" v-if="false">
/> <Tabs value="statu2">
</FormItem> <TabPane label="所有" name="statu1" />
<FormItem <TabPane label="未关闭" name="statu2" />
><Button type="primary" @click="search">查询</Button></FormItem <TabPane label="指派给我" name="statu3" />
> <TabPane label="由我参与" name="statu4" />
<FormItem> <TabPane label="已延期" name="statu5" />
<Button @click="highSearch" type="text"> </Tabs>
<Icon type="md-search" />高级 </div>
</Button> </FormItem>
</FormItem> <FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem>
</Form> <FormItem><Button type="primary" @click="search">查询</Button></FormItem>
</template> <FormItem>
<template slot="buttons"> <Button @click="highSearch" type="text">
<Button type="primary" @click="add">新增</Button> <Icon type="md-search" />高级
</template> </Button>
<template slot="batch"> </FormItem>
<Button type="primary" class="mr10 ml10">开始</Button> </Form>
<Button type="primary" class="mr10 ml10">暂停</Button> </template>
<Button type="primary" class="mr10 ml10">继续</Button> <template slot="buttons">
</template> <Button type="primary" @click="add">新增</Button>
</DataGrid> </template>
<Modal <template slot="batch">
v-model="modal" <Button type="primary" class="mr10 ml10">开始</Button>
:title="title" <Button type="primary" class="mr10 ml10">暂停</Button>
width="1200" <Button type="primary" class="mr10 ml10">继续</Button>
:fullscreen="fullScreen" </template>
footer-hide </DataGrid>
> <Modal v-model="modal" :title="title" width="1200" :fullscreen="fullScreen" footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :pid="planId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</Content> </Content>
</Layout> </Layout>
</template> </template>
<script> <script>
import Api from "./api"; import Api from './api'
import Search from "./search"; import Search from './search'
import ProductTree from "@/components/page/productTree.vue";
export default { export default {
name: "list", name: 'list',
components: { components: {
Search, Search,
ProductTree, },
}, head: {
head: { title: "",
title: "", author: "henq",
author: "henq", description: "project_task 10/20/2020 9:27:58 AM",
description: "project_task 10/20/2020 9:27:58 AM", },
}, data() {
data() { return {
return { action: Api.index,
action: Api.index, showMenu: true,
showMenu: true, easySearch: {
easySearch: { keys: {
keys: { op: "title",
op: "title,projectTitle,planTitle", value: null
value: null, },
projectId: {
op: "Equal",
value: ''
},
planId: {
op: "In",
value: []
}
},
theme1: 'light',
modal: false,
title: "新增",
detail: null,
curId: '',
fullScreen: false,
projectId: '',
columns: [
// {
// key: "selection",
// type: "selection",
// width: 50,
// align: "center"
// },
{
key: "id",
title: this.$t("id"),
align: "left",
high: true,
hide: true,
},
{
key: "title",
title: this.l("title"),
align: "left",
easy: true,
high: true,
render: (h, params) => {
return h('a', {
attrs: {
oprate: 'detail'
},
on: {
click: () => this.viewRecord(params.row.id)
}
}, params.row.title)
}
},
{
key: "level",
title: this.l("level"),
align: "center",
high: true,
code: 'project.task.level'
},
{
key: "projectTitle",
title: this.l("projectTitle"),
align: "left",
easy: true,
high: true,
hide: true,
},
{
key: "planTitle",
title: this.l("planTitle"),
align: "left",
easy: true,
high: true,
hide: true,
},
{
key: "status",
title: this.l("status"),
align: "center",
high: true,
code: 'project.task.status'
},
{
key: "userId",
title: this.l("userId"),
align: "left",
high: true,
type: 'user'
},
{
key: "startDate",
title: this.l("startDate"),
align: "center",
high: true,
},
{
key: "endDate",
title: this.l("endDate"),
align: "center",
high: true,
},
{
key: "note",
title: this.l("note"),
align: "left",
high: true,
hide: true
},
{
key: "creationTime",
title: this.l("creationTime"),
align: "left",
high: true,
hide: true,
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
align: "left",
high: true,
hide: true,
type: 'user'
},
{
title: '操作',
key: 'action',
width: 200,
align: 'center',
render: (h, params) => {
return h('div', {
class: "action"
}, [
h('op', {
attrs: {
icon: "ios-play",
type: "icon",
title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '无法操作',
color: params.row.status == 0 || params.row.status == 2 ? "#19be6b" : '#ccc',
},
on: {
click: () => params.row.status == 0 || params.row.status == 2 ? this.updatestatus(params.row.id, 1) : null
}
}),
h('op', {
attrs: {
icon: "ios-pause",
type: "icon",
title: params.row.status == 1 ? "暂停" : "无法操作",
color: params.row.status == 1 ? "#19be6b" : "#ccc",
},
on: {
click: () => params.row.status == 1 ? this.updatestatus(params.row.id, 2) : null
}
}),
h('op', {
attrs: {
icon: "ios-close",
type: "icon",
title: params.row.status != 0 ? "完成" : "无法操作",
color: params.row.status != 0 ? "#19be6b" : "#ccc",
},
on: {
click: () => params.row.status != 0 ? this.updatestatus(params.row.id, 3) : null
}
}),
h('op', {
attrs: {
icon: "md-add",
type: "icon",
title: params.row.status != 3 ? "新增记录" : "无法操作",
color: params.row.status != 3 ? "#19be6b" : "#ccc",
},
on: {
click: () => params.row.status != 0 ? this.addRecord(params.row.id) : null
}
}),
h('op', {
attrs: {
icon: "ios-create-outline",
type: "icon",
title: "修改",
color: "#2b85e4",
},
on: {
click: () => this.edit(params.row.id)
}
}),
h('op', {
attrs: {
icon: "ios-trash-outline",
type: "icon",
title: "删除",
color: "#ed4014",
},
on: {
click: () => this.remove(params.row.id)
}
})
])
}
},
],
data1: [{
id: 1,
title: '测试title'
}],
data: [],
planId: '', //当前计划Id
planIdsCur: []
}
},
async fetch({
store,
params
}) {
await store.dispatch('loadDictionary') // 加载数据字典
},
created() {
if (this.$route.params.id != '') {
this.projectId = this.$route.params.id
this.easySearch.projectId.value = this.$route.params.id
}
this.treeHeight = window.innerHeight - 150;
},
mounted() {
this.$refs.grid.reload(this.easySearch);
console.log(this.easySearch);
},
methods: {
ok() {
this.$refs.grid.load()
this.modal = false
this.curId = 0;
}, },
}, search() {
theme1: "light", this.easySearch.planId.value = this.planIdsCur
modal: false, this.$refs.grid.reload(this.easySearch)
title: "新增", },
detail: null, add() {
curId: "", this.curId = this.projectId;
fullScreen: false, this.title = "新增";
columns: [ this.fullScreen = false;
// { this.detail = () => import('./add')
// key: "selection", this.modal = true;
// type: "selection",
// width: 50,
// align: "center"
// },
{
key: "id",
title: this.$t("id"),
align: "left",
high: true,
}, },
{ {
key: "title", key: "title",
...@@ -194,12 +413,20 @@ export default { ...@@ -194,12 +413,20 @@ export default {
align: "center", align: "center",
high: true, high: true,
}, },
{ productSearch(id, item, planIds) {
key: "note", this.planId = item.selected ? id : '';
title: this.l("note"), this.planIdsCur = item.selected ? planIds : []
align: "left", let where = {
high: true, planId: {
hide: true, op: "In",
value: item.selected ? planIds : []
},
projectId: {
op: "Equal",
value: this.$route.params.id
},
};
this.$refs.grid.reload(where);
}, },
{ {
key: "creationTime", key: "creationTime",
......
...@@ -78,9 +78,9 @@ ...@@ -78,9 +78,9 @@
</div> </div>
<div style="margin-top:20px;">本合格证无检验专用章无效 (版本:MB.FFGGHJKLL)</div> <div style="margin-top:20px;">本合格证无检验专用章无效 (版本:MB.FFGGHJKLL)</div>
<Row style="margin-top:5px;"> <Row style="margin-top:5px;">
<Col :span="8">地址:北京市海淀区知春路63号</Col> <Col :span="10">地址:</Col>
<Col :span="8" style="text-align:center;">电话:010-68378079</Col> <Col :span="8" >电话:</Col>
<Col :span="8" style="text-align:right;">邮编:100190</Col> <Col :span="6" >邮编:</Col>
</Row> </Row>
</div> </div>
</div> </div>
......
<template> <template>
<div class="pdf-detail"> <div class="pdf-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,30 +56,40 @@ ...@@ -50,30 +56,40 @@
<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"
>{{ results.examUser }} {{ 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"
>{{ results.approveUser }} {{ results.approveDate }}</Col
>
</Row> </Row>
</div> </div>
<div style="margin-top:20px;">本合格证无检验专用章无效 (版本:MB.FFGGHJKLL)</div> <div style="margin-top: 20px">
<Row style="margin-top:5px;"> 本合格证无检验专用章无效 (版本:MB.FFGGHJKLL)
<Col :span="8">地址:北京市海淀区知春路63号</Col> </div>
<Col :span="8" style="text-align:center;">电话:010-68378079</Col> <Row style="margin-top: 5px">
<Col :span="8" style="text-align:right;">邮编:100190</Col> <Col :span="10">地址:</Col>
<Col :span="8">电话:</Col>
<Col :span="6">邮编:100190</Col>
</Row> </Row>
</div> </div>
</div> </div>
...@@ -81,21 +97,21 @@ ...@@ -81,21 +97,21 @@
<script> <script>
export default { export default {
name: '', name: "",
props: ['results'], props: ["results"],
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
data() { data() {
return {} return {};
}, },
methods: { methods: {
l(key) { l(key) {
key = 'waitOpened' + '.' + key key = "waitOpened" + "." + key;
return this.$t(key) return this.$t(key);
} },
} },
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.pdf-detail { .pdf-detail {
......
...@@ -63,6 +63,7 @@ import op from '@/components/page/opration.vue' ...@@ -63,6 +63,7 @@ import op from '@/components/page/opration.vue'
import ProductNumberSelect from '@/components/page/productNumberSelect.vue' import ProductNumberSelect from '@/components/page/productNumberSelect.vue'
import ProductSelect from '@/components/page/productSelect.vue' import ProductSelect from '@/components/page/productSelect.vue'
import ProductSelect1 from '@/components/page/productSelect1.vue' import ProductSelect1 from '@/components/page/productSelect1.vue'
import ProjectTaskTree from '@/components/page/projectTaskTree.vue'
import DTSpan from '@/components/page/dtSpan.vue' import DTSpan from '@/components/page/dtSpan.vue'
import DTSearch from '@/components/page/dtSearch.vue' import DTSearch from '@/components/page/dtSearch.vue'
import InputTime from '@/components/page/inputTime.vue' import InputTime from '@/components/page/inputTime.vue'
...@@ -141,6 +142,7 @@ Vue.component("DepartmentSelect", DepartmentSelect) ...@@ -141,6 +142,7 @@ Vue.component("DepartmentSelect", DepartmentSelect)
Vue.component("ProductNumberSelect", ProductNumberSelect) Vue.component("ProductNumberSelect", ProductNumberSelect)
Vue.component("ProductSelect", ProductSelect) Vue.component("ProductSelect", ProductSelect)
Vue.component("ProductSelect1", ProductSelect1) Vue.component("ProductSelect1", ProductSelect1)
Vue.component("ProjectTaskTree",ProjectTaskTree)
Vue.component("DTSpan", DTSpan) Vue.component("DTSpan", DTSpan)
Vue.component("DTSearch", DTSearch) Vue.component("DTSearch", DTSearch)
Vue.component("InputTime", InputTime) Vue.component("InputTime", InputTime)
......
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