rpjdetail

This commit is contained in:
shijing 2022-07-15 17:16:08 +08:00
parent af4a575139
commit 14ef127744
9 changed files with 205 additions and 126 deletions

View File

@ -222,7 +222,7 @@ const routes = [
"name": "visitdetail", "name": "visitdetail",
"path": "/wf/visitdetail", "path": "/wf/visitdetail",
"meta": { "meta": {
"title": "访客工单详情", "title": "工单详情",
"icon": "el-icon-menu", "icon": "el-icon-menu",
"hidden": true "hidden": true
}, },

View File

@ -90,10 +90,11 @@
prop="create_time" prop="create_time"
width="180" width="180"
></el-table-column> ></el-table-column>
<el-table-column label="操作" fixed="right" align="left" width="170"> <el-table-column label="操作" fixed="right" align="center" width="170">
<template #default="scope"> <template #default="scope">
<el-button-group> <el-button-group>
<el-button <el-button
v-if="scope.row.state===10"
text text
type="primary" type="primary"
size="small" size="small"
@ -108,13 +109,13 @@
@click="table_show(scope.row, scope.$index)" @click="table_show(scope.row, scope.$index)"
>查看 >查看
</el-button> </el-button>
<el-button <!--<el-button
text text
type="warning" type="warning"
size="small" size="small"
@click="table_edit(scope.row, scope.$index)" @click="table_edit(scope.row, scope.$index)"
>编辑 >编辑
</el-button> </el-button>-->
<el-popconfirm <el-popconfirm
title="确定删除吗?" title="确定删除吗?"
@confirm="table_del(scope.row, scope.$index)" @confirm="table_del(scope.row, scope.$index)"
@ -139,7 +140,6 @@
<show-dialog <show-dialog
v-if="dialog.show" v-if="dialog.show"
ref="showDialog" ref="showDialog"
:rpjId="rpjId"
@closed="dialog.show = false" @closed="dialog.show = false"
></show-dialog> ></show-dialog>
</template> </template>
@ -182,7 +182,6 @@
40: "进行中", 40: "进行中",
50: "已完成", 50: "已完成",
}, },
rpjId:''
}; };
}, },
methods: { methods: {
@ -202,8 +201,11 @@
}, },
// //
table_show(row) { table_show(row) {
this.rpjId = row.id; debugger;
this.dialog.show = true; this.dialog.show = true;
this.$nextTick(() => {
this.$refs.showDialog.open().setData(row);
});
}, },
// //

View File

