From d7557c1681b2da87df6509b3faf5dc4cefac1da2 Mon Sep 17 00:00:00 2001 From: songshankun <songshankun@foxmail.com> Date: 星期四, 19 十月 2023 13:45:30 +0800 Subject: [PATCH] Merge branch 'dev' into songshankun/adjust-style --- src/views/operate/allot/index.vue | 28 ++++++--- src/views/overview/AddOverviewDialog.vue | 7 ++ src/views/overview/OverviewListView.vue | 32 +++++++--- src/views/warehouseManage/bussinessType/AddBussinessType.vue | 3 + src/views/warehouseManage/warehouse/index.vue | 26 +++++++- src/views/warehouseManage/position/AddDialog.vue | 6 +- src/views/warehouseManage/bussinessType/index.vue | 20 ++++-- src/views/warehouseManage/position/index.vue | 27 +++++++- src/views/warehouseManage/warehouse/AddDialog.vue | 2 9 files changed, 110 insertions(+), 41 deletions(-) diff --git a/src/views/operate/allot/index.vue b/src/views/operate/allot/index.vue index 6c29d52..7e8cc34 100644 --- a/src/views/operate/allot/index.vue +++ b/src/views/operate/allot/index.vue @@ -11,12 +11,22 @@ </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" /> @@ -236,11 +246,11 @@ this.pagerOptions.currPage = 1 this.getData() }, - // 琛岀偣鍑� - tableRowClick(row) { + // 鏌ョ湅 缂栬緫 + tableRowClick(row, val) { console.log(row) this.editConfig.visible = true - this.editConfig.title = "缂栬緫" + this.editConfig.title = val this.editConfig.infomation = { ...row } }, // 鏂板缓 diff --git a/src/views/overview/AddOverviewDialog.vue b/src/views/overview/AddOverviewDialog.vue index 4b8465d..54a2cf0 100644 --- a/src/views/overview/AddOverviewDialog.vue +++ b/src/views/overview/AddOverviewDialog.vue @@ -410,10 +410,15 @@ this.showEdit = false this.showFooter = true this.isValidateClick = false - } else if (this.editConfig.title === "鏌ョ湅" && this.editConfig.infomation.status !== 4) { + } else if (this.editConfig.title === "缂栬緫") { this.showButton = true this.showEdit = false this.isDelClick = true + this.showFooter = true + } else if (this.editConfig.title === "鏌ョ湅" && this.editConfig.infomation.status !== 4) { + this.showButton = true + this.showEdit = true + this.isDelClick = true this.showFooter = false if (this.editConfig.infomation.status === "瀹屾垚") { this.isValidateClick = false diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue index 4f5a945..2cfd31b 100644 --- a/src/views/overview/OverviewListView.vue +++ b/src/views/overview/OverviewListView.vue @@ -11,12 +11,22 @@ </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" /> @@ -28,6 +38,7 @@ :work-type="workType" :edit-common-config="editConfig" :add-name="this.$route.params.name" + :display-edit="displayEdit" /> </div> </template> @@ -61,7 +72,8 @@ }, workType: this.$route.params.workType, keyword: "", - params: {} + params: {}, + displayEdit: false } }, created() { @@ -222,11 +234,11 @@ this.pagerOptions.currPage = 1 this.getData() }, - // 琛岀偣鍑� - tableRowClick(row) { + // 鏌ョ湅 缂栬緫 + tableRowClick(row, val) { console.log(row) this.editConfig.visible = true - this.editConfig.title = "缂栬緫" + this.editConfig.title = val this.editConfig.operationTypeId = this.$route.params.id this.editConfig.infomation = { ...row } }, diff --git a/src/views/warehouseManage/bussinessType/AddBussinessType.vue b/src/views/warehouseManage/bussinessType/AddBussinessType.vue index df2d806..39d532e 100644 --- a/src/views/warehouseManage/bussinessType/AddBussinessType.vue +++ b/src/views/warehouseManage/bussinessType/AddBussinessType.vue @@ -294,6 +294,9 @@ this.showButton = false this.showEdit = false this.showFooter = true + } else if (this.editConfig.title === "缂栬緫") { + this.showEdit = false + this.showFooter = true } else { this.showEdit = true this.showFooter = false diff --git a/src/views/warehouseManage/bussinessType/index.vue b/src/views/warehouseManage/bussinessType/index.vue index fa0c8c9..3f6eeea 100644 --- a/src/views/warehouseManage/bussinessType/index.vue +++ b/src/views/warehouseManage/bussinessType/index.vue @@ -11,12 +11,16 @@ </div> <div class="list-view"> <div class="table"> - <TableCommonView - ref="tableListRef" - :table-list="tableList" - :show-checkcol="false" - @tableRowClick="tableRowClick" - ></TableCommonView> + <TableCommonView ref="tableListRef" :table-list="tableList" :show-checkcol="false"> + <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 @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" /> @@ -122,8 +126,8 @@ this.getData() }, // 琛岀偣鍑� - tableRowClick(row) { - this.editConfig.title = "缂栬緫" + tableRowClick(row, val) { + this.editConfig.title = val let obj = JSON.parse(JSON.stringify(row)) for (let i in obj) { if (i == "name" || i == "prefix") { 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