liuhairui 1 rok temu
rodzic
commit
a7ea258130
1 zmienionych plików z 58 dodań i 89 usunięć
  1. 58 89
      src/view/performance/chejianbaogong.vue

+ 58 - 89
src/view/performance/chejianbaogong.vue

@@ -76,11 +76,17 @@
 	</div>
 </div>
 
-	<div class="gva-table-box" style="margin-top: 20px;">
-		<el-tabs v-model="activName" type="card" @tab-click="duohandleClick"   >
+          <div class="gva-table-box" style="margin-top: 20px;">
+            <el-tabs v-model="activName" type="card" @tab-click="duohandleClick"   >
 			<el-tab-pane label="设备作业清单" @click.native="showTable('设备作业清单', 'first')" name="first"  :class="{ 'active-tab': activeTab === 'first' }" style="font-size: 16px;">
-				<el-table ref="multipleTable" :show-overflow-tooltip="true"  highlight-current-row="true" :cell-class-name="sbzyqdsatusCellClass"
-					:row-style="{ height: '40px' }"  :cell-style="{ padding: '0px' }"  :header-row-style="{ height: '40px' }" :header-cell-style="{ padding: '0px' }"
+				<el-table ref="multipleTable" 
+					:show-overflow-tooltip="true" 
+					highlight-current-row="true"
+					:cell-class-name="sbzyqdsatusCellClass"
+					:row-style="{ height: '40px' }" 
+					:cell-style="{ padding: '0px' }" 
+					:header-row-style="{ height: '40px' }"
+					:header-cell-style="{ padding: '0px' }"
 					@contextmenu.prevent="yjonRightClick" 
 					@row-click="yjupdateCompanyFunc"
 					style="width: 100%;height: 330px;color:purple;font-weight: bold;" border tooltip-effect="dark"
@@ -166,7 +172,7 @@
               <el-table-column align="left" label="色度数" prop="色度" width="100" />
             </el-table>
 		</el-tab-pane>
-		
+
 			<el-tab-pane label="检验记录" @click="showTable('检验记录')" name="fourth">
 			<el-table ref="multipleTable" :row-style="{ height: '40px' }" :cell-style="{ padding: '0px'}" :header-row-style="{ height: '40px' }"
 					  :header-cell-style="{ padding: '0px' }" :show-overflow-tooltip="true" highlight-current-row="true"
@@ -179,10 +185,20 @@
 			  <el-table-column v-for="time in columnNames" :key="time" :label="time" :prop="time" align="center" width="120"></el-table-column>
 			</el-table>
 			</el-tab-pane>
-		</el-tabs>
-	</div>
-		  
-		  
+				
+	  </el-tabs>
+            <!-- <div class="gva-pagination">
+              <el-pagination
+                  layout="total, sizes, prev, pager, next, jumper"
+                  :current-page="page"
+                  :page-size="pageSize"
+                  :page-sizes="[10, 30, 50, 100]"
+                  :total="total"
+                  @current-change="handleCurrentChange"
+                  @size-change="handleSizeChange"
+              />
+            </div> -->
+          </div>
           <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="type==='create'?'添加':'修改'" destroy-on-close>
           <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
             <el-tab-pane label="当日上报产量"  @click="showTable('工艺资料')"  name="first">
@@ -2156,38 +2172,8 @@ const remodelDetail = async (val) => {
   }
 }
 const handleNodeClick = (nodeData,node) => {
-  //存放当前节点的nodeId
-  // if(nodeData.level === 1){
-	//   console.log('1')
-  // }else{
-	//   console.log('2')
-  // }
-  //  if (nodeData.level === 1) {
-  //       console.log(node.label); // 第一级节点
-  //     } else if (nodeData.level === 2) {
-  //       console.log(node.label); // 第二级节点
-		// JTMC=node.label.split("【")[0]
-		// FacilityProduction()
-		// FacilityWorklist()
-		// FacilityTeam(JTMC)
-		// // InspectionRecord()
-		// // FacilityDetail()
-		// // ReportProduceInfo()
-		// console.log(JTMC)
-  //     } else if (nodeData.level === 3) {
-  //       console.log(node.label); // 第三级节点
-	 //   }
-	 // JTMC=node.label.split("【")[0]
-	 // FacilityProduction()
-		 // console.log(node.label)
 }
-//当前生产订单
 
