瀏覽代碼

绩效数据管理

tty 1 年之前
父節點
當前提交
9dd5228d28

+ 8 - 1
src/api/mes/job.js

@@ -89,7 +89,6 @@ export const getSpotInfo = (params) => {
   })
 }
 
-
 export const getRewardTab = (data) => {
   return service({
     url: '/mes_server/large_waste_reward_punish/getTab',
@@ -114,6 +113,14 @@ export const getRewardDetail = (params) => {
   })
 }
 
+// 大废品奖惩侧边栏根据工单
+export const getRewardTabByGd = (params) => {
+  return service({
+    url: '/mes_server/large_waste_reward_punish/getTabByGd',
+    method: 'get',
+    params
+  })
+}
 
 export const getDocumentData = (params) => {
   return service({

+ 23 - 4
src/api/mes_api_gty/overTimePayVerification.js

@@ -14,19 +14,38 @@ export const getSide = (data) => {
 }
 
 // 计件员工加班费核查上侧列表
-export const getUpData = (data) => {
+export const getUpData = (params) => {
   return service({
     url: '/mes_server/overtime_verification/getList',
     method: 'get',
-    data
+    params
   })
 }
 
 // 计件员工加班费核查下侧列表
-export const getDownData = (data) => {
+export const getDownData = (params) => {
   return service({
     url: '/mes_server/overtime_verification/getAllList',
     method: 'get',
-    data
+    params
+  })
+}
+
+// 计件员工加班费核查详情
+export const getDetail = (params) => {
+  return service({
+    url: '/mes_server/overtime_verification/getDetail',
+    method: 'get',
+    params
   })
 }
+
+// 定位
+export const getLocal = (params) => {
+  return service({
+    url: '/mes_server/overtime_verification/search',
+    method: 'get',
+    params
+  })
+}
+

+ 37 - 18
src/view/job/rewards/rewards.vue

@@ -6,11 +6,13 @@
         <div class="JKWTree-tree">
 
           <h3>工序大废品奖惩记录</h3>
-          <el-tree
-            :data="treeData"
-            :props="defaultProps"
-            @node-click="handleNodeClick"
-          />
+          <el-scrollbar height="550px">
+            <el-tree
+              :data="treeData"
+              :props="defaultProps"
+              @node-click="handleNodeClick"
+            />
+          </el-scrollbar>
         </div>
 
       </el-aside>
@@ -43,7 +45,7 @@
                 <el-button
                   icon="refresh"
                   @click="onReset"
-                >重置</el-button>
+                >切换显示方式</el-button>
               </el-form-item>
             </el-form>
           </div>
@@ -185,12 +187,12 @@
           </div>
           <el-dialog
             v-model="dialogFormVisible"
-            style="width: 1020px;"
             :before-close="closeDialog"
             title="详情"
             destroy-on-close
+            style="width: 1020px;position: fixed; top: 35%; left: 50%; transform: translate(-50%, -50%);"
           >
-            <el-scrollbar height="500px">
+            <el-scrollbar height="70vh">
               <el-form
                 ref="elFormRef"
                 :model="detailData"
@@ -879,7 +881,7 @@
 </template>
 
 <script setup>
-import { getRewardDetail, getRewardList, getRewardTab } from '@/api/mes/job'
+import { getRewardDetail, getRewardList, getRewardTab, getRewardTabByGd } from '@/api/mes/job'
 import { createCompany, deleteCompany, deleteCompanyByIds, findCompany, updateCompany } from '@/api/company'
 
 // 全量引入格式化工具 请按需保留
@@ -891,6 +893,7 @@ defineOptions({
 })
 
 const treeData = ref([])
+const displayMod = ref('')
 // 侧边栏
 const RewardTab = async() => {
   const getRewardTabs = await getRewardTab()
@@ -901,20 +904,42 @@ const RewardTab = async() => {
         date: item.date.replace(/\./g, '-'),
       }
     }))
+    displayMod.value = 'date'
   }
 }
 RewardTab()
+
+const RewardTabByGd = async() => {
+  const getRewardTabs = await getRewardTabByGd()
+  if (getRewardTabs.code === 0) {
+    treeData.value = getRewardTabs.data.map((item) => ({
+      label: item.label,
+      params: {
+        date: item.sczl_gdbh
+      }
+    }))
+    displayMod.value = 'gd'
+  }
+}
+
 const handleNodeClick = (node, check) => {
   // 存放当前节点的nodeId
-  console.log(node, check)
+  // console.log(node, check)
   if (node.params) {
     params.date = node.params.date
-    // params.sys_id = node.params.sys_id;
-    // total.value = node.params.total;
     getTableData()
   }
 }
 
+// 切换显示方式
+const onReset = () => {
+  if (displayMod.value === 'date') {
+    RewardTabByGd()
+  } else {
+    RewardTab()
+  }
+}
+
 // 验证规则
 const rule = reactive({
 })
@@ -950,12 +975,6 @@ const params = {
   limit: pageSize.value.toString(),
 }
 
-// 重置
-const onReset = () => {
-  searchInfo.value = {}
-  getTableData()
-}
-
 // 搜索
 const onSubmit = () => {
   elSearchFormRef.value?.validate(async(valid) => {

+ 17 - 11
src/view/performance/06-packingDocuments/index.vue

@@ -2,17 +2,23 @@
   <div>
     <el-container>
       <!-- 左侧树形结构 -->
-      <el-aside width="250px">
-        <div class="JKWTree-tree">
-          <h3>包装计件单据维护</h3>
-          <el-tree
-            :data="treeData"
-            :props="defaultProps"
-            highlight-current="true"
-            @node-click="handleNodeClick"
-          />
-        </div>
-      </el-aside>
+      <el-scrollbar max-height="75vh">
+        <el-aside>
+          <div class="JKWTree-tree">
+            <h3>包装计件单据维护</h3>
+            <el-scrollbar
+              height="70vh"
+            >
+              <el-tree
+                :data="treeData"
+                :props="defaultProps"
+                highlight-current="true"
+                @node-click="handleNodeClick"
+              />
+            </el-scrollbar>
+          </div>
+        </el-aside>
+      </el-scrollbar>
 
       <el-container>
         <el-main>

+ 14 - 12
src/view/performance/07-otherDocuments/index.vue

@@ -1,18 +1,20 @@
 <template>
   <div>
-    <!-- 左侧树形结构 -->
     <el-container>
-      <el-aside width="300px">
-        <div class="JKWTree-tree">
-          <h3>其他计件单据维护</h3>
-          <el-tree
-            :data="treeData"
-            :props="defaultProps"
-            highlight-current="true"
-            @node-click="handleNodeClick"
-          />
-        </div>
-      </el-aside>
+      <!-- 左侧树形结构 -->
+      <el-scrollbar max-height="75vh">
+        <el-aside>
+          <div class="JKWTree-tree">
+            <h3>其他计件单据维护</h3>
+            <el-tree
+              :data="treeData"
+              :props="defaultProps"
+              highlight-current="true"
+              @node-click="handleNodeClick"
+            />
+          </div>
+        </el-aside>
+      </el-scrollbar>
 
       <el-container>
         <el-main>

+ 15 - 12
src/view/performance/08-timesheet/index.vue

@@ -1,18 +1,21 @@
 <template>
   <div>
-    <!-- 左侧树形结构 -->
     <el-container>
-      <el-aside width="180px">
-        <div class="JKWTree-tree">
-          <h3>计件工计时单维护</h3>
-          <el-tree
-            :data="treeData"
-            :props="defaultProps"
-            highlight-current="true"
-            @node-click="handleNodeClick"
-          />
-        </div>
-      </el-aside>
+
+      <!-- 左侧树形结构 -->
+      <el-scrollbar max-height="75vh">
+        <el-aside>
+          <div class="JKWTree-tree">
+            <h3>计件工计时单维护</h3>
+            <el-tree
+              :data="treeData"
+              :props="defaultProps"
+              highlight-current="true"
+              @node-click="handleNodeClick"
+            />
+          </div>
+        </el-aside>
+      </el-scrollbar>
 
       <el-container>
         <el-main>

+ 4 - 7
src/view/performance/09-workOrderVerification/index.vue

@@ -2,8 +2,8 @@
   <div>
     <el-container>
       <!-- 左侧树形结构 -->
-      <el-scrollbar max-height="80vh">
-        <el-aside width="280px">
+      <el-scrollbar max-height="75vh">
+        <el-aside >
           <div class="JKWTree-tree">
             <h3>工单核验单维护</h3>
             <el-tree
@@ -32,10 +32,6 @@
                 :icon="Search"
                 @click="handleSearch"
               >搜索</el-button>
-              <el-button
-                type="primary"
-                :icon="Refresh"
-              >重置</el-button>
               <div style="margin-left: auto;">
                 <el-button
                   type="primary"
@@ -94,7 +90,8 @@
             :before-close="closeDialog"
             :title="type === 'create' ? '添加' : '修改'"
             destroy-on-close
-            width="1200px"
+            width="70%"
+            style="position: fixed; top: 35%; left: 50%; transform: translate(-50%, -50%);"
           >
 
             <el-form

+ 122 - 167
src/view/performance/14-overTimePayVerification/index.vue

@@ -1,4 +1,4 @@
- <template>
+<template>
   <div>
     <!-- 左侧树形结构 -->
     <el-container>
@@ -6,8 +6,12 @@
         <el-aside width="280px">
           <div class="JKWTree-tree">
             <h3>计件员工加班费核查</h3>
-            <el-tree :data="treeData" :props="defaultProps" highlight-current="true"
-              @node-click="handleNodeClick"></el-tree>
+            <el-tree
+              :data="treeData"
+              :props="defaultProps"
+              highlight-current="true"
+              @node-click="handleNodeClick"
+            />
           </div>
         </el-aside>
       </el-scrollbar>
@@ -17,35 +21,88 @@
           <div class="gva-table-box">
             <div class="gva-btn-list">
               <el-row :span="6">
-                <el-input v-model="searchInfo" placeholder="输入工单编号或产品名称" />
+                <el-input
+                  v-model="searchInfo"
+                  placeholder="输入工单编号或产品名称"
+                />
               </el-row>
               <!-- 按钮区域 -->
-              <el-button type="primary" :icon="Search" @click="onSearch">搜索</el-button>
-              <el-button type="primary" :icon="Refresh">重置</el-button>
+              <el-button
+                type="primary"
+                :icon="Search"
+                @click="onSearch"
+              >搜索</el-button>
+              <el-button
+                type="primary"
+                :icon="Refresh"
+              >重置</el-button>
               <div style="margin-left: auto;">
-                <el-button type="primary" :icon="Download" @click="exportExcel">导出到Excel</el-button>
+                <el-button
+                  type="primary"
+                  :icon="Download"
+                  @click="exportExcel"
+                >导出到Excel</el-button>
               </div>
             </div>
-            <!-- 数据展示 -->
-            <el-table ref="multipleTable" style="width: 100%;height:30vh;" tooltip-effect="dark" :data="tableData"
-              row-key="ID" highlight-current-row="true" border :row-style="{ height: '20px' }"
-              :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-              :header-cell-style="{ padding: '0px' }" @selection-change="handleSelectionChange">
-              <el-table-column type="selection" width="55" />
+            <!-- 上半数据展示 -->
+            <el-table
+              ref="multipleTable"
+              style="width: 100%;height:30vh;"
+              tooltip-effect="dark"
+              :data="tableData1"
+              row-key="ID"
+              highlight-current-row="true"
+              border
+              :row-style="{ height: '20px' }"
+              :cell-style="{ padding: '0px' }"
+              :header-row-style="{ height: '20px' }"
+              :header-cell-style="{ padding: '0px' }"
+              @selection-change="handleSelectionChange"
+            >
+              <el-table-column
+                type="selection"
+                width="55"
+              />
               <!-- 使用 v-for 循环渲染每一列 -->
-              <el-table-column v-for="column in tableCols" :key="column.prop" :prop="column.prop" :label="column.label"
-                :width="column.width" show-overflow-tooltip="true"></el-table-column>
-
+              <el-table-column
+                v-for="column in tableCols1"
+                :key="column.prop"
+                :prop="column.prop"
+                :label="column.label"
+                :width="column.width"
+                show-overflow-tooltip="true"
+              />
+
+              // 下半数据展示
             </el-table>
             <br>
-            <el-table ref="multipleTable" style="width: 100%;height: 40vh;" tooltip-effect="dark" :data="tableData"
-              row-key="ID" highlight-current-row="true" border :row-style="{ height: '20px' }"
-              :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-              :header-cell-style="{ padding: '0px' }" @selection-change="handleSelectionChange">
-              <el-table-column type="selection" width="55" />
+            <el-table
+              ref="multipleTable"
+              style="width: 100%;height: 40vh;"
+              tooltip-effect="dark"
+              :data="tableData2"
+              row-key="ID"
+              highlight-current-row
+              border
+              :row-style="{ height: '20px' }"
+              :cell-style="{ padding: '0px' }"
+              :header-row-style="{ height: '20px' }"
+              :header-cell-style="{ padding: '0px' }"
+              @selection-change="handleSelectionChange"
+            >
+              <el-table-column
+                type="selection"
+                width="55"
+              />
               <!-- 使用 v-for 循环渲染每一列 -->
-              <el-table-column v-for="column in tableCols" :key="column.prop" :prop="column.prop" :label="column.label"
-                :width="column.width" show-overflow-tooltip="true"></el-table-column>
+              <el-table-column
+                v-for="column in tableCols2"
+                :key="column.prop"
+                :prop="column.prop"
+                :label="column.label"
+                :width="column.width"
+                show-overflow-tooltip="true"
+              />
             </el-table>
           </div>
 
@@ -57,73 +114,47 @@
 </template>
 
 <script setup>
-import {
-  createCompany,
-  deleteCompany,
-  deleteCompanyByIds,
-  updateCompany,
-  findCompany,
-  getCompanyList
-} from '@/api/company'
 
 // 全量引入格式化工具 请按需保留
-import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
 import { ElMessage, ElMessageBox } from 'element-plus'
 import { Search, Refresh, Download } from '@element-plus/icons-vue'
 import { ref, reactive, onMounted, onBeforeMount } from 'vue'
-import { getOrderVerificationSideTable, getOrderVerificationTable } from '@/api/mes_api_gty/myapi'
+import { getSide, getUpData, getDownData, getDetail, getLocal } from '@/api/mes_api_gty/overTimePayVerification'
 
 defineOptions({
-  name: '06-packingDocuments'
+  name: '06PackingDocuments'
 })
 
 // 侧边栏数据请求
-const treeData = reactive([]);
-const getSideData = async () => {
-  const response = await getOrderVerificationSideTable();
-  if (response.code === 0) {
-    const transformedData = response.data.map(item => ({
-      label: `${item.date.replace(/-/g, '.')}【单据数: ${item.counts}张】`,
-      children: item.sys.map(sysItem => ({
-        label: `${sysItem.sys_id} 【记录数: ${sysItem.count}张】`,
-        params: {
-          date: item.date.replace(/\./g, '-'),
-          sys_id: sysItem.sys_id,
-          total: sysItem.count,
-        },
-      })),
-    }));
-    treeData.splice(0, treeData.length, ...transformedData);
+const treeData = reactive([])
+const getSideData = async() => {
+  try {
+    const res = await getSide()
+    if (res.code === 0) {
+      treeData.splice(0, treeData.length, ...res.data)
+    }
+  } catch (e) {
+    console.log(e)
   }
-};
-
-getSideData();
-
-// 自动化生成的字典(可能为空)以及字段
-const formData = ref({
-  id: '',
-  name: '',
-  date: '',
-  group: '',
-  packingOutput: '',
-  reworkOutput: '',
-  pieceOutput: '',
-  order: '',
-  user: '',
-  createTime: '',
-  updateTime: '',
-  uniqid: '',
-})
-
-// 验证规则
-const rule = reactive({
-})
+}
 
-const elFormRef = ref()
-const elSearchFormRef = ref()
+getSideData()
 
 // =========== 表格控制部分 ===========
-const tableCols = [
+const tableCols1 = [
+  { label: '员工编号', prop: 'bh', width: '100' },
+  { label: '员工姓名', prop: '员工姓名', width: '100' },
+  { label: '工资表类别', prop: '工资表类别', width: '400' },
+  { label: '聘用日期', prop: '聘用日期', width: '100' },
+  { label: '法定天数', prop: '法定天数', width: '100' },
+  { label: '当月定额', prop: '当月定额', width: '100' },
+  { label: '月度合计产量', prop: '月度合计产量', width: '100' },
+  { label: '个人计件工资', prop: '个人计件工资', width: '250' },
+  { label: '个人加班工资', prop: '个人加班工资', width: '250' },
+  { label: '月计时时数', prop: '月计时时数', width: '250' },
+  { label: '计时补差', prop: '计时补差', width: '250' },
+]
+const tableCols2 = [
   { label: '工单编号', prop: 'qczl_gdbh', width: '100' },
   { label: '印件号', prop: 'qczl_yjno', width: '100' },
   { label: '印件名称', prop: 'Gd_cpmc', width: '400', showOverflowTooltip: true },
@@ -149,50 +180,23 @@ const tableCols = [
   { label: '废品16', prop: 'sl_lb16', width: '250' },
   { label: '废品17', prop: 'sl_lb17', width: '250' },
   { label: '创建用户', prop: 'sys_id', width: '200' },
-];
-const tableData = reactive([])
-const detailData = reactive([
-  {
-    gdbh: '2311736',
-    yjgx: '01-15',
-    gxmc: '包装(圆切)',
-    yjmc: '利群(新)小《降焦改版)',
-    bzcl: '13.00',
-    fgcl: '0.00',
-    mxsl: '2500',
-    jcxs: '1.000',
-    ly: '',
-    dedh: '030002002',
-  },
-])
-const total = ref(0)
-const page = ref(1)
-const limit = ref(10)
+]
+const tableData1 = reactive([])
+const tableData2 = reactive([])
+
 const searchInfo = ref('')
-const params = {
-  date: '',
-  sys_id: '',
-  page: page.value.toString(),
-  limit: limit.value.toString(),
-}
 
-const getTableData = async () => {
-  try {
-    const response = await getOrderVerificationTable(params);
-    if (response.code === 0) {
-      tableData.splice(0, tableData.length, ...response.data.rows);
+const handleNodeClick = async(node, check) => {
+  if (!node.children) {
+    const val = {
+      date: node.gdbh,
+      department: node.label.slice(0, node.label.indexOf('(')),
+    }
+    const res = await getUpData(val)
+    if (res.code === 0) {
+      console.log(res.data)
+      tableData1.splice(0, tableData1.length, ...res.data)
     }
-  } catch (error) {
-    console.log(error);
-  }
-}
-
-const handleNodeClick = (node, check) => {
-  if (node.params) {
-    params.date = node.params.date;
-    params.sys_id = node.params.sys_id;
-    total.value = node.params.total;
-    getTableData();
   }
 }
 
@@ -200,61 +204,12 @@ const handleNodeClick = (node, check) => {
 function onSearch() {
 
 }
-// ============== 表格控制部分结束 ===============
-
-// 获取需要的字典 可能为空 按需保留
-const setOptions = async () => {
-}
-
-// 获取需要的字典 可能为空 按需保留
-setOptions()
-
-// 多选数据
-const multipleSelection = ref([])
-// 多选
-const handleSelectionChange = (val) => {
-  multipleSelection.value = val
-}
-
-// 批量删除控制标记
-const deleteVisible = ref(false)
-
-// 多选删除
-const onDelete = async () => {
-  const ids = []
-  if (multipleSelection.value.length === 0) {
-    ElMessage({
-      type: 'warning',
-      message: '请选择要删除的数据'
-    })
-    return
-  }
-  multipleSelection.value &&
-    multipleSelection.value.map(item => {
-      ids.push(item.ID)
-    })
-  const res = await deleteCompanyByIds({ ids })
-  if (res.code === 0) {
-    ElMessage({
-      type: 'success',
-      message: '删除成功'
-    })
-    if (tableData.value.length === ids.length && page.value > 1) {
-      page.value--
-    }
-    deleteVisible.value = false
-    getTableData()
-  }
-}
 
 // 导出excel
 function exportExcel() {
-  console.log('导出到excel');
+  console.log('导出到excel')
 }
 
-// 生命周期钩子
-onMounted(async () => {
-});
 </script>
 
 <style scoped>