From 58e803fffe35d5ac39599d5ad6b3359e374b1808 Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期一, 23 十月 2023 12:03:53 +0800 Subject: [PATCH] 库存调整-历史路由跳转添加字段 --- src/views/productManage/product/index.vue | 42 ++++++++++++++++++++++++++++++------------ 1 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/views/productManage/product/index.vue b/src/views/productManage/product/index.vue index c6f0298..0b32e39 100644 --- a/src/views/productManage/product/index.vue +++ b/src/views/productManage/product/index.vue @@ -29,7 +29,7 @@ </div> <!-- 鍥捐〃褰㈠紡 --> <div v-if="isIconIndex === '1'" class="product-view"> - <div class="product-box" v-for="item in tableList.tableInfomation" :key="item.id" @click="tableRowClick(item)"> + <div class="product-box" v-for="item in tableList.tableInfomation" :key="item.id" @click="showDetail(item)"> <div class="left"> <!-- <el-image style="width: 60px; height: 80px" :src="url"></el-image> --> <div class="img-view"> @@ -58,12 +58,20 @@ ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol" - @tableRowClick="tableRowClick" > + <template slot="tableButton"> + <el-table-column label="鎿嶄綔" width="90" align="center"> + <template slot-scope="scope"> + <span @click.stop="showDetail(scope.row)" class="cursor_pointer" style="margin-right: 10px"> + <span style="color: #2a78fb">鏌ョ湅</span> + </span> + <span @click.stop="editRow(scope.row)" class="cursor_pointer"> + <span style="color: #2a78fb">缂栬緫</span> + </span> + </template> + </el-table-column> + </template> </TableCommonView> - <!-- <div class="btn-pager"> - <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> - </div> --> </div> <div class="btn-pager"> <PagerView class="page" :pager-options="pagerOptions" :page-size="pageSizes" v-on="pagerEvents" /> @@ -99,7 +107,8 @@ editConfig: { visible: false, title: "鏂板缓", - infomation: {} + infomation: {}, + autoEdit: false }, isIconIndex: "2", // 1 鍥炬爣 2 鍒楄〃 url: "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg", @@ -125,7 +134,8 @@ } this.tableList = { tableInfomation: [], - selectBox: true, + selectBox: false, + selectIndex: true, showcol: this.showcol, allcol: [], tableColumn: this.setTableColumn(this.showcol) @@ -249,16 +259,24 @@ }, // 鏂板缓 addBtnClick() { - this.editConfig.visible = true this.editConfig.title = "鏂板缓" this.editConfig.infomation = {} - }, - // 琛岀偣鍑� - tableRowClick(row) { - console.log(row) this.editConfig.visible = true + }, + // 璇︽儏 + showDetail(row) { + console.log(row) + this.editConfig.autoEdit = false this.editConfig.title = "缂栬緫" this.editConfig.infomation = { ...row } + this.editConfig.visible = true + }, + // 缂栬緫 + editRow(row){ + this.editConfig.autoEdit = true + this.editConfig.title = "缂栬緫" + this.editConfig.infomation = { ...row } + this.editConfig.visible = true }, // 鍒囨崲鍒楄〃灞曠幇褰㈠紡 selIconSwitchClick(value) { -- Gitblit v1.8.0