-// const formDatabz = reactive({
-//   sczl_bh12: [],
-//   sczl_name12: [],
-
-// });
 const classbz=ref([])
 const FacilityProduction = async (addr) => {
   if(JTMC === '' || JTMC === null){
@@ -2513,45 +2499,41 @@ const FacilityDetail = async () => {
 	const hours = String(today.getHours()).padStart(2, '0');
 	const minutes = String(today.getMinutes()).padStart(2, '0');
 	const seconds = String(today.getSeconds()).padStart(2, '0');
-	
 	const currentHour = today.getHours(); // 获取当前的小时
 	let currentDate = `${year}-${month}-${day}`;
+	formData.value.production_now=0
+	formData.value.production_all=0
 	
+	console.log("machine--->"+JTMC)
+	console.log("Gd_gdbh--->"+formData.value.工单编号)
+	console.log("team--->"+BZMC.value)
+	const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team:BZMC.value });
+	console.log(response)
+	console.log("↑↑↑↑facilityDetail_01 ↑↑↑↑↑↑")
 	
-  formData.value.production_now=0
-  formData.value.production_all=0
-  
-  console.log("machine--->"+JTMC)
-  console.log("Gd_gdbh--->"+formData.value.工单编号)
-  console.log("team--->"+BZMC.value)
-  const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team:BZMC.value });
-  console.log(response)
-  console.log("facilityDetail_01")
-  // 日产量上报上机时间
-  if (response.code === 0) {
-    if(response.data === null){
-         if (currentHour < 8 || (currentHour === 8 && minutes < 30)) {
-                // 如果当前时间早于08:30, 则设置为前一天的晚班时间20:30
-                // 需要将日期减一天
-                const yesterDay = new Date(today.getTime() - 86400000); // 减去一天的毫秒数
-                const yearYesterday = yesterDay.getFullYear();
-                const monthYesterday = String(yesterDay.getMonth() + 1).padStart(2, '0');
-                const dayYesterday = String(yesterDay.getDate()).padStart(2, '0');
-                formData.value.上机时间 = `${yearYesterday}-${monthYesterday}-${dayYesterday} 20:30:00`;
-            } else {
-                // 如果当前时间晚于或等于08:30, 则设置为当天的白班时间08:30
-                formData.value.上机时间 = `${currentDate} 08:30:00`;
-            }
-    }else{
+	// 日产量上报上机时间
+	if (response.code === 0) {
+	if(response.data === null){
+		 if (currentHour < 8 || (currentHour === 8 && minutes < 30)) {
+				// 如果当前时间早于08:30, 则设置为前一天的晚班时间20:30
+				// 需要将日期减一天
+				const yesterDay = new Date(today.getTime() - 86400000); // 减去一天的毫秒数
+				const yearYesterday = yesterDay.getFullYear();
+				const monthYesterday = String(yesterDay.getMonth() + 1).padStart(2, '0');
+				const dayYesterday = String(yesterDay.getDate()).padStart(2, '0');
+				formData.value.上机时间 = `${yearYesterday}-${monthYesterday}-${dayYesterday} 20:30:00`;
+			} else {
+				// 如果当前时间晚于或等于08:30, 则设置为当天的白班时间08:30
+				formData.value.上机时间 = `${currentDate} 08:30:00`;
+			}
+	}else{
 		// formData.value.上机时间 = response.data.sj1
-      formData.value.上机时间 = currentDate.split('-')[0]+'-'+response.data[0]['生产时间段'].split('>')[1]+':00'
-    }
-	
-	
-    CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
-    formData.value.production_now=response.data[0].产量
-    formData.value.production_all=response.data.total.产量
-  }
+	  formData.value.上机时间 = currentDate.split('-')[0]+'-'+response.data[0]['生产时间段'].split('>')[1]+':00'
+	}
+	CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
+	formData.value.production_now=response.data[0].产量
+	formData.value.production_all=response.data.total.产量
+	}
 };
 
 //员工编号回车事件
@@ -2612,12 +2594,6 @@ const getxunchayg = async (value) => {
   if (response.code === 0) {
     xunchaData.value.sczl_name=response.data[0].ygxm
 	  xunchaData.value.sczl_bh=response.data[0].员工编号
-  //   response.data.forEach(item => {
-  //     const { ygxm, 员工编号 } = item;
-  //     // 假设 bzxm 和 bzyg 是动态的属性名称
-  //     xunchaData.value[bzxm] = ygxm;
-  //     xunchaData.value[bzyg] = 员工编号;
-  //   });
   }
 }
 const getlaliaoyg = async (value) => {
@@ -2629,21 +2605,16 @@ const getlaliaoyg = async (value) => {
 //获取员工信息
 const GetYg = async (value,inputName) => {
   const response = await getYg({sczl_bh:value});
-  // console.log(response)
   if (response.code === 0) {
-	// console.log(response.data.ygxm)
 	let Bname = 'sczl_name' + inputName;
 	let Bbh = 'sczl_bh' + inputName;
 	console.log(Bbh)
 	formData3.value[Bname]=response.data.ygxm
 	formData3.value[Bbh]=response.data.员工编号
-
-	// console.log(formData.value[Bname])
   }
 }
 // 验证规则
-const rule = reactive({
-})
+const rule = reactive({})
 
 const searchRule = reactive({
   createdAt: [
@@ -2660,7 +2631,6 @@ const searchRule = reactive({
     }, trigger: 'change' }
   ],
 })
-
 const elFormRef = ref()
 const elSearchFormRef = ref()
 
@@ -2676,7 +2646,6 @@ const huanxingStatus=ref(0)
 const yinbantreeData=ref([])
 const fujiaselectData=ref([])
 const searchInfo = ref({})
-
 const onHxadd = () => {
   huanxingstatus.value=true
   huanxingType.value=true
@@ -2794,7 +2763,6 @@ const remodelDataAdds = async() => {
       type: 'success',
       message: '新增成功!'
     })
-    // remodelDetail(formData.value.huanxingId)
     RemodelGetTab()
     modelChangeRecord(JTMC)
   }
@@ -2969,6 +2937,7 @@ const facilityPrintDetailItem = async (value) => {
     formData.value.code=value
     // 调用接口获取巡检项目数据
     const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:formData.value.productCode });
+	console.log("机台印版领用")
     // 检查接口返回的状态码
     if (response.code === 0) {
      console.log(response)
@@ -3600,7 +3569,7 @@ function onchanliang() {
 	ReportInfo();
 }
 
-//日产量详情获取
+//日产量详情获取 日产量上报
 const ReportInfo = async () => {
 	const getTimelistss = await getTimelist();
 	console.log(getTimelistss)