@ -1,31 +1,31 @@
<template> <template>
<el-drawer <el-drawer
:title="form.name" title="查看"
v-model="visible" v-model="visible"
:size="1000" :size="1000"
destroy-on-close destroy-on-close
@closed="$emit('closed')"
> >
<el-container v-loading="loading"> <el-container v-loading="loading">
<el-main style="padding: 0 20px 20px 20px"> <el-main style="padding: 0 20px 20px 20px">
<el-descriptions direction="vertical" :column="3" border> <el-descriptions direction="vertical" :column="3" border>
<!--<el-descriptions-item label="入厂项目:">{{form.name }}</el-descriptions-item>--> <el-descriptions-item label="入厂项目:">{{form.name }}</el-descriptions-item>
<el-descriptions-item label="项目类型:">{{types_[form.type]}}</el-descriptions-item> <el-descriptions-item label="项目类型:">{{types_[form.type]}}</el-descriptions-item>
<el-descriptions-item label="合同编号:">{{form.contract_number}}</el-descriptions-item> <el-descriptions-item label="合同编号:">{{form.contract_number}}</el-descriptions-item>
<el-descriptions-item label="状态:">{{state_[form.state]}}</el-descriptions-item> <el-descriptions-item label="状态:">{{state_[form.state]}}</el-descriptions-item>
<el-descriptions-item label="进厂时间:">{{form.come_time}}</el-descriptions-item> <el-descriptions-item label="进厂时间:">{{form.come_time}}</el-descriptions-item>
<el-descriptions-item label="离厂时间:">{{form.leave_time}}</el-descriptions-item> <el-descriptions-item label="离厂时间:">{{form.leave_time}}</el-descriptions-item>
<el-descriptions-item label="所属部门:">{{form.belong_dept_name}}</el-descriptions-item> <el-descriptions-item label="所属部门:">{{form.belong_dept_name}}</el-descriptions-item>
<!--<el-descriptions-item label="相关方:">{{form.rparty_name}}</el-descriptions-item>--> <el-descriptions-item label="相关方:">{{form.rparty_name}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<!--<el-card style="margin-top:20px"> <el-card style="margin-top:20px">
<scTable <scTable
ref="table" ref="fileTable"
:data="peoplelist" :data="rpjFileList"
row-key="id" row-key="id"
height='auto' hidePagination
stripe stripe
hideDo hideDo
hidePagination
> >
<el-table-column <el-table-column
label="#" label="#"
@ -33,29 +33,58 @@
type="index" type="index"
width="50" width="50"
></el-table-column> ></el-table-column>
<el-table-column label="资质内容" prop="name">
<el-table-column <template #default="scope">
label="访客姓名" {{ scope.row.file_cate_.name }}
prop="visitor_.name" </template>
></el-table-column> </el-table-column>
<el-table-column <el-table-column label="文件资料" prop="name">
label="访客手机号" <template #default="scope">
prop="visitor_.phone" <div v-for="(item, index) in scope.row.files_" :key="index">
></el-table-column> <el-link :href="item.file">
<el-table-column {{ item.name }}
label="访客身份证号" </el-link>
prop="visitor_.id_number" </div>
></el-table-column> </template>
<el-table-column label="是否重要访客" prop="is_main"> </el-table-column>
<template #default="scope" </scTable>
> </el-card>
<el-space v-if="scope.row.is_main == true"></el-space> <el-card style="margin-top:20px">
<scTable
ref="table"
:data="memeberList"
row-key="id"
height='auto'
stripe
hideDo
hidePagination
>
<el-table-column label="#" fixed="left" type="index" width="50"></el-table-column>
<el-table-column label="姓名" prop="remployee_.name">
<template #default="scope">
{{ scope.row.remployee_.name }}
</template>
</el-table-column>
<el-table-column label="工作职责" prop="duty"></el-table-column>
<el-table-column label="证书" prop="rcertificates">
<template #default="scope">
<el-tag
v-for="item in scope.row.rcertificates_"
:key="item.number"
:label="item.name"
:value="item.number"
>{{ item.name }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="是否负责人" prop="is_manager">
<template #default="scope">
<el-space v-if="scope.row.is_manager === true"></el-space>
<el-space v-else></el-space> <el-space v-else></el-space>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" prop="create_time"></el-table-column>
</scTable> </scTable>
</el-card>--> </el-card>
</el-main> </el-main>
</el-container> </el-container>
</el-drawer> </el-drawer>
@ -70,7 +99,12 @@
components: { components: {
selectUser, selectUser,
}, },
props:{rpjId: { type: String, default: "" }}, props: {
rpjId: {
type: String,
default: ""
}
},
data() { data() {
return { return {
loading: false, loading: false,
@ -89,20 +123,43 @@
30: "保安保洁服务", 30: "保安保洁服务",
40: "其他", 40: "其他",
}, },
receptionistoptions: [], form:{},
peoplelist: [], rpjFileList: [],
memeberList: [],
}; };
}, },
mounted() { mounted() {
this.getFormData(); /* this.getRpjfileList();
this.getMemberList();*/
}, },
methods: { methods: {
getFormData(){ //
this.$API.rpm.rpj.item.req(this.rpjId).then((res) => { open() {
this.visible = true;
return this;
},
//
setData(data) {
this.$API.rpm.rpj.item.req(data.id).then((res) => {
this.form = res; this.form = res;
this.getRpjfileList();
this.getMemberList();
this.visible = true; this.visible = true;
}); });
}, },
//
getRpjfileList() {
this.$API.rpm.rpjfile.list.req({page: 0, rpj: this.form.id}).then((res) => {
this.rpjFileList = res;
});
},
//
getMemberList() {
this.$API.rpm.member.list.req({rpj: this.form.id, page: 0}).then((res) => {
this.memeberList = res;
console.log(res);
});
},
}, },
}; };
</script> </script>

View File

