Преглед изворни кода

设备运行跟踪实际机台数据

Lexie пре 1 година
родитељ
комит
55ad56da5b
1 измењених фајлова са 19 додато и 10 уклоњено
  1. 19 10
      src/view/yunyin/shengchanguanli/shebeiyunxing.vue

+ 19 - 10
src/view/yunyin/shengchanguanli/shebeiyunxing.vue

@@ -4,14 +4,14 @@
 	    <header>
 			<el-button type="primary" @click="onBZ">班组维护</el-button>
 			<el-button type="primary" @click="onzhicheng"  >制程检验</el-button>
-			<el-button type="primary" @click="onDel">删除</el-button>
+			<!-- <el-button type="primary" @click="onDel">删除</el-button> -->
 			<el-button type="primary" @click="onxuncha">管理巡查</el-button>
 			<el-button type="primary" @click="ondianjian">设备点检</el-button>
 			<el-button type="primary" @click="onyinban">印版领退</el-button>
-			<el-button type="primary" @click="onstatus" >设置机台状态</el-button>
+			<!-- <el-button type="primary" @click="onstatus" >设置机台状态</el-button> -->
 			<el-button type="primary" @click="oncomplaints" >客诉记录</el-button>
 			<el-button type="primary" @click="onClear" >换型清场</el-button>
-			<el-button type="primary" @click="onClear2" >换型清场</el-button>
+			<!-- <el-button type="primary" @click="onClear2" >换型清场</el-button> -->
 		</header>
     <el-container>
       <el-aside width="200px">
@@ -1661,6 +1661,7 @@ const GetdialogSbyxgl = async () => {
 //   return require(`@/assets/${status}.png`);
 // }
 const classbz=ref([])
+const GDBH=ref()
 //当前生产订单
 const FacilityProduction = async () => {
   const response = await facilityProduction({machine:JTMC});
@@ -1729,8 +1730,8 @@ const FacilityWorklist = async () => {
 //检验记录
 const InspectionRecord = async () => {
 	console.log(formData.value.班组)
-  // const response = await inspectionRecord({machine:JTMC,Gd_gdbh:formData.value.工单编号,team:formData.value.班组});
-  const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2311114',team:'A班'});
+  const response = await inspectionRecord({machine:JTMC,Gd_gdbh:formData.value.工单编号,team:BZMC.value});
+  // const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2311114',team:'A班'});
   // const response = await inspectionRecord({machine:'JY01#',Gd_gdbh:'2312191',team:'A班'});
   console.log(response)
   if(response.code==0){
@@ -1780,7 +1781,7 @@ const FacilityDetail = async () => {
 	formData.value.production_now=0
 	formData.value.production_all=0
   // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: formData.value.班组 });
-   const response = await facilityDetail({ machine: 'JY01#', Gd_gdbh: '2312191', team: 'A班' });
+   const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team: BZMC.value });
   // const response = await facilityDetail({ machine: JTMC, Gd_gdbh: '2311114', team:'A班' });
   if (response.code === 0) {
 	console.log('123123')
@@ -2044,7 +2045,7 @@ const Complaints = async() => {
 	// console.log(sbzyData[0].产品代号)
 	// console.log(sbzyData[0].产品代号)
     // const res = await ComplaintRecord({productCode :cpcode.value})
-	const res = await ComplaintRecord({productCode :'100601011'})
+	const res = await ComplaintRecord({productCode :formData.value.productCode})
     if (res.code === 0) {			
 		if(res.data==null){
 			console.log('暂无客诉记录')
@@ -2078,7 +2079,8 @@ function onClear() {
 	 RemodelGetTab()
 }
 function onClear2() {
-	console.log(formData.value.class)
+	console.log(formData.value.工单编号)
+	console.log(BZMC)
 }
 const RemodelGetTab = async() => {
   const response = await remodelGetTab()
@@ -2175,6 +2177,7 @@ function ondianjian() {
 }
 
 const onyinban = async() => {
+	console.log(formData.value.productCodes)
 	const res = await facilityPrintGetTab({productCode:formData.value.productCode})
 	if(res.code===0){
 		yinbantreeData.value=[{
@@ -2246,7 +2249,7 @@ const facilityPrintDetailItem = async (value) => {
   try {
     // 调用接口获取巡检项目数据
     // const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:productCode.value });
-	const response = await facilityPrintDetail({ workOrder: '2312165',code:'0521',productCode:'104601001' });
+	const response = await facilityPrintDetail({ workOrder: formData.value.工单编号,code:value,productCode:formData.value.productCode });
     // 检查接口返回的状态码
     if (response.code === 0) {
      console.log(response)
@@ -2288,6 +2291,8 @@ const yinbanNodeClick = (node, check, nodeData) => {
     // 点击的是子节点,或者没有子节点
     // 执行相应的子节点单击事件处理逻辑
      facilityPrintDetailItem(node.code)
+	 // console.log()
+	 
   }
 };
 const xunchaNodeClick = (node, check, nodeData) => {
@@ -2297,7 +2302,11 @@ const xunchaNodeClick = (node, check, nodeData) => {
 }
 
 const fieldInspectionRecord = async () => {
-	const response = await FieldInspectionRecord({ workOrder: '2311114',team:'A班',start:'2024-01-19 08:30:00' });
+	let time = new Date();
+	time.setDate(time.getDate() - 0); // 今天的前N天的日期,N自定义
+	time= `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`;
+	console.log(time+' 08:30:00')
+	const response = await FieldInspectionRecord({ workOrder: formData.value.工单编号,team:BZMC.value,start:time+' 08:30:00' });
 	if (response.code === 0) {
 		xunchaselectData.value=response.data
 	}