浏览代码

Merge branch 'master' of https://git.7in6.com/Minong/mes-admin-backend-ui

liuhairui 1 年之前
父节点
当前提交
449688ba20

+ 6 - 6
src/utils/excel.js

@@ -1,4 +1,4 @@
-import { utils, writeFile } from "xlsx";
+import { utils, writeFile } from 'xlsx'
 
 /**
  * 导出 excel 文件
@@ -8,15 +8,15 @@ import { utils, writeFile } from "xlsx";
  */
 export function exportExcelFile(
   array = [],
-  sheetName = "sheet1",
-  fileName = "example.xlsx"
+  sheetName = 'sheet1',
+  fileName = 'example.xlsx'
 ) {
-  const jsonWorkSheet = utils.json_to_sheet(array);
+  const jsonWorkSheet = utils.json_to_sheet(array)
   const workBook = {
     SheetNames: [sheetName],
     Sheets: {
       [sheetName]: jsonWorkSheet,
     },
-  };
-  return writeFile(workBook, fileName);
+  }
+  return writeFile(workBook, fileName)
 }

+ 84 - 29
src/view/job/related/related.vue

@@ -28,7 +28,8 @@
 					<el-button type="primary" class="bt" icon="" @click="oncopy">组员复制</el-button>
 					<el-button type="primary" class="bt" icon="edit" @click="onrelevancy">关联工资设置</el-button>
 					<div style="margin-left: auto;">
-						<el-button type="primary" class="bt" icon="download" @click="exportExcel">导出到Excel</el-button>
+						<el-button type="primary" class="bt" icon="download" @click="exportExcel">导出到Excel(汇总)</el-button>
+						<el-button type="primary" class="bt" icon="download" @click="exportExcel2">导出到Excel(明细)</el-button>
 					</div>
 				</el-form-item>
             </el-form>
@@ -42,18 +43,15 @@
 				:show-overflow-tooltip="true" @row-click="ontable" 
 				@selection-change="handleSelectionChange" @row-dblclick="doubleClick">
               <!-- <el-table-column type="selection" width="55" /> -->
-			  <el-table-column align="left" sortable label="员工编号" prop="员工编号" width="105"/>
-              <el-table-column align="left" sortable label="员工姓名" prop="员工姓名" width="105"/>
-			  <el-table-column align="left" sortable label="职称职务" prop="职称职务" width="150"/>
-			  <el-table-column align="left" sortable label="所在部门" prop="所在部门" width="150"/>
-			  <el-table-column align="left" sortable label="日期" prop="日期" width="105"/>
-			  <el-table-column align="left" sortable label="关联系数" prop="关联系数" width="105"/>
-              <el-table-column align="left" sortable label="关联人数" prop="关联人数" width="105"/>
-              <el-table-column align="left" sortable label="关联计件工资" prop="关联计件工资" width="135"/>
-              <el-table-column align="left" sortable label="关联加班工资" prop="关联加班工资" width="135"/>
-			  <el-table-column align="left" sortable label="关联定额补差" prop="关联定额补差" width="135"/>
-              <el-table-column align="left" sortable label="关联计时工资" prop="关联计时工资" width="135"/>
-              <el-table-column align="left" sortable label="关联工资合计" prop="关联工资合计" width="135"/>
+			  <el-table-column
+			    v-for="column in tableCols1"
+			    :key="column.prop"
+			    :prop="column.prop"
+			    :label="column.label"
+			    :width="column.width"
+			    show-overflow-tooltip="true"
+			  				sortable
+			  /> 
             </el-table>
             <!-- 分页 -->
             <!-- <div class="gva-pagination">
@@ -75,18 +73,15 @@
 			  @selection-change="handleSelectionChange" 
 			  :show-overflow-tooltip="true" @row-dblclick="doubleClick">
 		      <el-table-column type="selection" width="55" />
