Commit ed9a51b5 authored by 仇晓婷's avatar 仇晓婷

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

parents d7db9f74 7ff949c1
...@@ -40,8 +40,8 @@ export default { ...@@ -40,8 +40,8 @@ export default {
type: String type: String
}, },
disable: { disable: {
type: Boolean, type: Number,
default: false default: 0
}, },
}, },
......
...@@ -95,7 +95,7 @@ export default { ...@@ -95,7 +95,7 @@ export default {
h("state", { h("state", {
props: { props: {
code: "mes.project_plan.Status", code: "mes.project_plan.Status",
type: "text", type: "tag",
value: data.status value: data.status
} }
}), }),
......
...@@ -13,10 +13,12 @@ ...@@ -13,10 +13,12 @@
v-for="item in users" v-for="item in users"
:value="item.userId" :value="item.userId"
:key="item.userId" :key="item.userId"
:disabled="item.status==1" :label="item.note"
:disabled="item.status==0"
> >
<div class="user"> <div class="user">
<State v-show="item.authority" code="project.group.authority" :value="item.authority" class="mr10"/> {{item.note}} <User :value="item.userId"/></span><Tag>{{item.role}}</Tag> <State code="project.group.authority" :value="item.authority" class="mr10" type="tag"/> {{item.note}}
<State code="project.group.role" :value="item.role" class="mr10" type="tag"/>
</div> </div>
</Option> </Option>
</Select> </Select>
...@@ -58,13 +60,13 @@ export default { ...@@ -58,13 +60,13 @@ export default {
// codition:[{fieldName: "groupId", fieldValue: "b9d6fa9e-e033-4a3e-9925-c1f4437d970c", conditionalType: "Equal"}] // codition:[{fieldName: "groupId", fieldValue: "b9d6fa9e-e033-4a3e-9925-c1f4437d970c", conditionalType: "Equal"}]
codition:[{fieldName: "projectId", fieldValue: this.projectId, conditionalType: "Equal"}] codition:[{fieldName: "projectId", fieldValue: this.projectId, conditionalType: "Equal"}]
} }
this.$api.post(`${material}/projectplan/list`, params).then(r=>{ this.$api.post(`${material}/projectgroupuser/list`, params).then(r=>{
this.users=r.result; this.users=r.result;
}) })
}, },
change(event) { change(event) {
let name = ""; let name = "";
this.data.forEach((e) => { this.users.forEach((e) => {
if (e.id == event) { if (e.id == event) {
name = e.label; name = e.label;
} }
......
...@@ -1863,6 +1863,7 @@ export default { ...@@ -1863,6 +1863,7 @@ export default {
plansToEndTime: '计划结束时间', plansToEndTime: '计划结束时间',
completePercentage: '完成百分比', completePercentage: '完成百分比',
upTaskId: '上级任务Id', upTaskId: '上级任务Id',
workHour:'工时'
}, },
//工资记录 //工资记录
project_plan_record: { project_plan_record: {
......
...@@ -244,7 +244,7 @@ export default { ...@@ -244,7 +244,7 @@ export default {
//新增保存或修改保存 //新增保存或修改保存
save() { save() {
this.cur.groupId = this.eid this.cur.groupId = this.eid
if (!this.cur.userId) { if (this.cur.userId==0||this.cur.userId==null) {
this.$Message.error("请选择人员"); this.$Message.error("请选择人员");
return; return;
} }
...@@ -255,14 +255,15 @@ export default { ...@@ -255,14 +255,15 @@ export default {
this.$Message.error("此人已经选择"); this.$Message.error("此人已经选择");
return; return;
} }
if (!this.cur.role ) { if (this.cur.role===undefined) {
this.$Message.error("请选择人员角色"); this.$Message.error("请选择人员角色");
return; return;
} }
if (this.cur.authority == null || this.cur.authority == '') { if (this.cur.authority ===undefined) {
this.$Message.error("请选择人员权限"); this.$Message.error("请选择人员权限");
return; return;
} }
if (this.cur.id && this.cur.id != '') { //人员修改 if (this.cur.id && this.cur.id != '') { //人员修改
Api.update(this.cur).then((r) => { Api.update(this.cur).then((r) => {
this.disabled = false; this.disabled = false;
......
...@@ -16,6 +16,9 @@ export default { ...@@ -16,6 +16,9 @@ export default {
update(params) { update(params) {
return Api.post(`${material}/projectplan/update`, params); return Api.post(`${material}/projectplan/update`, params);
}, },
sendtask(params) {
return Api.post(`${material}/projectplan/sendtask`, params);
},
delete(id) { delete(id) {
return Api.delete(`${material}/projectplan/delete`, { return Api.delete(`${material}/projectplan/delete`, {
params: { params: {
......
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
oprate: "edit", oprate: "edit",
disable:params.row.status disable:params.row.status
}, },
on: { click: () => this.send(params.row.id) }, on: { click: () => this.send(params.row) },
}, },
), ),
h( h(
...@@ -249,6 +249,35 @@ export default { ...@@ -249,6 +249,35 @@ export default {
this.detail = () => import("./add"); this.detail = () => import("./add");
this.modal = true; this.modal = true;
}, },
send(row){
console.log(row);
if(!row.startDate){
this.$Message.error("未设置开始时间");
return
}
if(!row.endDate){
this.$Message.error("未设置结束时间");
return
}
if(!row.executor){
this.$Message.error("为设置执行人");
return
}
delete row.chlidren;
delete row.parent;
console.warn(row)
var data=JSON.parse(JSON.stringify(row));
data.status=1;
Api.sendtask({
id:row.id,
}).then(r=>{
if(r.result){
this.$Message.info("任务派发成功!");
this.search();
}
})
},
copy(id) { copy(id) {
this.curId = id; this.curId = id;
this.title = "克隆"; this.title = "克隆";
......
...@@ -123,15 +123,15 @@ export default { ...@@ -123,15 +123,15 @@ export default {
this.detail = () => import("../plan"); this.detail = () => import("../plan");
}, },
task() { task() {
this.curId = this.eid; //this.curId = this.eid;
this.title = "任务"; this.title = "任务";
//this.detail = () => import("../task/index"); this.detail = () => import("../task/index");
this.$router.push({ // this.$router.push({
name: "project-task", // name: "project-task",
params: { // params: {
id: this.curId // id: this.curId
} // }
}); // });
}, },
group() { group() {
this.title = "项目成员"; this.title = "项目成员";
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<Col :span="12"> <Col :span="12">
<FormItem :label="l('workHour')" prop="workHour"> <FormItem :label="l('workHour')" prop="workHour">
<InputNumber v-model="entity.workHour"></InputNumber> <InputNumber v-model="entity.workHour" :min="0"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
deleterUserId: null, deleterUserId: null,
projectId: "", projectId: "",
planId: "", planId: "",
workHour: null, workHour: 0,
status: null, status: null,
title: "", title: "",
note: "", note: "",
......
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :data="recordList" :easy="false" :set="false"><template slot="easySearch"> <DataGrid :columns="columns" ref="grid" :data="recordList" :easy="false" :set="false" :height="400"><template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem> <FormItem prop="keys"><Input placeholder="请输入关键字标题" v-model="easySearch.keys.value" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem> <FormItem><Button type="primary" @click="search">查询</Button></FormItem>
...@@ -51,8 +51,9 @@ export default { ...@@ -51,8 +51,9 @@ export default {
columns: [{ columns: [{
key: "workHour", key: "workHour",
title: this.l("workHour"), title: this.l("workHour"),
align: "left", align: "right",
high: true high: true,
width: 120,
}, },
{ {
key: "title", key: "title",
...@@ -61,6 +62,22 @@ export default { ...@@ -61,6 +62,22 @@ export default {
easy: true, easy: true,
high: true high: true
}, },
{
key: "attachment",
title: this.l("attachment"),
align: "center",
high: true,
render: (h, params) => {
return h(
"a", {
on: {
click: () => this.viewFiles(params.row)
},
},
"查看附件"
);
},
},
{ {
title: '操作', title: '操作',
key: 'action', key: 'action',
...@@ -140,7 +157,7 @@ export default { ...@@ -140,7 +157,7 @@ export default {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch)
}, },
add() { add() {
this.curId = 0; this.curId = this.eid;
this.title = "新增"; this.title = "新增";
this.detail = () => import('./add') this.detail = () => import('./add')
this.modal = true; this.modal = true;
...@@ -171,6 +188,14 @@ export default { ...@@ -171,6 +188,14 @@ export default {
} }
}) })
}, },
viewFiles(row) {
if (row.attachment) {
this.parms.eid = row.attachment;
this.modal1 = true;
} else {
this.$Message.error("暂没上传附件");
}
},
cancel() { cancel() {
this.curId = 0; this.curId = 0;
this.modal = false this.modal = false
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</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" :conditions="easySearch" :lazy="true"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :lazy="true" :set="false">
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" inline> <Form ref="formInline" inline>
<FormItem> <FormItem>
...@@ -56,11 +56,13 @@ ...@@ -56,11 +56,13 @@
</FormItem> </FormItem>
<FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem> <FormItem prop="keys"><Input placeholder="请输入项目标题/计划名称/任务标题" v-model="easySearch.keys.value" v-width="240" /> </FormItem>
<FormItem><Button type="primary" @click="search">查询</Button></FormItem> <FormItem><Button type="primary" @click="search">查询</Button></FormItem>
<!--
<FormItem> <FormItem>
<Button @click="highSearch" type="text"> <Button @click="highSearch" type="text">
<Icon type="md-search" />高级 <Icon type="md-search" />高级
</Button> </Button>
</FormItem> </FormItem>
-->
</Form> </Form>
</template> </template>
<template slot="buttons"> <template slot="buttons">
...@@ -199,8 +201,8 @@ export default { ...@@ -199,8 +201,8 @@ export default {
high: true, high: true,
}, },
{ {
key: "endDate", key: "workHour",
title: '工时', title: this.l("workHour"),
align: "center", align: "center",
high: true, high: true,
render: (h, params) => { render: (h, params) => {
...@@ -211,7 +213,7 @@ export default { ...@@ -211,7 +213,7 @@ export default {
on: { on: {
click: () => this.viewWork(params.row.id) click: () => this.viewWork(params.row.id)
} }
}, params.row.title) }, params.row.workHour)
} }
}, },
{ {
...@@ -251,7 +253,6 @@ export default { ...@@ -251,7 +253,6 @@ export default {
type: "icon", type: "icon",
oprate: "edit", oprate: "edit",
title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '', title: params.row.status == 0 ? "开始" : params.row.status == 2 ? "继续" : '',
// color: "#19be6b",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true //disable: (params.row.status == 0 || params.row.status == 2) ? false : true
}, },
on: { on: {
...@@ -263,7 +264,6 @@ export default { ...@@ -263,7 +264,6 @@ export default {
// icon: "ios-pause", // icon: "ios-pause",
// type: "icon", // type: "icon",
// title: "暂停", // title: "暂停",
// //color: "#19be6b",
// //disable: params.row.status == 1 ? false : true // //disable: params.row.status == 1 ? false : true
// }, // },
// on: { // on: {
...@@ -276,7 +276,6 @@ export default { ...@@ -276,7 +276,6 @@ export default {
type: "icon", type: "icon",
oprate: "edit", oprate: "edit",
title: "完成", title: "完成",
//color: "#19be6b",
//disable: (params.row.status != 0 && params.row.status != 3) ? false : true //disable: (params.row.status != 0 && params.row.status != 3) ? false : true
}, },
on: { on: {
...@@ -289,7 +288,6 @@ export default { ...@@ -289,7 +288,6 @@ export default {
type: "icon", type: "icon",
oprate: "add", oprate: "add",
title: "新增记录", title: "新增记录",
//color: "#19be6b",
// disable: (params.row.status != 3 && params.row.status != 4) ? false : true // disable: (params.row.status != 3 && params.row.status != 4) ? false : true
}, },
on: { on: {
...@@ -302,7 +300,6 @@ export default { ...@@ -302,7 +300,6 @@ export default {
type: "icon", type: "icon",
oprate: "edit", oprate: "edit",
title: "修改", title: "修改",
// color: "#2b85e4",
//disable: (params.row.status == 0 || params.row.status == 2) ? false : true //disable: (params.row.status == 0 || params.row.status == 2) ? false : true
}, },
on: { on: {
...@@ -315,7 +312,6 @@ export default { ...@@ -315,7 +312,6 @@ export default {
type: "icon", type: "icon",
title: "删除", title: "删除",
oprate: 'delete', oprate: 'delete',
//color: "#ed4014",
// disable: (params.row.status == 0 || params.row.status == 3) ? false : true // disable: (params.row.status == 0 || params.row.status == 3) ? false : true
}, },
on: { on: {
...@@ -335,6 +331,9 @@ export default { ...@@ -335,6 +331,9 @@ export default {
planIdsCur: [] planIdsCur: []
} }
}, },
props: {
eid: String
},
async fetch({ async fetch({
store, store,
params params
...@@ -342,15 +341,18 @@ export default { ...@@ -342,15 +341,18 @@ export default {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch('loadDictionary') // 加载数据字典
}, },
created() { created() {
if (this.$route.params.id != '') { if (this.eid != '') {
this.projectId = this.$route.params.id this.projectId = this.eid
this.easySearch.projectId.value = this.$route.params.id this.easySearch.projectId.value = this.eid
} }
this.treeHeight = window.innerHeight - 150; this.treeHeight = window.innerHeight - 150;
}, },
mounted() { mounted() {
if (this.eid != "") {
this.easySearch.projectId.value = this.eid
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
console.log(this.easySearch); }
}, },
methods: { methods: {
ok() { ok() {
...@@ -427,7 +429,7 @@ export default { ...@@ -427,7 +429,7 @@ export default {
}, },
projectId: { projectId: {
op: "Equal", op: "Equal",
value: this.$route.params.id value: this.eid
}, },
}; };
this.$refs.grid.reload(where); this.$refs.grid.reload(where);
...@@ -463,14 +465,14 @@ export default { ...@@ -463,14 +465,14 @@ export default {
viewWork(id) { viewWork(id) {
this.curId = id; this.curId = id;
this.title = "查看工时"; this.title = "查看工时";
this.fullScreen = true; this.fullScreen = false;
this.detail = () => import('../record') this.detail = () => import('../record')
this.modal = true; this.modal = true;
}, },
addRecord(id) { addRecord(id) {
this.curId = id; this.curId = id;
this.title = "新增记录"; this.title = "新增记录";
this.fullScreen = true; this.fullScreen = false;
this.detail = () => import('../record/add') this.detail = () => import('../record/add')
this.modal = true; this.modal = true;
}, },
...@@ -478,6 +480,13 @@ export default { ...@@ -478,6 +480,13 @@ export default {
let vkey = "project_task" + "." + key; let vkey = "project_task" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key
} }
},
watch: {
eid(v) {
if (v != "") {
this.eid = v
}
}
} }
} }
</script> </script>
......
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