From 301cbea766080fb65b8c6af563388b61606322f3 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期四, 19 十月 2023 14:23:25 +0800
Subject: [PATCH] Merge branch 'dev' into songshankun/adjust-style
---
src/views/operate/scrap/AddScrapDialog.vue | 4
src/views/overview/OverviewListView.vue | 47 ++++++++++-
src/views/operate/scrap/index.vue | 140 +++++++++++++++++++++-------------
3 files changed, 129 insertions(+), 62 deletions(-)
diff --git a/src/views/operate/scrap/AddScrapDialog.vue b/src/views/operate/scrap/AddScrapDialog.vue
index a2fd3e4..3dc7f47 100644
--- a/src/views/operate/scrap/AddScrapDialog.vue
+++ b/src/views/operate/scrap/AddScrapDialog.vue
@@ -212,7 +212,7 @@
},
// 璁剧疆鍒犻櫎/鎵撳嵃/缂栬緫鏄惁鏄剧ず
setBottonView() {
- if (this.editConfig.title === "鏂板缓") {
+ if (this.editConfig.title === "鏂板缓"||this.editConfig.title==="缂栬緫") {
this.showButton = false
this.showEdit = false
this.showFooter = true
@@ -224,7 +224,7 @@
this.isValidateClick = false
} else {
this.showButton = true
- this.showEdit = true
+ this.showEdit = false
this.showFooter = false
this.isValidateClick = true
}
diff --git a/src/views/operate/scrap/index.vue b/src/views/operate/scrap/index.vue
index d971893..5a10919 100644
--- a/src/views/operate/scrap/index.vue
+++ b/src/views/operate/scrap/index.vue
@@ -16,22 +16,43 @@
:table-list="tableList"
:show-checkcol="false"
@tableRowClick="tableRowClick"
- ></TableCommonView>
+ >
+ <template slot="tableButton">
+ <el-table-column fixed="right" label="鎿嶄綔" width="100">
+ <template slot-scope="scope">
+ <el-button
+ @click="examineClick(scope.row)"
+ type="text"
+ size="small"
+ >鏌ョ湅</el-button
+ >
+ <el-button type="text" v-if="scope.row.status!=4" size="small" @click="editClick(scope.row)">缂栬緫</el-button>
+ </template>
+ </el-table-column>
+ </template>
+ </TableCommonView>
</div>
<div class="btn-pager">
- <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+ <PagerView
+ class="page"
+ :pager-options="pagerOptions"
+ v-on="pagerEvents"
+ />
</div>
</div>
<!-- 鏂板缓/缂栬緫 -->
- <AddScrapDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
+ <AddScrapDialog
+ v-if="editConfig.visible"
+ :editCommonConfig="editConfig"
+ />
</div>
</template>
<script>
-import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
-import { getDisuseList } from "@/api/operate/scrap"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin";
+import { getDisuseList } from "@/api/operate/scrap";
// import DetailProduct from "@/views/productManage/product/DetailProduct"
-import AddScrapDialog from "@/views/operate/scrap/AddScrapDialog"
+import AddScrapDialog from "@/views/operate/scrap/AddScrapDialog";
export default {
name: "ScrapView",
@@ -46,16 +67,29 @@
editConfig: {
visible: false,
title: "鏂板缓",
- infomation: {}
+ infomation: {},
+ showEdit:false,
},
- keyword: ""
- }
+ keyword: "",
+ };
},
created() {
- this.setTable()
- this.getData()
+ this.setTable();
+ this.getData();
},
methods: {
+ // 鏌ョ湅
+ examineClick(row) {
+ this.editConfig.title = "鏌ョ湅";
+ this.editConfig.infomation = { ...row };
+ this.editConfig.visible = true;
+ },
+ editClick(row){
+ console.log(row,"缂栬緫")
+ this.editConfig.title = "缂栬緫";
+ this.editConfig.infomation = { ...row };
+ this.editConfig.visible = true;
+ },
setTable() {
this.tableList = {
tableInfomation: [],
@@ -63,61 +97,61 @@
selectIndex: true,
showcol: this.showcol,
allcol: [],
- tableColumn: this.setTableColumn(this.showcol)
- }
- let allcol = []
+ tableColumn: this.setTableColumn(this.showcol),
+ };
+ let allcol = [];
for (let i = 0; i < this.tableList.tableColumn.length; i++) {
if (!this.tableList.tableColumn[i].default) {
- const label = this.tableList.tableColumn[i].label
- allcol.push(label)
+ const label = this.tableList.tableColumn[i].label;
+ allcol.push(label);
}
}
- this.tableList.allcol = allcol
+ this.tableList.allcol = allcol;
},
setTableColumn(showcol) {
- console.log(showcol)
+ console.log(showcol);
let tableColumn = [
{
label: "鍗曞彿",
prop: "number",
isShowColumn: true,
- default: true
+ default: true,
},
{
label: "鏃ユ湡",
prop: "operationDate",
isShowColumn: true,
- default: true
+ default: true,
},
{
label: "浜у搧",
prop: "productName",
isShowColumn: true,
- default: true
+ default: true,
},
{
label: "鏁伴噺",
prop: "amount",
isShowColumn: true,
- default: false
+ default: false,
},
{
label: "璁¢噺鍗曚綅",
prop: "unit",
isShowColumn: true,
- default: false
+ default: false,
},
{
label: "婧愪綅缃�",
prop: "from",
isShowColumn: true,
- default: false
+ default: false,
},
{
label: "鎶ュ簾浣嶇疆",
prop: "to",
isShowColumn: true,
- default: false
+ default: false,
},
{
label: "鐘舵��",
@@ -127,61 +161,61 @@
default: false,
status: true,
isCallMethod: true,
- getCallMethod: this.getStatus
- }
- ]
- return tableColumn
+ getCallMethod: this.getStatus,
+ },
+ ];
+ return tableColumn;
},
selTableCol(val) {
- this.showcol = val
- this.tableList.tableColumn = this.setTableColumn(val)
+ this.showcol = val;
+ this.tableList.tableColumn = this.setTableColumn(val);
},
// 璇锋眰鏁版嵁
async getData() {
await getDisuseList({
number: this.keyword,
page: this.pagerOptions.currPage,
- pageSize: this.pagerOptions.pageSize
+ pageSize: this.pagerOptions.pageSize,
}).then((res) => {
if (res.code === 200) {
const list = res.data.map((item) => {
return {
...item,
from: item.fromLocation.name,
- to: item.toLocation.name
- }
- })
- this.tableList.tableInfomation = list || []
- this.pagerOptions.totalCount = res.total
+ to: item.toLocation.name,
+ };
+ });
+ this.tableList.tableInfomation = list || [];
+ this.pagerOptions.totalCount = res.total;
}
- })
+ });
},
// 鎼滅储
getList(val) {
- this.keyword = val
- console.log(val)
- this.pagerOptions.currPage = 1
- this.getData()
+ this.keyword = val;
+ console.log(val);
+ this.pagerOptions.currPage = 1;
+ this.getData();
},
// 琛岀偣鍑�
tableRowClick(row) {
- console.log(row)
- this.editConfig.visible = true
- this.editConfig.title = "缂栬緫"
- this.editConfig.infomation = { ...row }
+ console.log(row);
+ // this.editConfig.visible = true;
+ // this.editConfig.title = "缂栬緫";
+ this.editConfig.infomation = { ...row };
},
// 鏂板缓
addBtnClick() {
- this.editConfig.visible = true
- this.editConfig.title = "鏂板缓"
- this.editConfig.infomation = {}
+ this.editConfig.visible = true;
+ this.editConfig.title = "鏂板缓";
+ this.editConfig.infomation = {};
},
// 鐘舵��
getStatus(val) {
- return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚"
- }
- }
-}
+ return val === 1 ? "鑽夌" : val === 3 ? "灏辩华" : "瀹屾垚";
+ },
+ },
+};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
diff --git a/src/views/overview/OverviewListView.vue b/src/views/overview/OverviewListView.vue
index 2cfd31b..9519c51 100644
--- a/src/views/overview/OverviewListView.vue
+++ b/src/views/overview/OverviewListView.vue
@@ -1,5 +1,8 @@
<template>
<div class="rightContent">
+ <div class="label-fixed-element">
+ <span>{{ params.name }}</span>
+ </div>
<div class="top">
<SearchCommonView
:add-title="'鏂板缓'"
@@ -58,7 +61,7 @@
data() {
return {
tableList: {},
- showcol: ["浠�", "鑷�", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鐘舵��"],
+ showcol: ["浠撳簱浣嶇疆", "璋冨嚭浣嶇疆", "璋冨叆浣嶇疆", "鑱旂郴浜�", "鏃ユ湡", "鏉ユ簮鍗曟嵁", "鐘舵��"],
searchOptions: [],
commonDetail: {
visible: false,
@@ -73,10 +76,14 @@
workType: this.$route.params.workType,
keyword: "",
params: {},
- displayEdit: false
+ displayEdit: false,
+ formLabel: "",
+ toLabel: ""
}
},
created() {
+ console.log(this.workType)
+ this.setFormToLabel()
this.setTable()
var paramsData = sessionStorage.getItem("paramsData")
let params = {}
@@ -95,6 +102,18 @@
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: [],
@@ -122,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
},
{
@@ -258,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