Quellcode durchsuchen

feat: ✨ 完成项目管理、库存统计,修复一些问题

@sun-chaoqun vor 2 Jahren
Ursprung
Commit
13f49b0135

+ 18 - 2
src/assets/iconfont.css

@@ -1,7 +1,7 @@
 @font-face {
   font-family: 'iconfont'; /* Project id 3967191 */
-  src: url('iconfont.woff2?t=1682575238340') format('woff2'), url('iconfont.woff?t=1682575238340') format('woff'),
-    url('iconfont.ttf?t=1682575238340') format('truetype');
+  src: url('iconfont.woff2?t=1683771119671') format('woff2'), url('iconfont.woff?t=1683771119671') format('woff'),
+    url('iconfont.ttf?t=1683771119671') format('truetype');
 }
 
 .iconfont {
@@ -12,6 +12,22 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-jichuguanli:before {
+  content: '\ue651';
+}
+
+.icon-wodexiangmu:before {
+  content: '\ue609';
+}
+
+.icon-xiangmuguanli:before {
+  content: '\ue614';
+}
+
+.icon-xiangmuguanli1:before {
+  content: '\ue6db';
+}
+
 .icon-cangkujichushuju:before {
   content: '\ue7d3';
 }

BIN
src/assets/iconfont.ttf


BIN
src/assets/iconfont.woff


BIN
src/assets/iconfont.woff2


+ 4 - 0
src/hooks/useTablePublic.ts

@@ -27,6 +27,10 @@ export interface OvertimeUserInfoIn {
 export const Project_State = [
   { id: 1, name: '待审核' },
   { id: 2, name: '进行中' },
+  { id: 3, name: '已完成' }
+]
+
+export const Project_F_State = [
   { id: 3, name: '已完成' },
   { id: 4, name: '已发绩效' }
 ]

+ 0 - 1
src/layouts/Menu/SubMenu.vue

@@ -8,7 +8,6 @@ defineProps<{ menuList: Menu.MenuOptions[] }>()
 const handleClickMenu = (route: Menu.MenuOptions) => {
   router.push(route.path)
 }
-// console.log(prop.menuList)
 
 const isUnicode = (val: string | undefined) => {
   if (!val) return false

+ 1 - 27
src/router/modules/staticRouter.ts

@@ -89,36 +89,10 @@ export const staticRouter: RouteRecordRaw[] = [
       {
         path: '/projectMange',
         name: 'ProjectMange',
-        redirect: '/contract',
         meta: {
           title: '项目管理'
         },
-        children: [
-          {
-            path: '/projectFinance',
-            name: 'ProjectFinance',
-            component: () => import('@/views/project/ProjectFinance.vue'),
-            meta: {
-              title: '项目管理(财务)'
-            }
-          },
-          {
-            path: '/project',
-            name: 'Project',
-            component: () => import('@/views/project/Project.vue'),
-            meta: {
-              title: '项目管理'
-            }
-          },
-          {
-            path: '/myProject',
-            name: 'MyProject',
-            component: () => import('@/views/project/MyProject.vue'),
-            meta: {
-              title: '我的项目'
-            }
-          }
-        ]
+        children: []
       },
       {
         path: '/user',

+ 5 - 0
src/styles/element/dark.scss

@@ -46,6 +46,11 @@ html.dark {
     .salary .info-content {
       color: var(--font-color) !important;
     }
+    .card,
+    .el-card,
+    .table-header {
+      border: none;
+    }
   }
   .home-container .el-aside {
     background-color: var(--el-bg-color);

+ 13 - 8
src/utils/common.ts

@@ -46,17 +46,17 @@ export const getAllBreadcrumbList = (menuList: any, result: { [key: string]: any
 }
 
 const path = {
-  // home: ['/home'],
   roles: ['/roles'],
   users: ['/users'],
   salary: ['/salary'],
-  salarys: ['/salaryCount', '/salaryMy'],
-  workAttendance: ['/leave', '/myLeave', '/myOvertime', '/overtime', '/recordsFinance'],
   records: ['/records'],
-  storehouse: ['/list', '/classify', '/productionList', '/ioTNetworkCard', '/inventoryStatistics'],
-  inventory: ['/device', '/inStorage'],
   outStock: ['/outStock'],
-  sales: ['/contract', '/contractSale']
+  inventory: ['/device', '/inStorage'],
+  sales: ['/contract', '/contractSale'],
+  salarys: ['/salaryCount', '/salaryMy'],
+  project: ['/projectFinance', '/project', '/myProject'],
+  workAttendance: ['/leave', '/myLeave', '/myOvertime', '/overtime', '/recordsFinance'],
+  storehouse: ['/list', '/classify', '/productionList', '/ioTNetworkCard', '/inventoryStatistics']
 }
 
 const permissionPath = (permission: string) => {
@@ -80,8 +80,9 @@ const permissionPath = (permission: string) => {
     return '/storehouse/outStock'
   } else if (path.sales.includes(permission)) {
     return '/storehouse/sales'
+  } else if (path.project.includes(permission)) {
+    return '/project'
   }
-  // return '/home'
 }
 
 const get_name = (name: string): string => {
@@ -195,7 +196,11 @@ export const icons: iconsType = {
   ue7e8: '\ue7e8',
   ue62a: '\ue62a',
   ue63a: '\ue63a',
-  ue7d3: '\ue7d3'
+  ue7d3: '\ue7d3',
+  ue6db: '\ue6db',
+  ue614: '\ue614',
+  ue609: '\ue609',
+  ue651: '\ue651'
 }
 export function debounce<T extends (...args: any[]) => any>(fn: T, delay: number): (...args: Parameters<T>) => void {
   let timerId: number | undefined

+ 0 - 38
src/views/account/roles/index.scss

@@ -1,37 +1,7 @@
-.grid-content {
-  background-color: #e4e7ed;
-  padding: 1rem 2rem;
-  max-height: 3.5rem;
-  height: 3.5rem;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  white-space: nowrap;
-}
-.grid-active {
-  display: flex;
-  justify-content: start;
-  align-items: center;
-  flex-wrap: nowrap;
-  position: relative;
-}
-.grid-submit {
-  position: absolute;
-  right: 0.625rem;
-}
-.el-checkbox-group {
-  display: flex;
-  overflow-x: auto;
-}
 .el-row {
   margin-bottom: 1rem;
   max-height: 3.5rem;
 }
-h3 span {
-  font-size: 1rem;
-  color: #606266;
-}
-
 .input-suffix {
   width: 100%;
   .w-50 {
@@ -48,11 +18,3 @@ h3 span {
   display: flex;
   justify-content: space-between;
 }
-
-:deep(.el-table--enable-row-hover .el-table__body tr > td) {
-  transition: all 0.5s ease-in-out;
-}
-:deep(.el-table--enable-row-hover .el-table__body tr:hover > td) {
-  box-shadow: 0 0 6px #dfdfdf;
-  transform: translateX(-2px);
-}

+ 10 - 23
src/views/account/users/Users.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-import { ref, nextTick } from 'vue'
+import { ref, nextTick, reactive } from 'vue'
 import { GlobalStore } from '@/stores/index'
 import DrawerFrom from './components/DrawerFrom.vue'
 import TableBase from '@/components/TableBase/index.vue'
@@ -12,10 +12,10 @@ const action = ref(true)
 const globalStore = GlobalStore()
 const TableRef = ref<InstanceType<typeof TableBase> | null>(null)
 const drawerFromRef = ref<InstanceType<typeof DrawerFrom> | null>(null)
-const initParam = {
+const initParam = reactive({
   User_tokey: globalStore.GET_User_tokey,
   T_name: ''
-}
+})
 
 const columns: ColumnProps[] = [
   { type: 'index', label: '#', width: 80, fixed: 'left' },
@@ -37,21 +37,12 @@ const columns: ColumnProps[] = [
   { prop: 'T_marry', label: '婚否', name: 'T_marry' },
   { prop: 'operation', label: '操作', width: 200, fixed: 'right' }
 ]
-const openDrawerFrom = () => {
-  drawerFromRef.value?.openDrawer()
-}
-
-const UpdateTableList = () => {
-  TableRef.value?.getTableList()
-}
-
-const UpdateAction = (val: boolean) => {
-  action.value = val
-}
-
+const openDrawerFrom = () => drawerFromRef.value?.openDrawer()
+const UpdateTableList = () => TableRef.value?.getTableList()
+const UpdateAction = (val: boolean) => (action.value = val)
 const EditUserInfo = (row: any) => {
   action.value = false
-  drawerFromRef.value?.openDrawer()
+  openDrawerFrom()
   drawerFromRef.value?.DataEcho(row)
 }
 const DeleteUserInfo = (row: any) => {
@@ -65,7 +56,7 @@ const DeleteUserInfo = (row: any) => {
       if (res.Code === 200) {
         ElMessage.success('删除成功!')
         nextTick(() => {
-          TableRef.value?.getTableList()
+          UpdateTableList()
         })
       }
     })
@@ -75,11 +66,7 @@ const DeleteUserInfo = (row: any) => {
 }
 
 // search
-const search = ref<string>('')
-const SearchInfo = () => {
-  initParam.T_name = search.value
-  TableRef.value?.searchTable()
-}
+const SearchInfo = () => TableRef.value?.searchTable()
 </script>
 
 <template>
@@ -90,7 +77,7 @@ const SearchInfo = () => {
           <el-row :gutter="20">
             <el-col :span="12">
               <span class="ml-3 w-35 text-gray-600 inline-flex items-center">账户查询:</span>
-              <el-input type="text" class="w-50 m-2" v-model="search" placeholder="输入账户名称查询" />
+              <el-input type="text" class="w-50 m-2" v-model="initParam.T_name" placeholder="输入账户名称查询" />
               <el-button type="primary" @click="SearchInfo">搜索</el-button>
             </el-col>
             <el-col :span="6" :offset="6"><el-button type="primary" @click="openDrawerFrom">添加</el-button></el-col>

+ 0 - 26
src/views/account/users/index.scss

@@ -1,26 +0,0 @@
-.grid-content {
-  background-color: #e4e7ed;
-  padding: 1rem 2rem;
-  max-height: 3.5rem;
-  display: flex;
-  justify-content: center;
-  align-items: center;
-}
-.grid-active {
-  display: flex;
-  justify-content: start;
-  align-items: center;
-  flex-wrap: nowrap;
-}
-.el-checkbox-group {
-  display: flex;
-  overflow-x: auto;
-}
-.el-row {
-  margin-bottom: 1rem;
-  max-height: 3.5rem;
-}
-h3 span {
-  font-size: 1rem;
-  color: #606266;
-}

+ 4 - 5
src/views/home/Home.vue

@@ -48,7 +48,10 @@ const previewNotice = async (item: NoticeType) => {
       type: 'success',
       message: '确认查看消息!'
     })
-    globalStore.SET_NoticeList( newsList.value.filter((notice: NoticeType) => item.Id !== notice.Id),true)
+    globalStore.SET_NoticeList(
+      newsList.value.filter((notice: NoticeType) => item.Id !== notice.Id),
+      true
+    )
   }
 }
 
@@ -67,10 +70,6 @@ onMounted(() => {
   tabs__content = document.querySelector('#home')?.getElementsByClassName('el-tabs__content')[0] as HTMLDivElement
 
   tabs__content?.addEventListener('scroll', ScrollHandle)
-
-  // if (globalStore.noticeList.length <= 0) {
-  //   globalStore.SET_User_News_List()
-  // }
 })
 onUnmounted(() => {
   tabs__content.removeEventListener('scroll', ScrollHandle)

+ 0 - 4
src/views/home/User.vue

@@ -193,7 +193,6 @@ const changeType = (val: string) => {
 
 <style scoped lang="scss">
 .user {
-  // width: 100%;
   height: 100%;
   overflow-y: auto;
   display: flex;
@@ -202,9 +201,6 @@ const changeType = (val: string) => {
   color: var(--el-text-color-secondary);
   .info {
     padding: 20px;
-    // margin: 0px auto;
-    // white-space: nowrap;
-    // width: 20%;
     h1 {
       font-size: 32px;
       margin-bottom: 2rem;

+ 8 - 6
src/views/project/MyProject.vue

@@ -18,7 +18,6 @@ const globalStore = GlobalStore()
 const formLabelWidth = ref('120px')
 const ruleFormRef = ref<FormInstance>()
 const User_tokey = globalStore.GET_User_tokey
-const initParam = { User_tokey }
 const drawerRef = ref<InstanceType<typeof Drawer> | null>(null)
 const receiveUserDrawerRef = ref<InstanceType<typeof receiveUser> | null>(null)
 const projectDetailRef = ref<InstanceType<typeof ProjectDetail> | null>(null)
@@ -34,7 +33,6 @@ const columns: ColumnProps[] = [
   { prop: 'T_State', label: '状态' },
   { prop: 'operation', label: '操作', width: 200, fixed: 'right' }
 ]
-
 const form = ref({
   Id: '',
   T_name: '',
@@ -45,7 +43,6 @@ const form = ref({
   T_approver: '',
   T_uuid: ''
 })
-
 const rules = reactive<FormRules>({
   T_name: [{ required: true, message: '请输入项目名称', trigger: 'blur' }]
 })
@@ -147,7 +144,7 @@ const DeleteProject = (Id: number) => {
 </script>
 <template>
   <div class="my-project">
-    <TableBase ref="TableRef" :columns="columns" :requestApi="Project_Project_User_list" :initParam="initParam">
+    <TableBase ref="TableRef" :columns="columns" :requestApi="Project_Project_User_list" :initParam="{ User_tokey }">
       <template #table-header>
         <el-row :gutter="20" class="w-100">
           <el-col :span="4"><h3 class="title">我的项目</h3></el-col>
@@ -191,7 +188,12 @@ const DeleteProject = (Id: number) => {
           />
         </el-form-item>
         <el-form-item label="项目明细:" :label-width="formLabelWidth" prop="T_detail">
-          <ProjectDetail ref="projectDetailRef" @onPlanning="getPlanningCycle" :disabled="disabled"></ProjectDetail>
+          <ProjectDetail
+            ref="projectDetailRef"
+            @onPlanning="getPlanningCycle"
+            :disabled="disabled"
+            :isShow="true"
+          ></ProjectDetail>
         </el-form-item>
         <el-form-item label="计划完成周期:" :label-width="formLabelWidth" prop="T_planning_cycle">
           <div style="display: flex; white-space: nowrap; flex: 1">
@@ -204,7 +206,7 @@ const DeleteProject = (Id: number) => {
               placeholder="请输入计划完成周期"
             />
             <span style="margin: 0 10px">工作日</span>
-            <span style="color: #bbb"
+            <span style="color: #bbb display: flex;align-items: center;"
               ><el-icon><QuestionFilled /></el-icon>备注;根据项目明细计划时间自动计算</span
             >
           </div>

+ 3 - 3
src/views/project/Project.vue

@@ -49,7 +49,7 @@ const columnsProject: ColumnProps[] = [
   { prop: 'T_set_up_date', label: '立项日期' },
   { prop: 'T_end_date', label: '结束时间' },
   { prop: 'T_planning_cycle', label: '计划完成周期(工作日)', width: 125 },
-  { prop: 'T_bonus', label: '绩效总金额' },
+  { prop: 'T_Perf', label: '绩效总金额' },
   { prop: 'T_State', label: '状态', name: 'T_State', width: 120 },
   { prop: 'operation', label: '操作', width: 160, fixed: 'right' }
 ]
@@ -125,7 +125,6 @@ const addProject = (formEl: FormInstance | undefined) => {
         T_detail: detail,
         T_approver: form.value.T_uuid
       }
-      console.log(params)
 
       const res: any = await Project_Edit({ ...params, T_id: form.value.Id })
 
@@ -193,7 +192,8 @@ const changeState = async (id: number, row: any) => {
           <template #T_State="{ row }">
             <el-dropdown trigger="click" size="small">
               <el-button type="primary" size="small" :disabled="row.T_State === 4">
-                {{ Project_State[row.T_State - 1].name }}<el-icon class="el-icon--right"><arrow-down /></el-icon>
+                {{ ['待审核', '进行中', '已完成', '已完成', '已发绩效'][row.T_State]
+                }}<el-icon class="el-icon--right"><arrow-down /></el-icon>
               </el-button>
               <template #dropdown>
                 <el-dropdown-menu>

+ 0 - 1
src/views/project/ProjectDetail.vue

@@ -62,7 +62,6 @@ const addProjectDetail = (formEl: FormInstance | undefined) => {
         tableData.value.push({ ...form, id: generateRandom() })
       } else {
         const index = tableData.value.findIndex(item => item.id === form.id)
-        console.log(index, form)
         tableData.value[index] = { ...form }
       }
       emit('onPlanning', tableData.value)

+ 5 - 4
src/views/project/ProjectFinance.vue

@@ -10,7 +10,7 @@ import { View, CircleCheck } from '@element-plus/icons-vue'
 import Drawer from '@/components/Drawer/index.vue'
 import ProjectDetail from './ProjectDetail.vue'
 import type { FormInstance, FormRules } from 'element-plus'
-import { useTablePublic, Project_State } from '@/hooks/useTablePublic'
+import { useTablePublic, Project_F_State } from '@/hooks/useTablePublic'
 
 interface UserInfoIn {
   T_name: string
@@ -50,7 +50,7 @@ const columnsProject: ColumnProps[] = [
   { prop: 'T_State', label: '状态', name: 'T_State', width: 120 },
   { prop: 'operation', label: '操作', width: 80, fixed: 'right' }
 ]
-const initParam = { User_tokey: globalStore.GET_User_tokey }
+const initParam = { User_tokey: globalStore.GET_User_tokey, T_Finance: 1 }
 const initParamProject = reactive({ User_tokey: globalStore.GET_User_tokey, T_uuid: userInfo.value.T_uuid, page_z: 99 })
 
 const form = ref({
@@ -156,12 +156,13 @@ const changeState = async (id: number, row: any) => {
           <template #T_State="{ row }">
             <el-dropdown trigger="click" size="small">
               <el-button type="primary" size="small" :disabled="row.T_State === 4">
-                {{ Project_State[row.T_State - 1].name }}<el-icon class="el-icon--right"><arrow-down /></el-icon>
+                {{ ['待审核', '进行中', '已完成', '已完成', '已发绩效'][row.T_State]
+                }}<el-icon class="el-icon--right"><arrow-down /></el-icon>
               </el-button>
               <template #dropdown>
                 <el-dropdown-menu>
                   <el-dropdown-item
-                    v-for="item in Project_State"
+                    v-for="item in Project_F_State"
                     :key="item.id"
                     :icon="CircleCheck"
                     @click="changeState(item.id, row)"

+ 148 - 114
src/views/storehouse/InventoryStatistics.vue

@@ -9,21 +9,27 @@ import {
   Storehouse_Stock_Detail_Excel
 } from '@/api/storehouse/index'
 import { ref, reactive, onMounted } from 'vue'
-import { List, Picture, ArrowUpBold, ArrowDownBold } from '@element-plus/icons-vue'
+import { List } from '@element-plus/icons-vue'
 import Drawer from '@/components/Drawer/index.vue'
 import { GlobalStore } from '@/stores/index'
 import TableBase from '@/components/TableBase/index.vue'
 import type { ColumnProps } from '@/components/TableBase/interface/index'
 import { dayJs } from '@/utils/common'
 import ImageCom from '@/components/Image/index.vue'
+import { useTablePublic } from '@/hooks/useTablePublic'
 
+const userInfo = ref({
+  Id: '',
+  T_name: ''
+})
 const globalStore = GlobalStore()
 const DrawerRef = ref<InstanceType<typeof Drawer> | null>(null)
 const TableRef = ref<InstanceType<typeof TableBase> | null>(null)
 const TableDetailRef = ref<InstanceType<typeof TableBase> | null>(null)
+const { tableRowClassName } = useTablePublic()
+const tableRowClassNameHandle = (data: any): any => tableRowClassName(data.row.Id, userInfo.value.Id)
 
 let timeout: NodeJS.Timeout
-const searchShow = ref(false)
 const initParam = reactive({
   User_tokey: globalStore.GET_User_tokey,
   T_depot_id: '',
@@ -61,17 +67,14 @@ const detailColumns: ColumnProps[] = [
   { prop: 'T_ending', label: '期末库存' }
 ]
 
-const searchShowHandle = () => (searchShow.value = !searchShow.value)
 const searchHandle = () => {
   TableRef.value?.searchTable()
 }
 const dataCallback = (res: any) => {
   return res.Data.Data.map((item: any) => {
-    depotOptions.value.forEach((depot: any) => {
-      if (item.T_depot_id === depot.Id) {
-        item.T_depot_name = depot.T_name
-      }
-    })
+    if (item.T_depot_id === userInfo.value.Id) {
+      item.T_depot_name = userInfo.value.T_name
+    }
     return item
   })
 }
@@ -85,17 +88,15 @@ const T_date_export = ref<string[]>([])
 const visible = ref(false)
 const exportExcel = () => (visible.value = true)
 const confirmExpor = async (project_id?: string) => {
-  console.log(project_id)
-
   const params = {
     User_tokey: globalStore.GET_User_tokey,
     T_depot_id: initParam.T_depot_id,
     T_start_date: T_date.value[0],
     T_end_date: T_date.value[1],
-    T_project_id: ''
+    T_product_id: ''
   }
   if (typeof project_id === 'number') {
-    params['T_project_id'] = project_id
+    params['T_product_id'] = project_id
   }
   const res: any = await Storehouse_Stock_Detail_Excel(params)
   if (res.Code === 200) {
@@ -103,12 +104,6 @@ const confirmExpor = async (project_id?: string) => {
   }
 }
 
-// 拿到仓库列表
-interface ItemType {
-  T_name: string
-  Id: number
-}
-const depotOptions = ref<ItemType[]>([])
 const classOptions = ref<any[]>([])
 const modelOptions = ref<any[]>([])
 // 获取产品分类
@@ -117,18 +112,6 @@ const getProductClassList = async () => {
   classOptions.value = res.Data.Data
 }
 /**
- * 获取仓库列表
- */
-const getDepotList = async () => {
-  if (globalStore.GET_depotList.length) {
-    depotOptions.value = globalStore.GET_depotList
-    return
-  }
-  const res: any = await Storehouse_Depot_List({ User_tokey: globalStore.GET_User_tokey, page: 1, page_z: 999 })
-  depotOptions.value = res.Data.Data
-  globalStore.SET_depotList(depotOptions.value)
-}
-/**
  * 模糊搜索名称
  * @param str 名称字符串
  */
@@ -194,94 +177,124 @@ const dateDetailChange = (str: string[]) => {
   TableDetailRef.value?.searchTable()
 }
 onMounted(() => {
-  getDepotList()
   getProductClassList()
 
   T_date.value = [dayJs().startOf('year').format('YYYY-MM-DD'), dayJs().format('YYYY-MM-DD')]
   T_date_export.value = [...T_date.value]
 })
+
+const getSalaryParams = (row: any) => {
+  userInfo.value.Id = ''
+  setTimeout(() => {
+    userInfo.value = { ...row }
+    initParam.T_depot_id = userInfo.value.Id
+  }, 100)
+}
 </script>
 
 <template>
   <div class="inventory-statistics">
-    <TableBase
-      ref="TableRef"
-      :columns="columns"
-      :requestApi="Storehouse_Stock_List"
-      :initParam="initParam"
-      :dataCallback="dataCallback"
+    <div style="width: 290px" class="inventory-table">
+      <TableBase
+        ref="TableRef"
+        :columns="[{ prop: 'T_name', label: '仓库名称' }]"
+        :requestApi="Storehouse_Depot_List"
+        :initParam="{ User_tokey: globalStore.GET_User_tokey }"
+        layout="prev, pager, next"
+        :rowClick="getSalaryParams"
+        :tableRowClassName="tableRowClassNameHandle"
+      >
+        <template #table-header>
+          <h3 class="title">仓库列表</h3>
+        </template>
+      </TableBase>
+    </div>
+    <transition
+      leave-active-class="animate__animated animate__fadeOutRight"
+      enter-active-class="animate__animated animate__fadeInLeft"
     >
-      <template #table-header>
-        <div class="head-search" :class="searchShow ? 'active' : ''">
-          <el-form :model="initParam" class="result-form" label-width="100px">
-            <el-row>
-              <el-col :span="6"
-                ><el-form-item label="产品分类" :inline-message="true">
-                  <el-select v-model="initParam.T_product_class" class="w-50 m-2" clearable placeholder="请选择分类~">
-                    <el-option v-for="item in classOptions" :key="item.Id" :label="item.T_name" :value="item.Id" />
-                  </el-select> </el-form-item
-              ></el-col>
-              <el-col :span="6"
-                ><el-form-item label="产品名称">
-                  <el-autocomplete
-                    v-model="initParam.T_product_name"
-                    clearable
-                    :fetch-suggestions="querySearchAsync"
-                    placeholder="按产品名称搜索"
-                    :debounce="2000"
-                    :trigger-on-focus="false"
-                    @select="handleSelect"
-                  /> </el-form-item
-              ></el-col>
-              <el-col :span="6"
-                ><el-form-item label="产品型号">
-                  <el-select v-model="initParam.T_product_model" clearable placeholder="请选择型号~">
-                    <el-option v-for="item in modelOptions" :key="item.index" :label="item.value" :value="item.value" />
-                  </el-select> </el-form-item
-              ></el-col>
-              <el-col :span="6">
-                <el-button :icon="searchShow ? ArrowUpBold : ArrowDownBold" @click="searchShowHandle" />
-                <el-button type="primary" @click="searchHandle">搜索</el-button>
-                <el-popover :visible="visible" placement="bottom" :width="400" trigger="click">
-                  <template #reference>
-                    <el-button type="success" @click="exportExcel">导出</el-button>
-                  </template>
-                  <el-date-picker
-                    v-model="T_date_export"
-                    type="daterange"
-                    range-separator="~"
-                    start-placeholder="开始时间"
-                    end-placeholder="结束时间"
-                    format="YYYY-MM-DD"
-                    value-format="YYYY-MM-DD"
-                  />
-                  <div class="export-popover">
-                    <el-button size="small" @click="visible = false">取消</el-button>
-                    <el-button size="small" type="primary" @click="confirmExpor">确认</el-button>
-                  </div>
-                </el-popover>
-              </el-col>
-            </el-row>
-            <el-row class="search-bottom">
-              <el-col :span="6"
-                ><el-form-item label="仓库列表" :inline-message="true">
-                  <el-select v-model="initParam.T_depot_id" class="w-50 m-2" clearable placeholder="请选择分类~">
-                    <el-option v-for="item in depotOptions" :key="item.Id" :label="item.T_name" :value="item.Id" />
-                  </el-select> </el-form-item
-              ></el-col>
-            </el-row>
-          </el-form>
-        </div>
-      </template>
-      <template #T_product_img="{ row }">
-        <ImageCom :src="row.T_product_img" />
-      </template>
-      <template #right="{ row }">
-        <el-button link type="primary" size="small" :icon="List" @click="previewDetail(row.T_product_id)"
-          >明细</el-button
+      <div class="project-container" v-if="userInfo.Id">
+        <TableBase
+          ref="TableRef"
+          :columns="columns"
+          :requestApi="Storehouse_Stock_List"
+          :initParam="initParam"
+          :dataCallback="dataCallback"
         >
-      </template>
-    </TableBase>
+          <template #table-header>
+            <div class="head-search active">
+              <el-form :model="initParam" class="result-form" label-width="100px">
+                <el-row>
+                  <el-col :span="12"
+                    ><el-form-item label="产品分类" :inline-message="true">
+                      <el-select v-model="initParam.T_product_class" clearable placeholder="请选择分类~" class="w-50">
+                        <el-option v-for="item in classOptions" :key="item.Id" :label="item.T_name" :value="item.Id" />
+                      </el-select> </el-form-item
+                  ></el-col>
+                  <el-col :span="12"
+                    ><el-form-item label="产品名称">
+                      <el-autocomplete
+                        class="w-50"
+                        v-model="initParam.T_product_name"
+                        clearable
+                        :fetch-suggestions="querySearchAsync"
+                        placeholder="按产品名称搜索"
+                        :debounce="2000"
+                        :trigger-on-focus="false"
+                        @select="handleSelect"
+                      /> </el-form-item
+                  ></el-col>
+                </el-row>
+                <el-row class="search-bottom">
+                  <el-col :span="12">
+                    <el-form-item label="产品型号">
+                      <el-select v-model="initParam.T_product_model" clearable placeholder="请选择型号~" class="w-50">
+                        <el-option
+                          v-for="item in modelOptions"
+                          :key="item.index"
+                          :label="item.value"
+                          :value="item.value"
+                        />
+                      </el-select>
+                    </el-form-item>
+                  </el-col>
+                  <el-col :span="6" :offset="6">
+                    <el-button type="primary" @click="searchHandle">搜索</el-button>
+                    <el-popover :visible="visible" placement="bottom" :width="400" trigger="click">
+                      <template #reference>
+                        <el-button type="success" @click="exportExcel">导出</el-button>
+                      </template>
+                      <el-date-picker
+                        v-model="T_date_export"
+                        type="daterange"
+                        range-separator="~"
+                        start-placeholder="开始时间"
+                        end-placeholder="结束时间"
+                        format="YYYY-MM-DD"
+                        value-format="YYYY-MM-DD"
+                      />
+                      <div class="export-popover">
+                        <el-button size="small" @click="visible = false">取消</el-button>
+                        <el-button size="small" type="primary" @click="confirmExpor">确认</el-button>
+                      </div>
+                    </el-popover>
+                  </el-col>
+                </el-row>
+              </el-form>
+            </div>
+          </template>
+          <template #T_product_img="{ row }">
+            <ImageCom :src="row.T_product_img" />
+          </template>
+          <template #right="{ row }">
+            <el-button link type="primary" size="small" :icon="List" @click="previewDetail(row.T_product_id)"
+              >明细</el-button
+            >
+          </template>
+        </TableBase>
+      </div>
+    </transition>
+
     <Drawer ref="DrawerRef" :handleClose="callbackDrawer" size="80%">
       <template #header="{ params }">
         <h4 :id="params.titleId" :class="params.titleClass">库存明细</h4>
@@ -333,14 +346,32 @@ onMounted(() => {
 :deep(.el-drawer__header) {
   margin-bottom: 0;
 }
-:deep(.table-header) {
-  border: none;
-}
-:deep(.card) {
-  border: none;
-}
 .inventory-statistics {
-  @include f-direction;
+  height: 100%;
+  display: flex;
+  overflow: hidden;
+  .title {
+    width: 100%;
+    text-align: center;
+    line-height: 1.7em;
+    font-size: 20px;
+    color: #707b84;
+  }
+  :deep(.table-header),
+  :deep(.card) {
+    margin: 0;
+    border-radius: 8px;
+  }
+  .inventory-table {
+    @include f-direction;
+    z-index: 1;
+  }
+  .project-container {
+    @include f-direction;
+    z-index: 0;
+    margin-left: 12px;
+    width: calc(100% - 290px);
+  }
   .head-search {
     width: 100%;
     height: 33px;
@@ -356,5 +387,8 @@ onMounted(() => {
   .head-search.active {
     height: 85px;
   }
+  .w-50 {
+    flex: 0 0 50%;
+  }
 }
 </style>

+ 1 - 1
src/views/storehouse/outStock/ReceiveOutStock.vue

@@ -4,7 +4,7 @@ import { ref, reactive, nextTick } from 'vue'
 import { useRouter } from 'vue-router'
 import { GlobalStore } from '@/stores/index'
 import type { FormInstance, FormRules } from 'element-plus'
-import { Delete, CirclePlus, Picture } from '@element-plus/icons-vue'
+import { Delete, CirclePlus } from '@element-plus/icons-vue'
 import { Storehouse_StockOut_Add } from '@/api/storehouse/index'
 import ReceiveUser from './receiveUser.vue'
 import InStorageSn from '../inventory/InStorageSn.vue'

+ 0 - 1
src/views/storehouse/sales/ContractForm.vue

@@ -29,7 +29,6 @@ const selectTable = ref()
 const drawerProductRef = ref<InstanceType<typeof Drawer> | null>(null)
 
 const validate_T_product = (rule: any, value: any, callback: any) => {
-  console.log(value)
   if (form.T_type === 1 && value === '') {
     callback(new Error('请选择产品明细'))
   } else if (value.includes(undefined)) {