From b95bdc2199e991c4643814663a005c5e0e7d5048 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期二, 18 二月 2025 12:43:59 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue | 121 +++++++++++++++++++++++++--------------
1 files changed, 77 insertions(+), 44 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue b/north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue
index 412978b..6921c96 100644
--- a/north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue
+++ b/north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue
@@ -162,9 +162,10 @@
//琛ㄥご鎸夐挳
toolbarConfig: {
- buttons: [
- {'code': 'add', 'name': t('basicData.insert'),status: 'primary'},
- ],
+ slots:{
+ buttons: "toolbar_buttons",
+ tools:'add'
+ },
// import: false,
// export: true,
@@ -187,6 +188,11 @@
}
}
}
+}
+
+const add = () => {
+ rowIndex.value = null
+ dialogTableVisible.value = true
}
request.get('/basicData/getBasicData').then(res => {
@@ -233,57 +239,76 @@
}
const handleChange = () => {
- console.log(basic.value.basicType[1])
- request.get(`/basicData/BasicDataByType/${basic.value.basicType[0]}/${basic.value.basicType[1]}`).then(res => {
- if(res.code==='200'){
- xGrid.value.reloadData(res.data)
- }
- })
+ if(basic.value.basicType==null){
+ request.get('/basicData/getBasicData').then(res => {
+ if(res.code==='200'){
+ xGrid.value.reloadData(res.data)
+ }
+ })
+ }else{
+ request.get(`/basicData/BasicDataByType/${basic.value.basicType[0]}/${basic.value.basicType[1]}`).then(res => {
+ if(res.code==='200'){
+ xGrid.value.reloadData(res.data)
+ }
+ })
+ }
+
}
</script>
<template>
- <div>
- <el-row>
- <el-col :span="8">
- <el-cascader
- v-model="basic.basicType"
- @change="handleChange"
- :options="options"
- clearable
- placeholder=""
- />
- </el-col>
- </el-row>
- <vxe-grid
- style="width: 40vw;"
- class="mytable-scrollbar"
- max-height="500px"
- ref="xGrid"
- v-bind="gridOptions"
- v-on="gridEvents"
- >
- <template #button_slot="{ row }">
- <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{ $t('basicData.edit') }}</el-button>
- <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
- <template #reference>
- <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
- </template>
- </el-popconfirm>
- </template>
+ <div style="width: 100%;height: 100%">
- <template #num1_filter="{ column, $panel }">
- <div>
- <div v-for="(option, index) in column.filters" :key="index">
- <input v-model="option.data" type="text" @input="changeFilterEvent($event, option, $panel)"/>
+ <div class="main-table">
+ <vxe-grid
+ class="mytable-scrollbar"
+ height="100%"
+ ref="xGrid"
+ v-bind="gridOptions"
+ v-on="gridEvents"
+ >
+ <template #button_slot="{ row }">
+ <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{ $t('basicData.edit') }}</el-button>
+ <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
+ <template #reference>
+ <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
+ </template>
+ </el-popconfirm>
+ </template>
+
+ <template #num1_filter="{ column, $panel }">
+ <div>
+ <div v-for="(option, index) in column.filters" :key="index">
+ <input
+ v-model="option.data"
+ type="text"
+ @keyup.enter.native="$panel.confirmFilter()"
+ @input="changeFilterEvent($event, option, $panel)"/>
+ </div>
</div>
- </div>
- </template>
+ </template>
+
+ <template #toolbar_buttons>
+ <el-col :span="8">
+ <el-cascader
+ v-model="basic.basicType"
+ @change="handleChange"
+ :options="options"
+ clearable
+ :placeholder="$t('processCard.pleaseSelect')"
+ />
+ </el-col>
+ </template>
+ <template #add>
+ <el-button @click="add" type="primary" style="margin-right: 3px">鏂板</el-button>
+
+ </template>
- </vxe-grid>
+ </vxe-grid>
+ </div>
<el-dialog
v-model="dialogTableVisible"
destroy-on-close
@@ -294,5 +319,13 @@
</template>
<style scoped>
+.head{
+ width: 100%;
+ height: 35px;
+}
+.main-table{
+ width: 100%;
+ height: calc(100% - 0px);
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0