From 1f6c97aa5f23d09a04152038c7d53ce95721cf50 Mon Sep 17 00:00:00 2001
From: clll <1320612696@qq.com>
Date: 星期五, 22 十二月 2023 16:29:51 +0800
Subject: [PATCH] pp、sd模块界面调整,添加vxetable组件和对应界面跳转
---
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue | 189 +++++++++++++++++++++++++++++++----------------
1 files changed, 124 insertions(+), 65 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
index 643db12..9c62e6f 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -1,35 +1,81 @@
<script setup>
import {Search} from "@element-plus/icons-vue";
+import {reactive} from "vue";
+import {useRouter} from "vue-router"
+const router = useRouter()
+const getTableRow = (row,type) =>{
+ switch (type) {
+ case 'edit' :{
+ //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
+ router.push({path: '/main/delivery/createDelivery', query: { deliveryID: 'JG24010101' }})
+ break
+ }
+ case 'delete':{
+ alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
+ break
+ }
+ }
+}
-let deliveryTitle = $ref([
- '搴忓彿',
- '瀹℃牳',
- '鍑哄簱',
- '鍙戣揣鍗曞彿',
- '鍙戣揣鍛�',
- '鍙戣揣鏃ユ湡',
- '瀹㈡埛缂栧彿',
- '瀹㈡埛鍚嶇О',
- '鎵规',
- '椤圭洰鍚嶇О',
- '璁㈠崟缂栧彿',
- '浠樻鏉′欢',
- '浠樻鏂瑰紡',
- '鎬绘暟閲�',
- '鎬婚潰绉�',
- '鎬婚噾棰�',
- '鎶ヨ〃鏃ユ湡',
- '涓氬姟鍛�',
- '閫佽揣鏃ユ湡',
- '鏀舵鏃堕棿'
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ id: 'OrderList',
+ showFooter: true,//鏄剧ず鑴�
+ printConfig: {},
+ importConfig: {},
+ exportConfig: {},
+ scrollY:{ enabled: true },//寮�鍚櫄鎷熸粴鍔�
+ showOverflow:true,
+ columnConfig: {
+ resizable: true,
+ useKey: true
+ },
+ filterConfig: { //绛涢�夐厤缃」
+ remote: true
+ },
+ customConfig: {
+ storage: true
+ },
+ editConfig: {
+ trigger: 'click',
+ mode: 'row',
+ showStatus: true
+ },//琛ㄥご鍙傛暟
+ columns:[
+ {type:'expand',slots: { content:'content' },width: 50},
+ {title: '鎿嶄綔', width: 110, slots: { default: 'button_slot' }},
+ {type: 'seq', title: '鑷簭', width: 80 },
-])
+ {title: '瀹℃牳', width: 40, slots: { default: 'state' }},
+ {title: '鍑哄簱', width: 40, slots: { default: 'state' }},
+ {field: '3',width:120, title: '鍙戣揣鍗曞彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '4',width:120, title: '鍙戣揣鍛�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '5',width:120, title: '鍙戣揣鏃ユ湡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '6',width:120, title: '瀹㈡埛缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '7',width:120, title: '瀹㈡埛鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '8',width:120, title: '鎵规',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '9',width:120, title: '椤圭洰鍚嶇О',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '10',width:120, title: '璁㈠崟缂栧彿',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '11',width:120, title: '浠樻鏉′欢',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '12',width:120, title: '浠樻鏂瑰紡',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '13',width:120, title: '鎬绘暟閲�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
+ {field: '14',width:120, title: '鎬婚潰绉�',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}
-let deliveryList =[
- {
- '0': '1',
- '1': '',
- '2': '',
+
+ ],//琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [],
+ import: false,
+ export: true,
+ print: true,
+ zoom: true,
+ custom: true
+ },
+ data: [{
'3': 'JG23120801',
'4': '閮戠強鐝�',
'5': '2023-12-08',
@@ -48,11 +94,26 @@
'18': '瀹胯縼鏌愭煇鍦板潃',
'19': '2023-12-08'
}
-]
+ ],//table body瀹為檯鏁版嵁
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ if (columnIndex === 0) {
+ return '鍚堣:'
+ }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
</script>
<template>
- <div>
+ <div style="width: 100%;height: 100%">
<el-date-picker
v-model="value1"
type="daterange"
@@ -60,46 +121,44 @@
end-placeholder="缁撴潫鏃堕棿"
/>
<el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">鏌ヨ</el-button>
- <el-table
- :data="deliveryList"
- :header-cell-style="{ 'text-align': 'center' }"
- :cell-style="{ 'text-align': 'center' }"
- lazy
- border
- style="width: 99%;"
- max-height="80vh">
- <el-table-column type="expand" fixed>
- <template #default="props" >
- <div m="4">
- <p m="t-0 b-2">: {{ props.row['2'] }}</p>
+ <vxe-grid
+ max-height="97%"
+ class="mytable-scrollbar"
+ ref="xGrid"
+ v-bind="gridOptions"
+
+ >
+ <!-- 涓嬫媺鏄剧ず鎵�鏈変俊鎭彃妲�-->
+ <template #content="{ row}">
+ <ul class="expand-wrapper">
+ <li v-for="(item,key,index) in row">
+ <span style="font-weight: bold">{{key+': '}}</span>
+ <span>{{ item }}</span>
+ </li>
+ </ul>
+ </template>
+
+ <template #state="{ row}">
+ <el-checkbox checked/>
+ </template>
+
+ <!--宸﹁竟鍥哄畾鏄剧ず鐨勬彃妲�-->
+ <template #button_slot="{ row }">
+ <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">缂栬緫</el-button>
+ <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">鍒犻櫎</el-button>
+ </template>
+
+ <template #num1_filter="{ column, $panel }">
+ <div>
+ <div v-for="(option, index) in column.filters" :key="index">
+ <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
</div>
- </template>
- </el-table-column>
- <el-table-column label="鎿嶄綔" fixed width="110" >
- <el-button link type="primary" size="small">缂栬緫</el-button>
-<!-- <el-button @click="openCraft" link type="primary" size="small">瀹℃牳</el-button>-->
-<!-- <el-button link type="primary" size="small">淇敼</el-button>-->
- <el-button link type="primary" size="small">鍒犻櫎</el-button>
- </el-table-column>
- <el-table-column
- :prop="index.toString()"
- :show-overflow-tooltip='true'
- width="100" v-for="(item,index) in deliveryTitle"
- :label="item" >
- <el-checkbox v-if="index>0 && index<3" checked/>
- </el-table-column>
-
-
- </el-table>
+ </div>
+ </template>
+ </vxe-grid>
</div>
</template>
<style scoped>
-:deep(.el-table .el-input__wrapper) {
- box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
- cursor: default;
- border: none !important;
- background-color: transparent;
-}
</style>
\ No newline at end of file
--
Gitblit v1.8.0