-		  	  <el-table-column align="left" sortable label="日期" prop="日期" width="105"/>
-		      <el-table-column align="left" sortable label="员工编号" prop="员工编号" width="105"/>
-		      <el-table-column align="left" sortable label="员工姓名" prop="员工姓名" width="105"/>
-		      <el-table-column align="left" sortable label="职称职务" prop="职称职务" width="150"/>
-		      <el-table-column align="left" sortable label="所在部门" prop="所在部门" width="150"/>
-		      <el-table-column align="left" sortable label="被关联员工" prop="被关联员工" width="120"/>
-		      <el-table-column align="left" sortable label="被关联姓名" prop="被关联姓名" width="120"/>
-			  <el-table-column align="left" sortable label="权重" prop="权重" width="77"/>
-			  <el-table-column align="left" sortable label="计件工资" prop="计件工资" width="105"/>
-			  <el-table-column align="left" sortable label="加班工资" prop="加班工资" width="105"/>
-			  <el-table-column align="left" sortable label="定额补差" prop="定额补差" width="105"/>
-			  <el-table-column align="left" sortable label="计时工资" prop="计时工资" width="105"/>
+		  	  <el-table-column
+		  	    v-for="column in tableCols2"
+		  	    :key="column.prop"
+		  	    :prop="column.prop"
+		  	    :label="column.label"
+		  	    :width="column.width"
+		  	    show-overflow-tooltip="true"
+		  	  				sortable
+		  	  />
 		    </el-table>
 		    <!-- 分页 -->
 		    <!-- <div class="gva-pagination">
@@ -346,14 +341,41 @@ import { Search, Refresh, Download } from '@element-plus/icons-vue'
 import { ref, reactive, onMounted, onBeforeMount, nextTick } from 'vue'
 import { getPackingSideTable, getPackingTable } from '@/api/mes_api_gty/myapi'
 import { Value } from 'sass'
-import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
+import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
+import * as XLSX from "xlsx";
 import { useUserStore } from '@/pinia/modules/user'
 const userStore = useUserStore() 
 const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
 defineOptions({
   name: '06-packingDocuments'
 })
-
+const tableCols1 = [
+  { label: '员工编号', prop: '员工编号', width: '105' },
+  { label: '员工姓名', prop: '员工姓名', width: '105' },
+  { label: '职称职务', prop: '职称职务', width: '120' },
+  { label: '所在部门', prop: '所在部门', width: '105' },
+  { label: '日期', prop: '日期', width: '105' },
+  { label: '关联系数', prop: '关联系数', width: '105' },
+  { label: '关联人数', prop: '关联人数', width: '135' },
+  { label: '关联计件工资', prop: '关联计件工资', width: '135' },
+  { label: '关联加班工资', prop: '关联加班工资', width: '135' },
+  { label: '关联定额补差', prop: '关联定额补差', width: '130' },
+  { label: '关联计时工资', prop: '关联计时工资', width: '130' },
+  { label: '关联工资合计', prop: '关联工资合计', width: '130' },
+]
+const tableCols2 = [
+  { label: '日期', prop: '日期', width: '105' },
+  { label: '员工编号', prop: '员工编号', width: '105' },
+  { label: '员工姓名', prop: '员工姓名', width: '150' },
+  { label: '所在部门', prop: '所在部门', width: '150' },
+  { label: '被关联员工', prop: '被关联员工', width: '125' },
+  { label: '被关联姓名', prop: '被关联姓名', width: '125' },
+  { label: '权重', prop: '权重', width: '105' },
+  { label: '计件工资', prop: '计件工资', width: '105' },
+  { label: '加班工资', prop: '加班工资', width: '105' },
+  { label: '定额补差', prop: '定额补差', width: '105' },
+  { label: '计时工资', prop: '计时工资', width: '105' },
+]
 // 侧边栏数据请求
 const treeData = reactive([]);
 
@@ -969,9 +991,42 @@ function doubleClick(row, column, event) {
 }
 
 // 导出excel
