From 247f3a1f330127abe2993b2e049ad6450bc0dc1c Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期四, 19 十月 2023 11:56:32 +0800
Subject: [PATCH] 仓库,位置 增加操作栏 编辑 查看
---
src/views/warehouseManage/warehouse/index.vue | 26 +++++++++++--
src/views/warehouseManage/position/AddDialog.vue | 6 +-
src/views/warehouseManage/position/index.vue | 27 +++++++++++--
src/views/warehouseManage/warehouse/AddDialog.vue | 2
4 files changed, 48 insertions(+), 13 deletions(-)
diff --git a/src/views/warehouseManage/position/AddDialog.vue b/src/views/warehouseManage/position/AddDialog.vue
index b9955ec..cc28fb6 100644
--- a/src/views/warehouseManage/position/AddDialog.vue
+++ b/src/views/warehouseManage/position/AddDialog.vue
@@ -53,7 +53,7 @@
v-model="editConfig.infomation.parentId"
placeholder="璇烽�夋嫨"
size="mini"
- :disabled="editCommonConfig.title=='缂栬緫'"
+ :disabled="editCommonConfig.title!='鏂板缓'"
style="width: 90%"
>
<el-option v-for="item in positionList" :key="item.id" :label="item.name" :value="item.id">
@@ -68,7 +68,7 @@
<el-select
v-model="editConfig.infomation.type"
filterable
- :disabled="editCommonConfig.title=='缂栬緫'"
+ :disabled="editCommonConfig.title!='鏂板缓'"
placeholder="璇烽�夋嫨"
style="width: 90%"
no-data-text="鏆傛棤鏁版嵁"
@@ -245,7 +245,7 @@
productClick() {},
// 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず
setBottonView() {
- if (this.editConfig.title === "鏂板缓") {
+ if (this.editConfig.title === "鏂板缓"||this.editConfig.title === "缂栬緫") {
this.showEdit = false
this.showFooter = true
} else if (this.editConfig.infomation.status === "瀹屾垚") {
diff --git a/src/views/warehouseManage/position/index.vue b/src/views/warehouseManage/position/index.vue
index 78077cc..5ab6b05 100644
--- a/src/views/warehouseManage/position/index.vue
+++ b/src/views/warehouseManage/position/index.vue
@@ -15,8 +15,26 @@
ref="tableListRef"
:table-list="tableList"
:show-checkcol="false"
- @tableRowClick="tableRowClick"
- ></TableCommonView>
+ >
+ <template slot="tableButton">
+ <el-table-column label="鎿嶄綔" width="120" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ @click="tableRowClick(scope.row,'edit')"
+ type="text"
+ size="small"
+ >缂栬緫</el-button
+ >
+ <el-button
+ type="text"
+ size="small"
+ @click="tableRowClick(scope.row,'look')"
+ >鏌ョ湅</el-button
+ >
+ </template>
+ </el-table-column>
+ </template>
+ </TableCommonView>
</div>
<div class="btn-pager">
<PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -138,9 +156,8 @@
this.getData()
},
// 琛岀偣鍑�
- tableRowClick(row) {
- console.log(row)
- this.editConfig.title = "缂栬緫"
+ tableRowClick(row,val) {
+ this.editConfig.title = val=='look'?'鏌ョ湅':"缂栬緫"
this.editConfig.infomation = { ...row }
this.editConfig.infomation.parentId = this.editConfig.infomation.parentId?Number(this.editConfig.infomation.parentId):null
this.editConfig.visible = true
diff --git a/src/views/warehouseManage/warehouse/AddDialog.vue b/src/views/warehouseManage/warehouse/AddDialog.vue
index 3a53609..9894ef6 100644
--- a/src/views/warehouseManage/warehouse/AddDialog.vue
+++ b/src/views/warehouseManage/warehouse/AddDialog.vue
@@ -176,7 +176,7 @@
productClick() {},
// 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず
setBottonView() {
- if (this.editConfig.title === "鏂板缓") {
+ if (this.editConfig.title === "鏂板缓"||this.editConfig.title === "缂栬緫") {
this.showEdit = false
this.showFooter = true
} else if (this.editConfig.infomation.status === "瀹屾垚") {
diff --git a/src/views/warehouseManage/warehouse/index.vue b/src/views/warehouseManage/warehouse/index.vue
index ced4d42..3cacba9 100644
--- a/src/views/warehouseManage/warehouse/index.vue
+++ b/src/views/warehouseManage/warehouse/index.vue
@@ -15,8 +15,26 @@
ref="tableListRef"
:table-list="tableList"
:show-checkcol="false"
- @tableRowClick="tableRowClick"
- ></TableCommonView>
+ >
+ <template slot="tableButton">
+ <el-table-column label="鎿嶄綔" width="120" fixed="right">
+ <template slot-scope="scope">
+ <el-button
+ @click="tableRowClick(scope.row,'edit')"
+ type="text"
+ size="small"
+ >缂栬緫</el-button
+ >
+ <el-button
+ type="text"
+ size="small"
+ @click="tableRowClick(scope.row,'look')"
+ >鏌ョ湅</el-button
+ >
+ </template>
+ </el-table-column>
+ </template>
+ </TableCommonView>
</div>
<div class="btn-pager">
<PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -125,8 +143,8 @@
this.getData()
},
// 琛岀偣鍑�
- tableRowClick(row) {
- this.editConfig.title = "缂栬緫"
+ tableRowClick(row,val) {
+ this.editConfig.title = val=='look'?'鏌ョ湅':"缂栬緫"
this.editConfig.infomation = { ...row }
this.editConfig.visible = true
},
--
Gitblit v1.8.0