From 5c06e8d272b06f2c17bda89b163ac49ebdeac6bf Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期二, 14 十一月 2023 19:24:53 +0800
Subject: [PATCH] 修改上家规则列表
---
src/views/overview/OverviewListView.vue | 104 +++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 82 insertions(+), 22 deletions(-)
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 4f5a945..fc3a8d8 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -1,22 +1,37 @@
<template>
<div class="rightContent">
+ <div class="label-fixed-element">
+ <span>{{ params.name }}</span>
+ </div>
<div class="top">
<SearchCommonView
:add-title="'鏂板缓'"
:placeholder="'璇疯緭鍏ュ崟鍙�/鏉ユ簮鍗曟嵁'"
:amount-view="false"
+ :search-task-map="searchTaskMap"
@addCommonClick="addBtnClick"
@searchClick="getList"
+ @delSelectClick="delSelectClick"
/>
</div>
<div class="list-view">
<div class="table">
- <TableCommonView
- ref="tableListRef"
- :table-list="tableList"
- @selTableCol="selTableCol"
- @tableRowClick="tableRowClick"
- ></TableCommonView>
+ <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol">
+ <template slot="tableButton">
+ <el-table-column label="鎿嶄綔" width="100">
+ <template slot-scope="scope">
+ <el-button @click="tableRowClick(scope.row, '鏌ョ湅')" type="text" size="small">鏌ョ湅</el-button>
+ <el-button
+ v-if="scope.row.status !== 4"
+ @click="tableRowClick(scope.row, '缂栬緫')"
+ type="text"
+ size="small"
+ >缂栬緫</el-button
+ >
+ </template>
+ </el-table-column>
+ </template>
+ </TableCommonView>
</div>
<div class="btn-pager">
<PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -27,7 +42,8 @@
v-if="editConfig.visible"
:work-type="workType"
:edit-common-config="editConfig"
- :add-name="this.$route.params.name"
+ :add-name="addName"
+ :display-edit="displayEdit"
/>
</div>
</template>
@@ -47,7 +63,7 @@
data() {
return {
tableList: {},
- showcol: ["浠�", "鑷�", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鐘舵��"],
+ showcol: ["浠撳簱浣嶇疆", "璋冨嚭浣嶇疆", "璋冨叆浣嶇疆", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鐘舵��"],
searchOptions: [],
commonDetail: {
visible: false,
@@ -61,10 +77,17 @@
},
workType: this.$route.params.workType,
keyword: "",
- params: {}
+ params: {},
+ displayEdit: false,
+ formLabel: "",
+ toLabel: "",
+ addName: "",
+ searchTaskMap: []
}
},
created() {
+ console.log(this.workType)
+ this.setFormToLabel()
this.setTable()
var paramsData = sessionStorage.getItem("paramsData")
let params = {}
@@ -75,6 +98,8 @@
sessionStorage.setItem("paramsData", JSON.stringify(params))
}
this.params = params
+ this.searchTaskMap =
+ this.params.status > 0 ? [{ id: this.params.id, title: this.getStatus(this.params.status) }] : []
this.getData()
// console.log(this.$route.params.workType)
},
@@ -83,6 +108,18 @@
sessionStorage.removeItem("paramsData")
},
methods: {
+ setFormToLabel() {
+ if (this.workType === 1) {
+ this.formLabel = "渚涘簲鍟嗕綅缃�"
+ this.toLabel = "浠撳簱浣嶇疆"
+ } else if (this.workType === 2) {
+ this.formLabel = "浠撳簱浣嶇疆"
+ this.toLabel = "瀹㈡埛浣嶇疆"
+ } else {
+ this.formLabel = "璋冨嚭浣嶇疆"
+ this.toLabel = "璋冨叆浣嶇疆"
+ }
+ },
setTable() {
this.tableList = {
tableInfomation: [],
@@ -110,15 +147,15 @@
default: true
},
{
- label: "浠�",
+ label: this.formLabel,
prop: "from",
- isShowColumn: showcol.includes("浠�"),
+ isShowColumn: showcol.includes(this.formLabel),
default: false
},
{
- label: "鑷�",
+ label: this.toLabel,
prop: "to",
- isShowColumn: showcol.includes("鑷�"),
+ isShowColumn: showcol.includes(this.toLabel),
default: false
},
{
@@ -199,7 +236,8 @@
number: this.keyword,
operationTypeId: this.params.id,
page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
+ pageSize: this.pagerOptions.pageSize,
+ status: this.params.status
}).then((res) => {
console.log(res.data)
if (res.code === 200) {
@@ -222,28 +260,50 @@
this.pagerOptions.currPage = 1
this.getData()
},
- // 琛岀偣鍑�
- tableRowClick(row) {
+ // 鏌ョ湅 缂栬緫
+ tableRowClick(row, val) {
console.log(row)
this.editConfig.visible = true
- this.editConfig.title = "缂栬緫"
- this.editConfig.operationTypeId = this.$route.params.id
+ this.editConfig.title = val
+ this.editConfig.operationTypeId = this.params.id
this.editConfig.infomation = { ...row }
},
// 鏂板缓
addBtnClick() {
- this.editConfig.visible = true
this.editConfig.title = "鏂板缓"
- this.editConfig.operationTypeId = this.$route.params.id
+ this.addName = this.params.name
+ console.log(this.params, "ss鍒锋柊")
+ this.editConfig.operationTypeId = this.params.id
+ this.editConfig.code = this.params.code
this.editConfig.infomation = {}
+ this.editConfig.visible = true
},
// 鐘舵��
getStatus(val) {
- return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚"
+ return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : val === 4 ? "瀹屾垚" : ""
+ },
+ // 鍒犻櫎鎼滅储鐘舵��
+ delSelectClick() {
+ this.params.status = 0
+ this.getData()
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style lang="scss" scoped></style>
+<style lang="scss" scoped>
+.label-fixed-element {
+ background: #e6ecf2;
+ position: fixed;
+ font-size: 14px;
+ width: calc(100% - 530px);
+ height: 45px;
+ line-height: 45px;
+ font-size: 18px;
+ font-weight: 700;
+ color: #171718;
+ margin-top: -60px;
+ margin-left: -5px;
+}
+</style>
--
Gitblit v1.8.0