-function exportExcel() {
-  console.log('导出到excel');
+function exportExcel() {
+	if(tableData.length<1){
+		ElMessage({
+		  type: 'error',
+		  message: '请确认上方表格内是否存在内容'
+		})
+	}else{
+		exportExcelFile(tableData,tableCols1)
+	}
+ 
+}
+function exportExcel2() {
+ 
+ if(tableData2.length<1){
+ 	ElMessage({
+ 	  type: 'error',
+ 	  message: '请确认下方表格内是否存在内容'
+ 	})
+ }else{
+ 	exportExcelFile(tableData2,tableCols2)
+ }
 }
+const exportExcelFile = (tableData, tableCols) => {
+  const data = tableData.map(row => {
+    const rowData = {};
+    tableCols.forEach(column => {
+      rowData[column.label] = row[column.prop];
+    });
+    return rowData;
+  });
+
+  const worksheet = XLSX.utils.json_to_sheet(data);
+  const workbook = XLSX.utils.book_new();
+  XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
+  XLSX.writeFile(workbook, 'exported_table.xlsx');
+};
 
 // 生命周期钩子
 onMounted(async () => {

+ 2 - 16
src/view/login/index.vue

@@ -309,26 +309,12 @@ const GetAddr = () => {
 // GetAddr();
 
 
-// const GetMachineMac = async (addr) => {
-// 	const response = await getMachineMac({ addr: '68-ED-A4-26-5F-37' });
-// 	console.log(response)
-// 	if (response.code === 0) {
-// 		cosole.log(response.data['设备编号'])
-// 		// userStore.LoginIn2({
-// 		//   username: response.data['设备编号'],
-// 		//   password: "123456",
-// 		//   captcha: "443188",
-// 		//   captchaId: "0FZfnUtAOrdXvTETkJRc",
-// 		//   openCaptcha: false,
-// 		// });
-// 	}
-// 	// console.log(loginFormData2)
-// }
+
 
 
 
 userStore.LoginIn2({
-	   username: "admin",
+	   username: "JY01#",
 	   password: "123456",
 	   captcha: "443188",
 	   captchaId: "0FZfnUtAOrdXvTETkJRc",

+ 151 - 89
src/view/performance/12-orderAccounting/index.vue

@@ -15,7 +15,7 @@
                 v-model="searchInfo"
                 placeholder="搜索产品编号或产品名称"
                 clearable
-                style="width: 180px;"
+                style="width: 180px"
               />
               <el-button
                 type="primary"
@@ -27,7 +27,11 @@
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="() => {dialogDetail = true}"
+                @click="
+                  () => {
+                    dialogDetail = true;
+                  }
+                "
               ><i class="el-icon-edit" />查改
               </el-button>
               <!--                <el-button type="primary" disabled icon="edit" @click="" style="margin-left: 10px">工艺方案复制</el-button>-->
@@ -35,7 +39,11 @@
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="()=>{dialogGdcjstj = true}"
+                @click="
+                  () => {
+                    dialogGdcjstj = true;
+                  }
+                "
               >工单超节损统计
               </el-button>
 
@@ -43,7 +51,11 @@
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="()=>{dialogKhsz = true}"
+                @click="
+                  () => {
+                    dialogKhsz = true;
+                  }
+                "
               >考核设置
               </el-button>
 
@@ -51,7 +63,11 @@
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="()=>{dialogXzgdtl = true}"
+                @click="
+                  () => {
+                    dialogXzgdtl = true;
+                  }
+                "
               >修正工单投料
               </el-button>
 
@@ -59,7 +75,11 @@
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="()=>{dialogGxclhc = true}"
+                @click="
+                  () => {
+                    dialogGxclhc = true;
+                  }
+                "
               >工序产量核查
               </el-button>
 
@@ -67,7 +87,11 @@
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="()=>{dialogGdzjfptj = true}"
+                @click="
+                  () => {
+                    dialogGdzjfptj = true;
+                  }
+                "
               >工单质检废品统计
               </el-button>
 
@@ -75,7 +99,11 @@
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="()=>{dialogHjfpfb = true}"
+                @click="
+                  () => {
+                    dialogHjfpfb = true;
+                  }
+                "
               >核检废品分布
               </el-button>
 
@@ -91,18 +119,22 @@
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="()=>{pd_lcdlist = true; pd_lcdProductValue()}"
+                @click="
+                  () => {
+                    pd_lcdlist = true;
+                    pd_lcdProductValue();
+                  }
+                "
               >流程单查询
               </el-button>
 
-             <el-button
+              <el-button
                 type="primary"
                 icon="edit"
                 class="bt"
-                @click="testExcel"
-              >导出测试
+                @click="exportExcel"
+              >导出Excel
               </el-button>
-
             </el-form-item>
           </el-form>
 
@@ -113,7 +145,11 @@
               v-if="dialogDetail"
               :is-show="dialogDetail"
               :gdbh="gdbh"
-              @destroy="()=>{dialogDetail = false}"
+              @destroy="
+                () => {
+                  dialogDetail = false;
+                }
+              "
             />
 
             <!-- 工单超节损统计 -->
@@ -169,16 +205,27 @@
               title="工单工序生产进程"
               fullscreen
             >
-              <div style="width: 100%;height: 100%;">
+              <div style="width: 100%; height: 100%">
                 <el-button
                   type=""
-                  @click="()=>{pd_lcdlist = false}"
+                  @click="
+                    () => {
+                      pd_lcdlist = false;
+                    }
+                  "
                 >退出</el-button>
               </div>
-              <div style="width: 100%; height: 100%; display: flex; align-items: center;">
+              <div
+                style="
+                  width: 100%;
+                  height: 100%;
+                  display: flex;
+                  align-items: center;
+                "
+              >
                 <el-form-item
                   label="工单编号"
-                  style="margin-right: 20px; padding: 0;"
+                  style="margin-right: 20px; padding: 0"
                 >
                   <el-input
                     v-model="pd_lcdformData['gdbh']"
@@ -187,7 +234,7 @@
                 </el-form-item>
                 <el-form-item
                   label=""
-                  style="margin-right: 5px; padding: 0;"
+                  style="margin-right: 5px; padding: 0"
                 >
                   <el-input
                     v-model="pd_lcdformData['code']"
@@ -196,7 +243,7 @@
                 </el-form-item>
                 <el-form-item
                   label=""
-                  style="margin-right: 5px; padding: 0;"
+                  style="margin-right: 5px; padding: 0"
                 >
                   <el-input
                     v-model="pd_lcdformData['name']"
@@ -205,12 +252,12 @@
                   />
                 </el-form-item>
               </div>
-              <div style="width: 100%; height: 70vh; display: flex;">
+              <div style="width: 100%; height: 70vh; display: flex">
                 <layout>
                   <layout-sider
                     :resize-directions="['right']"
                     :width="240"
-                    style="margin-right: 10px;height: 70vh;"
+                    style="margin-right: 10px; height: 70vh"
                   >
                     <div class="JKWTree-tree">
                       <el-tree
@@ -227,7 +274,11 @@
                       <template v-for="item in processList.total_process">
                         <el-button
                           disabled
-                          :type="! processList.process.includes(item) ? 'danger' : 'info'"
+                          :type="
+                            !processList.process.includes(item)
+                              ? 'danger'
+                              : 'info'
+                          "
                           plain
                           style="width: 50px"
                         >{{ item }}</el-button>
@@ -237,9 +288,7 @@
                 </layout>
               </div>
             </el-dialog>
-
           </div>
-
         </div>
       </layout-header>
 
@@ -248,13 +297,13 @@
         <layout-sider
           :resize-directions="['right']"
           :width="190"
-          style="margin-right: 10px;"
+          style="margin-right: 10px"
         >
           <div
             class="JKWTree-tree"
-            style="height: 70vh;"
+            style="height: 70vh"
           >
-            <h3> 工单超节损核算</h3>
+            <h3>工单超节损核算</h3>
             <el-tree
               :data="treeData"
               highlight-current
@@ -265,11 +314,10 @@
 
         <!--  右侧内容区域 -->
         <layout-content>
-
           <!-- 上方列表 -->
           <div class="gva-table-box">
             <el-table
-              style="width: 100%;height:30vh;"
+              style="width: 100%; height: 30vh"
               :data="tableData1"
               row-key="ID"
               highlight-current-row
@@ -281,7 +329,11 @@
               :header-row-style="{ height: '20px' }"
               :header-cell-style="{ padding: '0px' }"
               @row-click="showOrderSuperLossGy"
-              @current-change="(row, oldRow) => { currentRow = row}"
+              @current-change="
+                (row, oldRow) => {
+                  currentRow = row;
+                }
+              "
             >
               <el-table-column
                 type="selection"
@@ -297,13 +349,12 @@
                 show-overflow-tooltip="true"
                 sortable
               />
-
             </el-table>
           </div>
 
           <!-- 下方表格 -->
           <el-table
-            style="width: 100%;height: 40vh;"
+            style="width: 100%; height: 40vh"
             row-key="ID"
             highlight-current-row
             border
@@ -342,7 +393,7 @@ export const getOrderProcessLeft = (params) => {
   return service({
     url: '/mes_server/work_order_verification/getOrderProcessLeft',
     method: 'get',
-    params
+    params,
   })
 }
 // 5.2流程单查询-获取工单工序生产进程右侧
@@ -350,28 +401,37 @@ export const getOrderProcessRight = (params) => {
   return service({
     url: '/mes_server/work_order_verification/getOrderProcessRight',
     method: 'get',
-    params
+    params,
   })
 }
 </script>
 <script setup>
-import { Layout, LayoutContent, LayoutHeader, LayoutSider } from '@arco-design/web-vue'
+import {
+  Layout,
+  LayoutContent,
+  LayoutHeader,
+  LayoutSider,
+} from '@arco-design/web-vue'
 import { ref, watch } from 'vue'
-import { getOrderSuperLossGy, getSide, getTable } from '@/api/mes_api_gty/orderAccounting'
+import {
+  getOrderSuperLossGy,
+  getSide,
+  getTable,
+} from '@/api/mes_api_gty/orderAccounting'
 import Gdcjstj from '@/view/performance/12-orderAccounting/componets/gdcjstj.vue'
 import Khsz from '@/view/performance/12-orderAccounting/componets/khsz.vue'
 import Xzgdtl from '@/view/performance/12-orderAccounting/componets/xzgdtl.vue'
 import Gxclhc from '@/view/performance/12-orderAccounting/componets/gxclhc.vue'
-import Gongdanzhijianfeipintongji
-  from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'
+import Gongdanzhijianfeipintongji from '@/view/performance/09-workOrderVerification/componets/gongdanzhijianfeipintongji.vue'
 import Detail from '@/view/performance/12-orderAccounting/componets/detail.vue'
 import Hjfpfb from './componets/hjfpfb.vue'
 import PrintPage from '@/view/yunyin/shengchanguanli/components/print.vue'
 import { reactive } from 'vue'
 import { exportExcelFile } from '@/utils/excel'
 import { useUserStore } from '@/pinia/modules/user'
-const userStore = useUserStore() 
-const sys_id='['+userStore.userInfo.userName+'/'+userStore.userInfo.nickName+']'
+const userStore = useUserStore()
+const sys_id =
+  '[' + userStore.userInfo.userName + '/' + userStore.userInfo.nickName + ']'
 
 // 弹窗
 const dialogGdcjstj = ref(false)
@@ -395,7 +455,7 @@ const getSideData = async() => {
       const transformedItem = {
         label: `${date}(工单数:${total})`,
         date: date,
-        children: value.map(item => ({
+        children: value.map((item) => ({
           label: `${item['客户编号']}【${item['客户名称']}】(工单数:${item.total})`,
           date: date,
           code: item?.['客户编号'],
@@ -423,7 +483,7 @@ const tableCols1 = [
   { label: '目标合格率', prop: 'target_rate', width: '120' },
   { label: '实际合格率', prop: 'real_rate', width: '120' },
   { label: '奖惩系数', prop: 'reward_rate', width: '120' },
-  { label: '奖罚金额合计', prop: '', width: '140' },
+  // { label: '奖罚金额合计', prop: '', width: '140' },
   { label: '废品合计', prop: '废品合计', width: '120' },
   { label: '工单无形损', prop: '工单无形损', width: '120' },
   { label: '材料废', prop: '材料废', width: '120' },
@@ -468,9 +528,12 @@ const handleNodeClick = async(node) => {
   if (!node.children) {
     const { date, code } = node
     const res = await getTable({ date, code, limit: 9999, page: 1 })
-    tableData1.value = res.data.data.map(item => ({
+    tableData1.value = res.data.data.map((item) => ({
       ...item,
-      csgd: parseFloat(item['target_rate']) - parseFloat(item['real_rate']) > 0 ? '√' : '',
+      csgd:
+        parseFloat(item['target_rate']) - parseFloat(item['real_rate']) > 0
+          ? '√'
+          : '',
       date: date,
     }))
     console.log(res.data)
@@ -485,17 +548,20 @@ const showOrderSuperLossGy = async() => {
   const res = await getOrderSuperLossGy({ order })
   if (res.code === 0) {
     const { data } = res
-    tableData2.value = data.map(item => ({
+    tableData2.value = data.map((item) => ({
       ...item,
       Gy0_yjno: `${item.Gy0_yjno}-${item.Gy0_gxh}`,
-      Gy0_gxmc: item.Add_gxmc === '' ? item.Gy0_gxmc : `${item.Gy0_gxmc}〖${item.Add_gxmc}〗`,
+      Gy0_gxmc:
+        item.Add_gxmc === ''
+          ? item.Gy0_gxmc
+          : `${item.Gy0_gxmc}〖${item.Add_gxmc}〗`,
     }))
   }
 }
 // 定位
 const handleSearch = () => {
   if (searchInfo.value) {
-    tableData1.value = tableData1.value.filter(item => {
+    tableData1.value = tableData1.value.filter((item) => {
       return item['Gd_gdbh'] === searchInfo.value ?? item
     })
   }
@@ -533,16 +599,20 @@ const _getOrderProcessLeft_list = async() => {
   console.log(order)
   try {
     // 5.1流程单查询-工单工序生产进程菜单栏
-    const getOrderProcessLeft_list = await getOrderProcessLeft({ order: order })
+    const getOrderProcessLeft_list = await getOrderProcessLeft({
+      order: order,
+    })
     console.log(getOrderProcessLeft_list)
     pd_lcdformData['code'] = getOrderProcessLeft_list.data.Gd_info['code']
     pd_lcdformData['name'] = getOrderProcessLeft_list.data.Gd_info['name']
-    pd_lcd_treeData.value = [{
-      label: order + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
-      // label: order + '-' + getOrderProcessLeft_list.data.Gd_info['code'] + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
-      value: undefined,
-      children: []
-    }]
+    pd_lcd_treeData.value = [
+      {
+        label: order + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
+        // label: order + '-' + getOrderProcessLeft_list.data.Gd_info['code'] + '-' + getOrderProcessLeft_list.data.Gd_info['name'],
+        value: undefined,
+        children: [],
+      },
+    ]
     const newData = []
     for (const key in getOrderProcessLeft_list.data.Gy_info) {
       const temp = getOrderProcessLeft_list.data.Gy_info[key]
@@ -551,7 +621,10 @@ const _getOrderProcessLeft_list = async() => {
     }
     pd_lcd_treeData.value[0].children = newData
     // 5.2流程单查询-获取工单工序生产进程右侧【进入页面默认显示第一个】
-    const getOrderProcessRight_list = await getOrderProcessRight({ order: order, gxNo: newData[0].value })
+    const getOrderProcessRight_list = await getOrderProcessRight({
+      order: order,
+      gxNo: newData[0].value,
+    })
     processList.value = getOrderProcessRight_list.data
   } catch (error) {
     console.error(error)
@@ -562,40 +635,30 @@ const pd_lcd_handleNodeClick = async(node) => {
   if (node.value === undefined) return
   const order = pd_lcdformData['gdbh']
   // //5.2流程单查询-获取工单工序生产进程右侧
-  const getOrderProcessRight_list = await getOrderProcessRight({ order: order, gxNo: node.value })
+  const getOrderProcessRight_list = await getOrderProcessRight({
+    order: order,
+    gxNo: node.value,
+  })
   console.log(getOrderProcessRight_list)
   processList.value = getOrderProcessRight_list.data
 }
-//导出
-const testExcel = () => {
-  const data = [
-  {
-      '第一列': '111',
-      '第二列': '222',
-      '第三列': '333',
-      '第四列': '444',
-    },
-    {
-      '第一列': '111',
-      '第二列': '222',
-      '第三列': '333',
-    },
-    {
-      '第一列': '111',
-      '第二列': '222',
-      '第三列': '333',
-    },
-    {
-      '第一列': '111',
-      '第二列': '222',
-      '第三列': '333',
-    },
-
-  ]
-  
-  exportExcelFile(data);
+// 导出excel
+const exportExcel = () => {
+  const labels = tableCols1.map((item) => item.label)
+  const props = tableCols1.map((item) => item.prop)
+
+  const data = tableData1.value.map((item) => {
+    const row = {}
+    props.forEach((prop, index) => {
+      row[labels[index]] = item?.[prop]
+    })
+    return row
+  })
+  if (data[0]?.[labels[0]] === undefined) {
+    return
+  }
+  exportExcelFile(data)
 }
-
 </script>
 
 <style scoped>
@@ -626,18 +689,17 @@ const testExcel = () => {
 }
 
 :deep(.el-table .yellow-row) {
-  background: #FFFF80;
+  background: #ffff80;
 }
 
 :deep(.red-cell div) {
-  color: #FF0000 !important;
+  color: #ff0000 !important;
 }
 
 /* 选中某行时的背景色 */
 :deep(.el-table__body tr.current-row) > td {
   background: #ff80ff !important;
 }
-
 </style>
 <style scoped>
 :deep(.el-table td .cell) {

+ 16 - 2
src/view/performance/14-overTimePayVerification/index.vue

@@ -463,10 +463,24 @@ const onSearch = () => {
 
 // 导出excel
 function exportExcel() {
- exportExcelFile(tableData1,tableCols1)
+ if(tableData1.length<1){
+ 	ElMessage({
+ 	  type: 'error',
+ 	  message: '请确认上方表格内是否存在内容'
+ 	})
+ }else{
+ 	exportExcelFile(tableData1,tableCols1)
+ }
 }
 function exportExcel2() {
- exportExcelFile(tableData2,tableCols2)
+ if(tableData2.length<1){
+ 	ElMessage({
+ 	  type: 'error',
+ 	  message: '请确认上方表格内是否存在内容'
+ 	})
+ }else{
+ 	exportExcelFile(tableData2,tableCols2)
+ }
 }
 const exportExcelFile = (tableData, tableCols) => {
   const data = tableData.map(row => {

+ 27 - 26
src/view/performance/chejianbaogong.vue

@@ -28,7 +28,7 @@
         <el-main>
 
 
-<div class="gva-search-box" style="overflow: hidden; padding: 0; display: flex;"  >
+<div class="gva-search-box" style="overflow: hidden; padding: 0; display: flex;">
 			<div style="flex: 1; border: 0px magenta solid; margin: 0; padding: 0; margin-left: 20px; margin-top: 20px;">
 <!--						  <el-form-item label="工单编号" prop="name">-->
 <!--							<el-row :gutter="24">-->
@@ -42,8 +42,8 @@
 <!--						  </el-form-item>-->
               <el-row :gutter="20">
                 <el-col :span="6">
-                  <el-form-item label="机台号" prop="id" >
-                    <el-input v-model="formData.机台号" placeholder="" />
+                  <el-form-item label="机台号" prop="id">
+                    <el-input v-model="formData.机台号"  placeholder="" />
                   </el-form-item>
                 </el-col>
                 <el-col :span="6">
@@ -322,15 +322,15 @@
           </el-dialog>
 
           <el-dialog v-model="detailShow"
-		   fullscreen 
+		   fullscreen
 		   style="font-size: 50px;font-weight: bold;" lock-scroll :before-close="closeDetailShow" title="机台班组维护" destroy-on-close>
             <div>
 			<el-table ref="multipleTable"
                         :row-style="{ height: '20px' }"
-                        :cell-style="cellStyle"
+                        :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                         :header-cell-style="{ padding: '0px' }"
                         :show-overflow-tooltip="true"
-                        :cell-class-name="bzryplanUsageCellClass"						
+                        :cell-class-name="bzryplanUsageCellClass"
                         @row-click="BZhandle"
                         style="width: 100%;height: 250px;margin-top: 0px;" border tooltip-effect="dark"
 						:data="bzData" row-key="ID" @selection-change="BZSelectionChange">
@@ -3304,19 +3304,20 @@ const RemodelGetTab = async() => {
   }
 }
 //设置机台状态
-const SetMachineStatus = async () => {
-  // const response = await setMachineStatus({
-	 //  machine:'JY03',
-	 //  gy_name:'02-胶印〖白、黑、哑油【预干】、NT光油',
-	 //  order:'2311114',
-	 //  yjno:'1',
-	 //  class:'ZM00545,ZM01351,ZM01170',
-	 //  status:'维修',
-	 //  production_now:'',
-	 //  production_all:'',
-  // });
-  // if (response.code === 0) {
-  // }
+const SetMachineStatus = async (row) => {
+   const response = await setMachineStatus({
+	 machine: JTMC.split("#")[0],
+	 order:row['工单编号|质量信息'].split('|')[0],
+	 yjno:'1',
+	 gy_name:row['工序名称'],
+	 sczl_bzdh:BZMC.value,
+	 status:'生产',
+	 production_now:0,
+	 production_all:0,
+	 class:'ZM00361,ZM00743,ZM01269,ZM02842'
+  });
+  if (response.code === 0) {
+  }
 }
 //提交巡查记录
 function onxuncha() {
@@ -3400,7 +3401,7 @@ const zhichengDialog = async () => {
 			item.result='不检测'
 			item.item=item.检验项目
 			item.instrument=item.检测方法
-			item.standard=item.相关标准
+			item.standard=''
 			delete item.notjc
 			delete item.zc
 			delete item.yc
@@ -3608,7 +3609,7 @@ const ReportInfo = async () => {
       上机时间:formData.value.上机时间,
       装版总时长:0,
       定额代号:formData.value.定额代号,
-      sczl_jtbh: JTMC,
+      sczl_jtbh: JTMC.split("#")[0],
       sczl_bzdh: classInfo.sczl_bzdh,
       sys_id: classInfo.sys_id,
       sys_rq: classInfo.sys_rq,
@@ -4493,7 +4494,8 @@ const yjupdateCompanyFunc = async(row) => {
 
 const setMachineTeams = async(row) => {
 	console.log(row.UniqId)
-    const res = await setMachineTeam({
+	 console.log(row)
+    const res = await setMachineTeam({		   
 			machine: JTMC.split("#")[0],
 			order:row['工单编号|质量信息'].split('|')[0],
 			yjno:row['印件资料'].split('-')[0],
@@ -4505,7 +4507,7 @@ const setMachineTeams = async(row) => {
 			team_id:formData.value.班组Id
 			})
     if (res.code === 0) {
-      EquipmentSchedulingEdits(row)
+      // EquipmentSchedulingEdits(row)
 	  MachineWorkOrderEdits(row)
       ElMessage({
 		        type: 'success',
@@ -4519,7 +4521,7 @@ const MachineWorkOrderEdits = async(row) => {
 			machine: JTMC,
 			})
     if (res.code === 0) {
-
+    SetMachineStatus(row)
     }
 }
 
@@ -4729,9 +4731,8 @@ const bzryplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
      background-color:white}
 	 .bt {
 	   height: 5vh;
-	   width: 15vh;
+	   width: 14vh;
 	   font-size:2vh;
-	   
 	 }
 	  .gva-table-box{
 	   font-size: 15px;

+ 24 - 12
src/view/performance/yuangongrigongzi.vue

@@ -376,18 +376,18 @@ const tableCols2 = [
   { label: '日期', prop: 'sczl_rq', width: '105' },
   { label: '工单编号', prop: 'sczl_gdbh', width: '105' },
   { label: '产品名称', prop: 'Gd_cpmc', width: '120' },
-  { label: '印件及工序', prop: 'sczl_type', width: '105' },
+  { label: '印件及工序', prop: 'sczl_type', width: '120' },
   { label: '机台编号', prop: 'sczl_jtbh', width: '105' },
-  { label: '班组车头产量', prop: '班组车头产量', width: '105' },
+  { label: '班组车头产量', prop: '班组车头产量', width: '135' },
   { label: '班组换算产量', prop: '班组换算产量', width: '135' },
   { label: '工序难度系数', prop: '工序难度系数', width: '135' },
-  { label: '个人计件工资', prop: '个人计件工资', width: '105' },
-  { label: '个人加班工资', prop: '个人加班工资', width: '105' },
+  { label: '个人计件工资', prop: '个人计件工资', width: '135' },
+  { label: '个人加班工资', prop: '个人加班工资', width: '135' },
   { label: '装版工时', prop: '装版工时', width: '120' },
   { label: '保养工时', prop: '保养工时', width: '105' },
   { label: '打样工时', prop: '打样工时', width: '105' },
-  { label: '异常停机工时', prop: '异常停机工时', width: '105' },
-  { label: '车头产量占用机时', prop: '车头产量占用机时', width: '135' },
+  { label: '异常停机工时', prop: '异常停机工时', width: '145' },
+  { label: '车头产量占用机时', prop: '车头产量占用机时', width: '175' },
   { label: '日定额', prop: '日定额', width: '135' },
   { label: '达标定额', prop: '达标定额', width: '105' },
   { label: '千件工价', prop: '千件工价', width: '105' },
@@ -744,13 +744,25 @@ function doubleClick(row, column, event) {
 
 // 导出excel
 
-function exportExcel() {
-
- exportExcelFile(tableData,tableCols1)
+function exportExcel() {
+ if(tableData.length<1){
+ 	ElMessage({
+ 	  type: 'error',
+ 	  message: '请确认上方表格内是否存在内容'
+ 	})
+ }else{
+ 	exportExcelFile(tableData,tableCols1)
+ }
 };
-function exportExcel2() {
-
- exportExcelFile(tableData2,tableCols2)
+function exportExcel2() {
+if(tableData2.length<1){
+		ElMessage({
+		  type: 'error',
+		  message: '请确认上方表格内是否存在内容'
+		})
+	}else{
+		exportExcelFile(tableData2,tableCols2)
+	}
 };
 const exportExcelFile = (tableData, tableCols) => {
   const data = tableData.map(row => {