From 4d339741f0702a93127af2f4dc04f07a65ec7cde Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期四, 19 十月 2023 14:01:36 +0800
Subject: [PATCH] 概述-列表出库,入库,调拨 时列表字段文案调整
---
src/views/overview/OverviewListView.vue | 113 ++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 88 insertions(+), 25 deletions(-)
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 51a2432..9519c51 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -1,9 +1,12 @@
<template>
<div class="rightContent">
+ <div class="label-fixed-element">
+ <span>{{ params.name }}</span>
+ </div>
<div class="top">
<SearchCommonView
:add-title="'鏂板缓'"
- :placeholder="'璇疯緭鍏ュ崟鍙�'"
+ :placeholder="'璇疯緭鍏ュ崟鍙�/鏉ユ簮鍗曟嵁'"
:amount-view="false"
@addCommonClick="addBtnClick"
@searchClick="getList"
@@ -11,12 +14,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 +41,7 @@
:work-type="workType"
:edit-common-config="editConfig"
:add-name="this.$route.params.name"
+ :display-edit="displayEdit"
/>
</div>
</template>
@@ -47,7 +61,7 @@
data() {
return {
tableList: {},
- showcol: ["浠�", "鑷�", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鐘舵��"],
+ showcol: ["浠撳簱浣嶇疆", "璋冨嚭浣嶇疆", "璋冨叆浣嶇疆", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鐘舵��"],
searchOptions: [],
commonDetail: {
visible: false,
@@ -59,19 +73,52 @@
title: "鏂板缓",
infomation: {}
},
- workType: this.$route.params.workType
+ workType: this.$route.params.workType,
+ keyword: "",
+ params: {},
+ displayEdit: false,
+ formLabel: "",
+ toLabel: ""
}
},
created() {
+ console.log(this.workType)
+ this.setFormToLabel()
this.setTable()
+ var paramsData = sessionStorage.getItem("paramsData")
+ let params = {}
+ if (paramsData) {
+ params = JSON.parse(sessionStorage.getItem("paramsData"))
+ } else {
+ params = this.$route.params
+ sessionStorage.setItem("paramsData", JSON.stringify(params))
+ }
+ this.params = params
this.getData()
- console.log(this.$route.params.workType)
+ // console.log(this.$route.params.workType)
+ },
+ // 椤甸潰閿�姣佷箣鍓�
+ beforeDestroy() {
+ 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: [],
- selectBox: true,
+ selectBox: false,
+ selectIndex: true,
showcol: this.showcol,
allcol: [],
tableColumn: this.setTableColumn(this.showcol)
@@ -94,15 +141,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
},
{
@@ -156,7 +203,7 @@
// },
{
label: "鍏ュ簱绫诲瀷",
- prop: "faultTime",
+ prop: "operationTypeName",
isShowColumn: showcol.includes("鍏ュ簱绫诲瀷"),
default: false
},
@@ -180,13 +227,14 @@
// 璇锋眰鏁版嵁
async getData() {
await getOperation({
- operationTypeId: this.$route.params.id,
+ number: this.keyword,
+ operationTypeId: this.params.id,
page: this.pagerOptions.currPage,
pageSize: this.pagerOptions.pageSize
}).then((res) => {
- console.log(res.data.data)
- if (res.data.code === 200) {
- const list = res.data.data.map((item) => {
+ console.log(res.data)
+ if (res.code === 200) {
+ const list = res.data.map((item) => {
return {
...item,
from: item.fromLocation.name,
@@ -194,21 +242,22 @@
}
})
this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.data.total
+ this.pagerOptions.totalCount = res.total
}
})
},
// 鎼滅储
getList(val) {
console.log(val)
+ this.keyword = val
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 }
},
@@ -228,4 +277,18 @@
</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