From a2586ce70485035d77746ff9c18364f408f4c6aa Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 07 八月 2023 16:57:06 +0800
Subject: [PATCH] 服务管理模块详情页
---
src/views/service/serviceContract/index.vue | 75 +++++++++++++++++++++++++++++++++----
1 files changed, 66 insertions(+), 9 deletions(-)
diff --git a/src/views/service/serviceContract/index.vue b/src/views/service/serviceContract/index.vue
index 0655c35..257a548 100644
--- a/src/views/service/serviceContract/index.vue
+++ b/src/views/service/serviceContract/index.vue
@@ -1,11 +1,27 @@
<template>
<div class="service-contract">
- <SearchCommonView ref="searchCommonView" :query-class-options="queryClassOptions" :search-options="searchOptions" />
- <div class="btn-pager">
- <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" />
+ <div v-if="isDetail" class="detail-top">
+ <DetailListCommonBtn :query-class-options="queryClassOptions" />
<PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
</div>
- <TableCommonView ref="tableListRef" :table-list="tableList">
+ <div v-else class="top">
+ <SearchCommonView
+ ref="searchCommonView"
+ :query-class-options="queryClassOptions"
+ :search-options="searchOptions"
+ />
+ <div class="btn-pager">
+ <PublicFunctionBtnView :submit-approval="true" :operates-list="operatesList" />
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+ </div>
+ </div>
+ <TableCommonView
+ ref="tableListRef"
+ :table-list="tableList"
+ :select-box="!isDetail"
+ @selClientClick="selClientClick"
+ @selCommonClick="selCommonClick"
+ >
<template slot="tableButton">
<el-table-column label="鎿嶄綔" width="90">
<template slot-scope="scope">
@@ -17,6 +33,10 @@
</TableCommonView>
<!-- 鏂板缓/缂栬緫 -->
<AddServiceContractDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
+ <!-- 鏈嶅姟鍚堝悓鏄庣粏 -->
+ <DetailServiceContract v-if="serviceContractDetail.visible" :service-contract-detail="serviceContractDetail" />
+ <!-- 瀹㈡埛璇︽儏 -->
+ <DetailClientManage v-if="clientDeail.visible" :client-manage-detail="clientDeail" />
</div>
</template>
@@ -24,13 +44,21 @@
import AddServiceContractDialog from "@/views/service/serviceContract/AddServiceContractDialog"
import { getServiceContractList, getDelServiceContract } from "@/api/serviceManage/serviceContract"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+import DetailServiceContract from "@/views/service/serviceContract/DetailServiceContract"
export default {
name: "ServiceContract",
- props: {},
+ props: {
+ isDetail: {
+ type: Boolean,
+ default: false
+ }
+ },
mixins: [pageMixin],
components: {
- AddServiceContractDialog
+ AddServiceContractDialog,
+ DetailServiceContract,
+ DetailClientManage: () => import("@/views/client/client/DetailClientManage")
},
computed: {
searchCommonHeight() {
@@ -63,6 +91,14 @@
visible: false,
title: "鏂板缓",
infomation: {}
+ },
+ serviceContractDetail: {
+ visible: false,
+ infomation: {}
+ },
+ clientDeail: {
+ visible: false,
+ infomation: {}
}
}
},
@@ -75,8 +111,8 @@
this.tableList = {
tableInfomation: [],
tableColumn: [
- { label: "鏈嶅姟鍚堝悓缂栧彿", prop: "number", min: 100 }, // 鏈嶅姟鍚堝悓缂栧彿
- { label: "瀹㈡埛鍚嶇О", prop: "clientId", min: 120 }, // 瀹㈡埛鍚嶇О
+ { label: "鏈嶅姟鍚堝悓缂栧彿", prop: "number", min: 100, isCommonClick: true }, // 鏈嶅姟鍚堝悓缂栧彿
+ { label: "瀹㈡埛鍚嶇О", prop: "clientId", min: 120, isClientClick: true }, // 瀹㈡埛鍚嶇О
{ label: "绛剧害鏃ユ湡", prop: "signTime" }, // 绛剧害鏃ユ湡
{ label: "鍚堝悓绫诲瀷", prop: "typeId" }, // 鍚堝悓绫诲瀷
{ label: "鍚堝悓鐘舵��", prop: "statusId" }, // 鍚堝悓鐘舵��
@@ -161,6 +197,18 @@
},
getSelectArray(val) {
console.log(val)
+ },
+ // 瀹㈡埛鍚嶇О璇︽儏
+ selClientClick(row) {
+ console.log(row)
+ this.clientDeail.visible = true
+ this.clientDeail.infomation = { ...row, client_name: row.name }
+ },
+ // 鏈嶅姟鍚堝悓璇︽儏
+ selCommonClick(row) {
+ console.log(row)
+ this.serviceContractDetail.visible = true
+ this.serviceContractDetail.infomation = { ...row }
}
}
}
@@ -169,7 +217,16 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.service-contract {
- .btn-pager {
+ .top {
+ margin-bottom: 20px;
+ .btn-pager {
+ display: flex;
+ .page {
+ margin-left: auto;
+ }
+ }
+ }
+ .detail-top {
display: flex;
.page {
margin-left: auto;
--
Gitblit v1.8.0