@ -82,19 +82,22 @@
this.list = res; this.list = res;
}, },
handleShow(row) { handleShow(row) {
var catetype = row.workflow_.key; let workflowKey = row.workflow_.key;
switch (catetype) { let catetype = '';
case 'visit': if(workflowKey==='visit'){
this.$router.push({ catetype = row.workflow_.key
name: "visitdetail", }else if(workflowKey==='rparty'){
query: { catetype = row.workflow_.key
id: row.id, }else{}
type: 'show', this.$router.push({
visitID: row.ticket_data.visit name: "visitdetail",
}, query: {
}); id: row.id,
break; type: 'show',
} projectId: row.ticket_data.visit,
catetype:catetype
},
});
}, },
handleAccept(row) { handleAccept(row) {
this.$API.wf.ticket.ticketAccept.req(row.id, {}).then(res => { this.$API.wf.ticket.ticketAccept.req(row.id, {}).then(res => {

View File

@ -75,19 +75,15 @@ export default {
this.list = res; this.list = res;
}, },
handleShow(row) { handleShow(row) {
var catetype = row.workflow_.key; this.$router.push({
switch (catetype) { name: "visitdetail",
case 'visit': query: {
this.$router.push({ id: row.id,
name: "visitdetail", type: 'show',
query: { projectId: row.ticket_data.visit,
id: row.id, catetype : row.workflow_.key
type: 'show', },
visitID: row.ticket_data.visit });
},
});
break;
}
}, },
}, },
}; };

View File

@ -124,32 +124,19 @@
console.log(res); console.log(res);
this.list = res; this.list = res;
}, },
//
handleDetail(row){ handleDetail(row){
let catetype = row.workflow_.key; this.$router.push({
switch (catetype) { name: "visitdetail",
case 'visit': query: {
this.$router.push({ id: row.id,
name: "visitdetail", projectId:row.ticket_data.visit,
query: { catetype:row.workflow_.key
id: row.id, },
visitID:row.ticket_data.visit });
},
});
break;
case 'rparty':
this.$router.push({
name: "visitdetail",
query: {
id: row.id,
visitID:row.ticket_data.visit
},
});
break;
}
}, },
//
handleLogs(row) { handleLogs(row) {
debugger;
console.log(row)
let that = this; let that = this;
let id = row.id; let id = row.id;
this.ticketId = row.id; this.ticketId = row.id;

View File

@ -105,19 +105,15 @@
}, },
methods: { methods: {
handleShow(row) { handleShow(row) {
var catetype = row.workflow_.key; this.$router.push({
switch (catetype) { name: "visitdetail",
case 'visit': query: {
this.$router.push({ id: row.id,
name: "visitdetail", type: 'show',
query: { projectId: row.ticket_data.visit,
id: row.id, catetype:row.workflow_.key
type: 'show', },
visitID: row.ticket_data.visit });
},
});
break;
}
}, },
async getList() { async getList() {
let res = await this.$API.wf.ticket.list.req({category: "owner", page: 0}); let res = await this.$API.wf.ticket.list.req({category: "owner", page: 0});

View File

@ -4,7 +4,7 @@
<el-card style="margin-bottom: 10px"> <el-card style="margin-bottom: 10px">
<work-step ref="workStep"></work-step> <work-step ref="workStep"></work-step>
</el-card> </el-card>
<el-card style="margin-left: 10px; margin-bottom: 10px"> <el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='visit'">
<el-descriptions title="来访信息" :column="3"> <el-descriptions title="来访信息" :column="3">
<el-descriptions-item label="工单流水号:"> <el-descriptions-item label="工单流水号:">
{{ticketDetail.sn }} {{ticketDetail.sn }}
@ -43,6 +43,39 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="cateType==='rparty'">
<el-descriptions title="来访信息" :column="3">
<el-descriptions-item label="工单流水号:">
<!--{{ticketDetail.sn }}-->
</el-descriptions-item>
<el-descriptions-item label="相关方:">
<!--{{rpjDetail.name }}-->
</el-descriptions-item>
<el-descriptions-item label="入厂项目:">
<!--{{rpjDetail.company }}-->
</el-descriptions-item>
<el-descriptions-item label="项目类型:">
<!--<el-tag size="small">{{ rpjDetail.count_people }}</el-tag>-->
</el-descriptions-item>
<el-descriptions-item label="合同编号:">
<!--<el-tag v-for="item in rpjDetail.visitors_" :key='item.id' size="small">
&lt;!&ndash;{{ item.visitor_.name }}&ndash;&gt;
</el-tag>-->
</el-descriptions-item>
<el-descriptions-item label="状态:">
<!--{{state_[rpjDetail.state] }}-->
</el-descriptions-item>
<el-descriptions-item label="进厂时间:">
<!--{{rpjDetail.visit_time }}-->
</el-descriptions-item>
<el-descriptions-item label="离厂时间:">
<!--{{rpjDetail.leave_time }}-->
</el-descriptions-item>
<el-descriptions-item label="所属部门:">
<!--{{purpose_[rpjDetail.purpose] }}-->
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'"> <el-card style="margin-left: 10px; margin-bottom: 10px" v-if="type!=='show'">
<scTitle title="处理"></scTitle> <scTitle title="处理"></scTitle>
<el-form :model="form" ref="addForm" label-width="100px" label-position="left"> <el-form :model="form" ref="addForm" label-width="100px" label-position="left">
@ -115,9 +148,10 @@
name: "visitdetail", name: "visitdetail",
data() { data() {
return { return {
ticketId: "", ticketId: "",//id
visitId: "", projectId: "",//id
userName: "", userName: "",
rpjDetail: {},
ticketDetail: [], ticketDetail: [],
visitDetail: [], visitDetail: [],
employeeLists: [], employeeLists: [],
@ -154,11 +188,12 @@
created(){ created(){
this.ticketId = this.$route.query.id; this.ticketId = this.$route.query.id;
this.type = this.$route.query.type; this.type = this.$route.query.type;
this.cateType = this.$route.query.catetype;
}, },
mounted() { mounted() {
this.ticketId = this.$route.query.id; this.ticketId = this.$route.query.id;
this.type = this.$route.query.type; this.type = this.$route.query.type;
this.visitId = this.$route.query.visitID; this.projectId = this.$route.query.projectId;
this.getticketItem(); this.getticketItem();
this.getVisit(); this.getVisit();
this.getBtns(); this.getBtns();
@ -169,10 +204,9 @@
getticketItem() { getticketItem() {
this.$API.wf.ticket.ticketItem.req(this.ticketId).then((res) => { this.$API.wf.ticket.ticketItem.req(this.ticketId).then((res) => {
this.ticketDetail = res; this.ticketDetail = res;
debugger;
console.log(res);
}); });
}, },
//
getBtns(){ getBtns(){
this.$API.wf.ticket.ticketTransitions.req(this.ticketId).then(res=>{ this.$API.wf.ticket.ticketTransitions.req(this.ticketId).then(res=>{
this.operationBtn = res; this.operationBtn = res;
@ -181,21 +215,26 @@
//访 //访
getVisit() { getVisit() {
this.$API.vm.visit.read.req(this.visitId).then((res) => { this.$API.vm.visit.read.req(this.projectId).then((res) => {
this.visitDetail = res; this.visitDetail = res;
}); });
}, },
addNodeHandlerSubmit(data) { //
this.addForm.toadd_user=data.id; getRpj(){
this.userName=data.name;
}, },
//-start
addNode(){ addNode(){
this.limitedAdd = true; this.limitedAdd = true;
}, },
addCancel(){ addCancel(){
this.limitedAdd = false; this.limitedAdd = false;
}, },
addNodeHandlerSubmit(data) {
this.addForm.toadd_user=data.id;
this.userName=data.name;
},
addNodeHandler(index){ addNodeHandler(index){
let res = null; let res = null;
if(index==='1'){ if(index==='1'){
@ -208,7 +247,8 @@
this.$router.push("dutywork"); this.$router.push("dutywork");
} }
}, },
//-end
//-start
deliverNode(){ deliverNode(){
this.limitedDeliver = true; this.limitedDeliver = true;
}, },
@ -227,6 +267,8 @@
} }
}) })
}, },
//-end
//
operationSubmit(id){ operationSubmit(id){
let params = new Object(); let params = new Object();
params.transition = id; params.transition = id;

View File

@ -75,19 +75,15 @@
this.list = res; this.list = res;
}, },
handleShow(row) { handleShow(row) {
var catetype = row.workflow_.key; this.$router.push({
switch (catetype) { name: "visitdetail",
case 'visit': query: {
this.$router.push({ id: row.id,
name: "visitdetail", type: 'show',
query: { projectId: row.ticket_data.visit,
id: row.id, catetype: row.workflow_.key
type: 'show', },
visitID: row.ticket_data.visit });
},
});
break;
}
}, },
}, },
}; };