From 47e51078a55706950c21b54ca49e64b7444cdb60 Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期三, 24 四月 2024 16:02:15 +0800
Subject: [PATCH] 销售明细单的样式调整+发货的页面增加仓库
---
src/components/makepager/TableCommonView.vue | 49 +++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/src/components/makepager/TableCommonView.vue b/src/components/makepager/TableCommonView.vue
index 4beb7f3..a45184f 100644
--- a/src/components/makepager/TableCommonView.vue
+++ b/src/components/makepager/TableCommonView.vue
@@ -1,12 +1,13 @@
<!-- eslint-disable vue/no-use-v-if-with-v-for -->
<template>
- <div class="table-view">
+ <div class="table-view" v-loading="loading">
<el-table
ref="table"
border
:data="tableList.tableInfomation"
tooltip-effect="dark"
:height="'calc(100% - 0px)'"
+ :max-height="tableList.maxHeight"
style="width: 100%"
:lazy="tableList.lazy"
:show-summary="showSummary.show"
@@ -18,8 +19,8 @@
@row-click="tableRowClick"
:row-class-name="tableRowClassName"
>
+ <el-table-column v-if="selectBox" type="selection" width="40" :selectable="selectable"> </el-table-column>
<el-table-column v-if="tableList.selectIndex" type="index" label="搴忓彿" width="50"></el-table-column>
- <el-table-column v-if="selectBox" type="selection" width="40"> </el-table-column>
<el-table-column
v-for="(item, i) in tableList.tableColumn"
:key="i"
@@ -125,6 +126,21 @@
item.getCallMethod(scope.row[item.prop], scope.row)
}}</span>
</div>
+ <span
+ v-else-if="item.isClass"
+ :class="
+ item.isClass
+ ? item.getClassName(scope.row[item.prop], scope.row)
+ : ''
+ "
+ >{{
+ scope.row[item.prop]
+ ? scope.row[item.prop]
+ : scope.row[item.prop] === 0
+ ? scope.row[item.prop]
+ : "--"
+ }}</span
+ >
<span v-else>{{ scope.row[item.prop] ? scope.row[item.prop] : "--" }}</span>
</template>
</el-table-column>
@@ -135,8 +151,8 @@
</el-table>
<div class="overSpread1" v-show="iscolopen" @click="onMaskClick"></div>
- <div class="styleBtn">
- <i @click="checkCol()" class="label">...</i>
+ <div class="styleBtn" >
+ <i @click="checkCol()" v-if='colOpenShow' class="label">...</i>
<el-checkbox-group v-model="showcol" v-show="iscolopen" class="checkbox-group" @change="selectCheckBoxList">
<el-checkbox v-for="item in tableList.allcol" :label="item" :key="item">{{ item }} </el-checkbox>
</el-checkbox-group>
@@ -151,6 +167,11 @@
selectBox: {
type: Boolean,
default: false
+ },
+ // 鏄惁鍙互閰嶇疆鍒楄〃 琛ㄥご
+ colOpenShow: {
+ type: Boolean,
+ default: true,
},
tableList: {
type: Object,
@@ -183,8 +204,17 @@
default: () => {
return {}
}
+ },
+ loading: {
+ type: Boolean,
+ default: false
+ },
+ selectBoxList: {
+ type: Array,
+ default: () => []
}
},
+
data() {
return {
iscolopen: false,
@@ -386,6 +416,14 @@
}
}
this.$emit("tableRowClassName", row)
+ },
+ selectable(row) {
+ let list = this.selectBoxList.map((item) => item.number)
+ if (list.findIndex((v) => v == row.number) == -1) {
+ return true
+ } else {
+ return false
+ }
}
}
}
@@ -438,6 +476,9 @@
font-weight: bold;
}
}
+ .el-table__body-wrapper{
+ height:calc(100% - 50px)!important;
+ }
}
::v-deep .el-table .cell {
--
Gitblit v1.8.0