From a660db06773007b1be690e0674829c00a57aeb7b Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 24 十二月 2025 16:21:23 +0800
Subject: [PATCH] 订单首页流程卡新增楼层编号显示
---
north-glass-erp/northglass-erp/src/views/mm/basicData/WarehouseSearchBasicData.vue | 206 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 206 insertions(+), 0 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/mm/basicData/WarehouseSearchBasicData.vue b/north-glass-erp/northglass-erp/src/views/mm/basicData/WarehouseSearchBasicData.vue
new file mode 100644
index 0000000..db29e70
--- /dev/null
+++ b/north-glass-erp/northglass-erp/src/views/mm/basicData/WarehouseSearchBasicData.vue
@@ -0,0 +1,206 @@
+<script setup>
+import {reactive, ref} from "vue";
+import {VXETable} from "vxe-table";
+import {ElMessage} from "element-plus";
+import request from "@/utils/request"
+import CreateBasicData from "@/views/sd/basicData/CreateBasicData.vue"
+import {useRouter,useRoute} from "vue-router"
+import {useI18n} from "vue-i18n"
+import WarehouseCreateBasicData from "@/views/mm/basicData/WarehouseCreateBasicData.vue";
+import useUserInfoStore from "@/stores/userInfo";
+const { t } = useI18n()
+const userStore = useUserInfoStore()
+let dialogTableVisible = ref(false)
+const router = useRouter()
+const xGrid = ref()
+const gridOptions = reactive({
+ border: "full",//琛ㄦ牸鍔犺竟妗�
+ keepSource: true,//淇濇寔婧愭暟鎹�
+ align: 'center',//鏂囧瓧灞呬腑
+ stripe:true,//鏂戦┈绾�
+ rowConfig: {isCurrent: true, isHover: true,height: 30},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒
+ 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:[
+ {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",},
+ {type: 'seq', title: t('basicData.Number'), width: 80 ,fixed:"left",},
+ {field:'operateTypeName',title: t('warehouseBasicData.operateTypeName')},
+ {field:'operateType',title: t('warehouseBasicData.operateType')},
+ {field:'type',title: t('warehouseBasicData.type')},
+ {field:'createTime',title: t('basicData.creationTime')},
+
+
+ ],
+
+ //琛ㄥご鎸夐挳
+ toolbarConfig: {
+ buttons: [
+ {'code': 'add', 'name': t('basicData.insert'),status: 'primary'},
+ ],
+
+ // import: false,
+ // export: true,
+ // print: true,
+ zoom: true,
+ custom: true
+ },
+
+ footerMethod ({ columns, data }) {//椤佃剼鍑芥暟
+ return[
+ columns.map((column, columnIndex) => {
+ // if (columnIndex === 0) {
+ // return t('basicData.total')
+ // }
+ // if (props.tableProp.footList.includes(column.field)) {
+ // return sumNum(data, column.field)
+ // }
+ return ''
+ })
+ ]
+ }
+
+})
+const gridEvents = {
+ toolbarButtonClick ({ code }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (code) {
+ case 'add': {
+ rowIndex.value = null
+ dialogTableVisible.value = true
+ break
+ }
+
+ }
+ }
+ },
+ menuClick ({ menu, row, column }) {
+ const $grid = xGrid.value
+ if ($grid) {
+ switch (menu.code) {
+
+
+ }
+ }
+ }
+}
+
+const options = ref({
+ originalFilm: t('ingredients.originalFilm'),
+ accessories: t('ingredients.accessories')
+ })
+
+
+request.post(`/BasicWarehouse/getBasicWarehouse`,options.value).then(res => {
+ if(res.code==='200'){
+ xGrid.value.reloadData(res.data)
+ }
+})
+
+const getChildrenFunction = (flag) => {
+ if(flag){
+ router.push({
+ path:'/main/warehouseBasicData/warehouseSearchBasicData',
+ query:{random:Math.random()
+ }
+ })
+ }
+}
+
+let rowIndex = ref(null)
+const getTableRow = (row,type) => {
+ switch (type) {
+ case 'edit': {
+ rowIndex.value = row
+ dialogTableVisible.value = true
+ break
+ }
+ case 'delete': {
+ request.post(`/BasicWarehouse/deleteBasicWarehouse`,row).then((res) => {
+ if(res.code==200 && res.data===true){
+ ElMessage.success(t('searchOrder.msgDeleteSuccess'))
+ router.push({
+ path:'/main/warehouseBasicData/warehouseSearchBasicData',
+ query:{random:Math.random()
+ }
+ })
+ }else{
+ ElMessage.warning(t('searchOrder.msgDeleteFail'))
+ }
+ }).catch((err)=>{
+ ElMessage.error(t('basicData.msg.ServerConnectionError'))
+ router.push("/login")
+ })
+ break
+ }
+
+ }
+}
+
+</script>
+
+<template>
+ <div style="width: 100%;height: 100%">
+ <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')"
+ v-if="userStore.user.permissions.indexOf('warehouseSearchBasicData.edit') > -1"
+ 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>
+
+ </vxe-grid>
+ </div>
+ <el-dialog
+ v-model="dialogTableVisible"
+ destroy-on-close
+ style="width: 30%;height:30% ">
+ <WarehouseCreateBasicData :rowIndex="rowIndex" @gaveParent='getChildrenFunction'/>
+ </el-dialog>
+ </div>
+</template>
+
+<style scoped>
+.head{
+ width: 100%;
+ height: 70px;
+}
+
+.main-table{
+ width: 100%;
+ height: calc(100% - 0px);
+}
+</style>
\ No newline at end of file
--
Gitblit v1.8.0