Browse Source

合计点击优化

曹鹤洋 1 year ago
parent
commit
03af2c53d3

+ 1 - 1
src/view/job/related/related.vue

@@ -533,7 +533,7 @@ const handleNodeClick = (node, check) => {
 				  // 更新表格数据
 				  tableData.splice(0, tableData.length, ...combinedData);
 				  //选中第一条记录
-				  ontable(tableData[0])
+				  // ontable(tableData[0])
 		  }
 	})
   }

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

@@ -276,7 +276,8 @@ const handleDblclick1 = async(row) => {
   //   tableData2.splice(0, tableData2.length, ...data)
   // }
 }
-const clickybupdate = async(row) => {
+const clickybupdate = async(row) => {
+	if(row.bh == undefined) return
   params.code = row.bh
   const { date, code } = params
   const res = await getDownData({ date, code })
@@ -300,7 +301,6 @@ const clickybupdate = async(row) => {
 
     tableData2.splice(0, tableData2.length, ...data)
   }
-  console.log('22')
 }
 
 // 搜索

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

@@ -379,8 +379,6 @@ const treeData = reactive([]);
 const getTabdata = async () => {
     //接口调用函数
     const response  = await dailygetTab();
-	console.log(response)
-	
 	
 	const transformedData = response.data.map(item => ({
 	      label: `${item.label}`,
@@ -472,7 +470,6 @@ const getTableData = async () => {
 	          // 如果下一个员工姓名与当前不同,插入合计数据
 	          const currentSummary = summaryData.shift();
 	          combinedData.push(currentSummary);
-			  console.log(currentSummary)
 			 
 	        }
 	      });
@@ -549,16 +546,13 @@ function onposition() {
   positioningVisibleshow.value=true
 }
 const enterpositioning = async () => {
- console.log(params.date)
  let parts = params.date.split('-')
  
  // # 截取第一个"-"之前的内容并赋值给新变量1
  let new_variable1 = parts[0]
- console.log(new_variable1)
  
  // # 截取第一个"-"之后到第二个"-"之前的内容并赋值给新变量2
  let new_variable2 = parts[1]
- console.log(new_variable1+new_variable2) 
  Getlocate(new_variable1+new_variable2)
  positioningVisibleshow.value=false
 }
@@ -576,11 +570,8 @@ const Getlocate = async (value) => {
     search:positionvalue.value
   })
   if (response.code === 0) {
-	console.log(params.data+positionvalue.value)
     tableData.splice(0, tableData.length, ...response.data)
   }
-  console.log(response)
-  console.log(params.data+positionvalue.value)
 }
 // 搜索
 function onSearch() {
@@ -694,37 +685,33 @@ const enterDialog = async () => {
 // 单击表格操作
 function ontable(row, column, event) {
   currentRow.value = row
-  console.log(params.date)
   let parts = params.date.split('-')
   
   // # 截取第一个"-"之前的内容并赋值给新变量1
   let new_variable1 = parts[0]
-  console.log(new_variable1)
   
   // # 截取第一个"-"之后到第二个"-"之前的内容并赋值给新变量2
   let new_variable2 = parts[1]
-  console.log(new_variable1+new_variable2) 
-  console.log(new_variable1)
-  console.log(row.bh)
   Getundertable(new_variable1,row.bh)
 }
 //获取下列表
-const Getundertable = async (date,bh) => {
-  const response = await dailygetAllList({date:date,code:bh});
-  if(response.code==0){
-	  console.log(response)
-	   tableData2.splice(0, tableData2.length, ...response.data);
-	// console.log(response.data.num)
-	// const rowIndex = tableData.findIndex(row => row.UniqId === lastCellValue);
-	// console.log(rowIndex)
-	// tableData[rowIndex].sczl_废品率系数 = response.data.num;
-  }
+const Getundertable = (date,bh) => {
+	if(bh == undefined) return
+  dailygetAllList({date:date,code:bh}).then(response=>{
+	  if(response.code==0){
+	  	   tableData2.splice(0, tableData2.length, ...response.data);
+	  	// console.log(response.data.num)
+	  	// const rowIndex = tableData.findIndex(row => row.UniqId === lastCellValue);
+	  	// console.log(rowIndex)
+	  	// tableData[rowIndex].sczl_废品率系数 = response.data.num;
+	  }
+  })
+  
   // console.log(response)
   // const rowIndex = tableData.findIndex(row => row.UniqId === 123);
 }
 // 双击表格操作
 function doubleClick(row, column, event) {
-  console.log(row, column, event);
   // updateCompanyFunc(row);
   type.value = 'update';
   // dialogFormVisible.value = true
@@ -739,7 +726,6 @@ const currentRow = ref()
 const dialogYgjjmx = ref(false)
 function handlePrint() {
   dialogYgjjmx.value = true
-  console.log(currentRow.value);
 }
 
 // 生命周期钩子