From baeb25b20d147adbcb8ea6c398eb0bbc9a2f92bb Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 05 三月 2024 18:52:19 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/silk/silk-web
---
src/views/productManage/productRegisterForm/index.vue | 101 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 96 insertions(+), 5 deletions(-)
diff --git a/src/views/productManage/productRegisterForm/index.vue b/src/views/productManage/productRegisterForm/index.vue
index db864a0..a9a9bec 100644
--- a/src/views/productManage/productRegisterForm/index.vue
+++ b/src/views/productManage/productRegisterForm/index.vue
@@ -3,31 +3,116 @@
<div class="filter-card">
<CommonSearch :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch">
<template slot="leftButton">
- <el-button size="small" type="primary" @click="addBtnClick">鏂板缓</el-button>
+ <el-button size="small" type="primary" @click="addBtnClick">鏂板</el-button>
</template>
</CommonSearch>
+ </div>
+ <div class="body-card">
+ <div class="list-view">
+ <TableCommonView ref="tableListRef" v-loading="loading" :table-list="tableList" @selTableCol="selTableCol">
+ <template slot="tableButton">
+ <el-table-column label="鎿嶄綔" width="180">
+ <template slot-scope="scope">
+ <el-button @click="viewClick(scope.row)" type="text" size="small">鏌ョ湅</el-button>
+ <el-button @click="editClick(scope.row)" type="text" size="small">缂栬緫</el-button>
+ <el-button @click="delClick(scope.row.id)" 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" />
+ </div>
</div>
</div>
</template>
<script>
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
export default {
name: "productRegisterForm",
props: {},
components: {},
- mixins: [],
+ mixins: [pageMixin],
computed: {},
data() {
- return {}
+ return {
+ loading: false,
+ tableList: {},
+ tableColumn: [
+ { label: "缂栧彿", prop: "name", min: 100, default: true },
+ { label: "鐢熶骇鏃堕棿", prop: "member_name" },
+ { label: "杞︾粍", prop: "client_level" },
+ { label: "瑙勬牸", prop: "next_visit_time", min: 90 },
+ { label: "杞﹂棿", prop: "detail_address", min: 200 },
+ { label: "搴勫彛", prop: "client_status" },
+ { label: "鍥炴暟", prop: "contact_name", isContactClick: true },
+ { label: "杞︾粍鎬讳骇閲�", prop: "contact_phone" }
+ ],
+ showCol: ["缂栧彿", "鐢熶骇鏃堕棿", "杞︾粍", "瑙勬牸", "杞﹂棿", "搴勫彛", "鍥炴暟", "杞︾粍鎬讳骇閲�"]
+ }
},
- created() {},
- methods: {}
+ created() {
+ this.setTable()
+ },
+ methods: {
+ setTable() {
+ this.tableList = {
+ selectIndex: true,
+ tableInfomation: [],
+ allcol: [],
+ showcol: this.showCol,
+ tableColumn: this.setColumnVisible(this.showCol)
+ }
+ this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
+ this.searchOptions = []
+ for (let i = 0; i < this.tableList.tableColumn.length; i++) {
+ const label = this.tableList.tableColumn[i].label
+ const value = this.tableList.tableColumn[i].prop
+ this.searchOptions.push({ value: value, label: label })
+ }
+ },
+ setColumnVisible(showCol) {
+ return this.tableColumn.map((ele) => {
+ return {
+ ...ele,
+ isShowColumn: showCol.includes(ele.label)
+ }
+ })
+ },
+ selTableCol(val) {
+ this.showcol = val
+ this.tableList.tableColumn = this.setColumnVisible(val)
+ },
+ // 鎼滅储
+ onFilterSearch(searchText) {
+ console.log(searchText)
+ },
+ // 鏂板
+ addBtnClick() {
+ this.$router.push({ name: "addProductRegisterPage" })
+ },
+ // 鏌ョ湅
+ viewClick(row) {
+ console.log(row)
+ },
+ // 缂栬緫
+ editClick(row) {
+ console.log(row)
+ },
+ // 鍒犻櫎
+ delClick(row) {
+ console.log(row)
+ }
+ }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.productRegisterForm-container {
+ height: 100%;
.filter-card {
margin: 20px 30px;
height: 80px;
@@ -37,5 +122,11 @@
border-radius: 12px;
background-color: #fff;
}
+ .body-card {
+ margin: 0 30px;
+ background-color: #fff;
+ padding: 10px 15px;
+ height: calc(100% - 180px);
+ }
}
</style>
--
Gitblit v1.8.0