فهرست منبع

首页样式 车间总机台状态

Lexie 1 سال پیش
والد
کامیت
072d1b60ca

+ 2 - 2
src/view/dashboard/index.vue

@@ -68,13 +68,13 @@
             <el-row :gutter="20">
               <el-col
                 :xs="24"
-                :sm="16" <!-- 更改sm属性值为16,占据更少的空间 -->
+                :sm="16" 
               >
                 <echarts-line />
               </el-col>
               <el-col
                 :xs="24"
-                :sm="8" <!-- 更改sm属性值为8,占据更少的空间 -->
+                :sm="8" 
               >
                 <dashboard-table />
               </el-col>

+ 38 - 20
src/view/job/processSheet/processSheet.vue

@@ -98,10 +98,10 @@
 	             <div id="liucheng">
 	                 <fieldset class="newlabel">
 	                 <table width="100%" border="1" class="new_craft" id="new_craft">
-	             	   <caption>工艺</caption>	  
+	             	   <caption>工艺</caption>
 	             		  <tr>
 							  <td width="40%">上次<span style="color: red">{{department}}</span>工艺更新时间:<span style="color: red">{{update}}</span></td>
-							  <td> 
+							  <td>
 							      <input type="button" style="margin-left: 1px;" value="增加工艺" @click="addInput"/>
 							  </td>
 						  </tr>
@@ -150,7 +150,8 @@
 	const shuang = ref(false)
 	const update = ref()
 	const data = ref()
-	const gyData = ref([])
+  const peijian = ref(0)
+  const gyData = ref([])
 	const selectedPaper = ref([])
 	const selectedPeijian = ref([])
 	const datas = ref([])
@@ -182,7 +183,7 @@
 				  console.log(getDocumentDatas.data.paper.length)
 				  selectedPaper.value=getDocumentDatas.data.paper
 				  selectedPeijian.value=getDocumentDatas.data.peijian
-				  
+
 			  }else{
 				  dan.value=true
 				  shuang.value=false
@@ -191,6 +192,7 @@
 			  }
 			  workData.value.num=getDocumentDatas.data.paper[0].bom_计划用量;
 			  if(getDocumentDatas.data.peijian){
+          peijian.value=getDocumentDatas.data.peijian[0]['id']
 				  const getHistory = async() => {
 				    const getDocumentHistorys = await getDocumentHistory({
 						order:workData.value.Gd_gdbh,
@@ -200,36 +202,52 @@
 							update.value=getDocumentHistorys.data.update
 							gyData.value=getDocumentHistorys.data.data.map((item)=>({
 								gy:item
-							}))			  	  
+							}))
 				    }
 				  }
 				  getHistory()
 			  }
-			  
+
 		  }
 		}
 		getDocument()
-		
+
 	}
 	const addInput = () => {
 	 gyData.value.push({gy:''})
 	}
 	const sendClick = () => {
-		const saveDocument = async() => {
-			datas.value = gyData.value.map((item)=>(item.gy))
-			data.value= datas.value.join(",")
-		  const saveDocumentDatas = await saveDocumentData({order:2109722,data:data.value,peijian:0})
-		  if (saveDocumentDatas.code === 0) {
-		  	  console.log(saveDocumentDatas)
-		  }
-		}
 		saveDocument()
 	}
+  const saveDocument = async() => {
+    datas.value = gyData.value.map((item)=>(item.gy))
+    data.value= datas.value.join(",")
+    const saveDocumentDatas = await saveDocumentData({order:workData.value.Gd_gdbh,data:data.value,peijian:peijian.value})
+    if (saveDocumentDatas.code === 0) {
+      getDocument()
+    }
+  }
+  const getDocument = async() => {
+    const getDocumentInfos = await getDocumentInfo({
+      order:workData.value.Gd_gdbh,
+      mabao:workData.value.mabao,
+      version:workData.value.version,
+      start_liucheng:workData.value.start_liucheng,
+      tldx:workData.value.tldx,
+      remark:workData.value.remark,
+      string:data.value,
+      num:workData.value.num
+    })
+    if (getDocumentInfos.code === 0) {
+      console.log(getDocumentInfos.data)
+    }
+  }
 	const selectpPaper = (event) => {
 		 workData.value.num=event.target.value
 	}
-	
+
 	const selectPeijian = async(event) => {
+    peijian.value=event.target.value
 		 const getDocumentHistoryss = await getDocumentHistory({
 		 	order:workData.value.Gd_gdbh,
 		 	peijian:event.target.value})
@@ -239,10 +257,10 @@
 		 		update.value=getDocumentHistoryss.data.update
 		 		gyData.value=getDocumentHistoryss.data.data.map((item)=>({
 		 			gy:item
-		 		}))			  	  
+		 		}))
 		 }
 	}
-	
+
 </script>
 
 <style>
@@ -287,7 +305,7 @@
 	    position: fixed;
 	}
 	#daima table{
-	
+
 	}
 	.firm  ul,.product  ul,.tag ul{
 	    width:100%;
@@ -358,4 +376,4 @@
 	.msg{ font-size: 13px; }
 	.onError{ color: red; }
 	.onSuccess{ color: green; }
-</style>
+</style>

+ 4 - 7
src/view/performance/Manualdocuments.vue

@@ -1583,14 +1583,11 @@ let table=ref(5);
 let lastCellValue=ref()
 // 双击表格操作
 function doubleClick(row, column, event) {
-  type.value = 'update';
-  		  lastCellValue= row['UniqId'];
-  		 console.log(lastCellValue)
-  	 table.value=lastCellValue
-  	 	 dialogFormVisible.value = true
-  		// dialogSelectVisible.value = true
+	type.value = 'update';
+  	lastCellValue= row['UniqId'];
+  	table.value=lastCellValue
+  	dialogFormVisible.value = true
     GetInfo(table.value)
-  // dialogFormVisible.value = true
 }
 // 单击表格操作
 function Click(row, column, event) {

+ 4 - 34
src/view/performance/Packagingoutput.vue

@@ -849,43 +849,13 @@ const enterDialog = async () => {
 let lastCellValue=ref()
 // 双击表格操作
 function doubleClick(row) {
-  
-     // console.log(row, column, event);
-       // updateCompanyFunc(row);
-       type.value = 'update';     
-	   lastCellValue= row['UniqId'];
-		 console.log(lastCellValue)
-		 table.value=lastCellValue
-       getpickInfo(table.value)
+    type.value = 'update';
+    getpickInfo(row['UniqId'])
+	dialogFormVisible.value = true
 }
 // 单击表格操作
 function Click(row, column, event) {
-    lastCellValue= row['UniqId'];
-   console.log(lastCellValue)
-  // if(row['table_type']=='db_sczl'){
-  // 	 dialogFormVisible.value = true
-  // 	 GetInfo(table.value)
-  // }else{
-	 //  console.log('此数据不展示详细信息')
-  // }  
-}
-
-function GxMcdoubleClick(row) {
-
-   GxMcvalue=row
-   closegetGxMcshow()
-   console.log(GxMcvalue.Gd_cpmc)
-   
-   
-   
-   // 根据 response.data.length 的值动态给 formData 中的变量赋值
-   let Bname = 'Gd_cpmc' + inputname.value;
-   let Bname2= 'sczl_gxmc' + inputname.value;
-   let Bname3 = 'sczl_yjGx' + inputname.value;
-   formData.value[Bname] =GxMcvalue.Gd_cpmc; // 假设要赋的值是 123
-   formData.value[Bname2] = GxMcvalue.Gy0_gxmc;
-   formData.value[Bname3] = GxMcvalue.jyGx;
-   
+    lastCellValue= row['UniqId'];  
 }
 
 // 导出excel

+ 128 - 64
src/view/performance/chejianbaogong.vue

@@ -2,16 +2,16 @@
   <div>
 	<header>
 		<div style="height: 50px;">
-			<el-button type="primary" @click="onBZ" >班组维护</el-button>
-			<el-button type="primary" @click="onchanliang"  v-if="zdtreeType === true" >日产量上报</el-button>
-			<el-button type="primary" @click="onOver" >完工</el-button>
-			<el-button type="primary" @click="onzhicheng"  >制程检验</el-button>
-			<el-button type="primary" @click="ondianjian"  >设备点检</el-button>
-			<el-button type="primary" @click="onxuncha" >管理巡查</el-button>
-			<el-button type="primary" @click="onstatus" >设置机台状态</el-button>
-			<el-button type="primary" @click="onyinban">印版领退</el-button>
-			<el-button type="primary" @click="onClear" >换型清场</el-button>
-			<el-button type="primary" @click="oncomplaints" >客诉记录</el-button>
+			<el-button type="primary" size="large" @click="onBZ" >班组维护</el-button>
+			<el-button type="primary" size="large" @click="onchanliang"  v-if="zdtreeType === true" >日产量上报</el-button>
+			<el-button type="primary" size="large" @click="onOver" >完工</el-button>
+			<el-button type="primary" size="large" @click="onzhicheng"  >制程检验</el-button>
+			<el-button type="primary" size="large" @click="ondianjian"  >设备点检</el-button>
+			<el-button type="primary" size="large" @click="onxuncha" >管理巡查</el-button>
+			<el-button type="primary" size="large" @click="onstatus" >设置机台状态</el-button>
+			<el-button type="primary" size="large" @click="onyinban">印版领退</el-button>
+			<el-button type="primary" size="large" @click="onClear" >换型清场</el-button>
+			<el-button type="primary" size="large" @click="oncomplaints" >客诉记录</el-button>
 		</div>
 		</header>
 
@@ -130,13 +130,13 @@
 
                         <el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
                           <el-table ref="multipleTable"
-                                    highlight-current-row="true"
                                     :show-overflow-tooltip="true"
                                     :row-style="{ height: '20px' }"
                                     :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                                     :header-cell-style="{ padding: '0px' }"
                                     @row-dblclick="gyupdateCompanyFunc"
                                     :row-class-name="rowClassStyle"
+                                    :cell-class-name="bzryplanUsageCellClass"
                                     style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
                                     @row-click="clickybupdate">
                            <el-table-column type="selection" label="选择" width="55" />
@@ -1348,7 +1348,7 @@
 		    </el-col>
 			<el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
 			  <el-form-item label="工号 " prop="id" style="margin-top=0px; margin-bottom: 0px;">
-			    <el-input v-model="xunchaData.sczl_bh"  @keyup.enter.native="getygsubmit($event, '11')"  placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
+			    <el-input v-model="xunchaData.sczl_bh"  @keyup.enter.native="getxunchayg($event)"  placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
 			  </el-form-item>
 			</el-col>
 			<el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
@@ -1858,6 +1858,10 @@ import {
   getCompanyList
 } from '@/api/company'
 
+import {
+  EquipmentSchedulingEdit,
+} from "@/api/yunyin/yunying";
+
 import {
   ProcessInspectionRecordsItemAdd,
   AdditionalInspectionRecordAdd,
@@ -2076,6 +2080,7 @@ const FacilityProduction = async () => {
 		formData.value.班组Id=response.data.班组Id
 		formData.value.machine=JTMC
 		formData.value.状态=response.data.状态
+    formData.value.定额代号=response.data.定额代号
 		BZMC.value=response.data.班组编号
 	       // 填充sczl_bh和sczl_name字段
 		   let sczl_bhkey=''
@@ -2147,6 +2152,7 @@ const FacilityWorklist = async () => {
 }
 //检验记录
 const InspectionRecord = async () => {
+  JYData=[]
   const response = await inspectionRecord({machine:JTMC,Gd_gdbh:formData.value.工单编号,team:BZMC.value});
   if(response.code==0){
 	 // 提取 inspectiontime 作为列名
@@ -2190,6 +2196,12 @@ const FacilityDetail = async () => {
   formData.value.production_all=0
   const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team:BZMC.value });
   if (response.code === 0) {
+    if(response.data === null){
+      formData.value.上机时间=currentDate+' 08:30:00'
+    }else{
+      formData.value.上机时间=currentDate.split('-')[0]+'-'+response.data[0]['生产时间段'].split('>')[1]+':00'
+    }
+    console.log(formData.value.上机时间)
     CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
 	formData.value.production_now=response.data[0].产量
 	formData.value.production_all=response.data.total.产量
@@ -2205,6 +2217,13 @@ const getygsubmit = (event, inputName) => {
 		   // console.log(variableValue)
 		   GetYg(variableValue,inputName)
 }
+
+const getxunchayg = async (value) => {
+  const response = await getYg({sczl_bh:xunchaData.value.sczl_bh});
+  if (response.code === 0) {
+    xunchaData.value.sczl_name=response.data.ygxm
+  }
+}
 //获取员工信息
 const GetYg = async (value,inputName) => {
   const response = await getYg({sczl_bh:value});
@@ -2493,22 +2512,26 @@ const RemodelGetTab = async() => {
   const response = await remodelGetTab()
   let arr=[]
   if (response.code === 0) {
-	  for(let key in response.data){
-		  if(response.data[key][0]){
-			  let children =[]
-			  for (let i = 0; i < response.data[key].length; i++) {
-				  children.push({label:response.data[key][i],machine:key})
-			  }
-			  arr.push({
-				  label:key,
-				  children:children
-			  })
-			  console.log(response.data[key].length)
-		  }else{
-			 arr.push({label:key})
-		  }
-	  }
-	  huanxingtreeData.value=arr
+	  // for(let key in response.data){
+		//   if(response.data[key][0]){
+		// 	  let children =[]
+		// 	  for (let i = 0; i < response.data[key].length; i++) {
+		// 		  children.push({label:response.data[key][i],machine:key})
+		// 	  }
+		// 	  arr.push({
+		// 		  label:key,
+		// 		  children:children
+		// 	  })
+		// 	  console.log(response.data[key].length)
+		//   }else{
+		// 	 arr.push({label:key})
+		//   }
+	  // }
+	  // huanxingtreeData.value=arr
+    huanxingtreeData.value=[{label:JTMC,children:response.data[JTMC].map(item=>({
+        label:item,
+        machine:JTMC
+      }))}]
   }
 }
 //设置机台状态
@@ -2690,35 +2713,13 @@ const FieldInspectionRecord = async () => {
   }
 }
 //获取机台编号
-const GetMachineMac = async () => {
-	var xmlhttp = null;
-	var res;
-	if (window.XMLHttpRequest) {
-		xmlhttp = new XMLHttpRequest();
-	} else if (window.ActiveXObject) {
-		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
-	}
-	// 2. 设置回调函数
-	xmlhttp.onreadystatechange = function() {
-		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
-			res = eval('('+xmlhttp.response+')');
-			let result = ''
-			  for (let i = 0; i < res.macAddress.length; i++) {
-				if (i % 2 === 0 && i !== 0) {
-				  result += '-' // 根据实际需求修改分隔符
-				}
-				result += res.macAddress[i]
-			  }
-		}
-	}
-	// 3. 打开一个连接http://10.10.4.42/
-	xmlhttp.open("get", "http://127.0.0.1:8090/init")
-	// 5. 发送
-	xmlhttp.send();
+const GetMachineMac = async (addr) => {
+  console.log(addr);
+  const response = await getMachineMac({ addr: addr });
   // const response = await getMachineMac({ addr: '68-ED-A4-26-5D-5E' });
   // const response = await getMachineMac({ addr: '68-ED-A4-26-5D-90' });
   // const response = await getMachineMac({ addr: '68-ED-A4-26-5E-50' });
-  const response = await getMachineMac({ addr: '68-ED-A4-26-60-CC' });
+  // const response = await getMachineMac({ addr: '68-ED-A4-26-60-CC' });
   // const response = await getMachineMac({ addr: '68-ED-A4-26-5F-8E' });
   // const response = await getMachineMac({ addr: '68-ED-A4-26-60-C8' });
   // const response = await getMachineMac({ addr: '40-62-31-21-4E-15' });
@@ -2726,7 +2727,6 @@ const GetMachineMac = async () => {
   // const response = await getMachineMac({ addr: '68-ED-A4-26-60-E5' });
   // const response = await getMachineMac({ addr: '68-ED-A4-26-5E-4E' });
   // const response = await getMachineMac({ addr: '68-ED-A4-26-60-D1' });
-  console.log(response);
   if (response.code === 0) {
     // 将接口返回的数据添加到树型结构中
     let newNode = {
@@ -2745,7 +2745,34 @@ const GetMachineMac = async () => {
     FacilityProduction();
   }
 }
-GetMachineMac()
+const GetAddr =  () => {
+  var xmlhttp = null;
+  var res;
+  if (window.XMLHttpRequest) {
+    xmlhttp = new XMLHttpRequest();
+  } else if (window.ActiveXObject) {
+    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
+  }
+  // 2. 设置回调函数
+  xmlhttp.onreadystatechange = function() {
+    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
+      res = eval('('+xmlhttp.response+')');
+      let result = ''
+      for (let i = 0; i < res.macAddress.length; i++) {
+        if (i % 2 === 0 && i !== 0) {
+          result += '-' // 根据实际需求修改分隔符
+        }
+        result += res.macAddress[i]
+      }
+      GetMachineMac(result)
+    }
+  }
+  // 3. 打开一个连接http://10.10.4.42/
+  xmlhttp.open("get", "http://127.0.0.1:8090/init")
+  // 5. 发送
+  xmlhttp.send();
+}
+GetAddr()
 //提交巡查记录
 const SubmitPatrolRecord = async () => {
 	console.log(JTMC.split("#")[0])
@@ -2775,8 +2802,21 @@ function onchanliang() {
 	 console.log(JTMC.split("#")[0]); // 通过value属性获取ref对象的值,然后再调用split方法
 	ReportInfo()
 }
+
+// 获取当前日期
+const today = new Date();
+const year = today.getFullYear();
+const month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从 0 开始,需要补零
+const day = String(today.getDate()).padStart(2, '0');
+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 currentDate = `${year}-${month}-${day}`;
+const currentTime = `${year}-${month}-${day} ${hours}:${minutes}`;
+const currenttime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 //日产量详情获取
 const ReportInfo = async () => {
+
   const response = await reportInfo({ machine: JTMC.split("#")[0] });
   if (response.code === 0) {
     const { order_info, class: classInfo } = response.data;
@@ -2788,6 +2828,11 @@ const ReportInfo = async () => {
       product_name: order_info.product_name,
       yj_name: order_info.yj_name,
       gy_name: order_info.gy_name,
+      日期:currentDate,
+      下机时间:currenttime,
+      上机时间:formData.value.上机时间,
+      装版总时长:0,
+      定额代号:formData.value.定额代号,
       sczl_jtbh: classInfo.sczl_jtbh.split('#')[0],
       sczl_bzdh: classInfo.sczl_bzdh,
       sys_id: classInfo.sys_id,
@@ -3121,10 +3166,10 @@ const FacilityTeam = async (value) => {
     const updatedData = response.data.map(item => {
       return { ...item, JTMC: value }; // 添加 JTMC 属性
     });
-
+    FPData.splice(0, FPData.length, ...updatedData)
     // 将更新后的数据添加到 bzData 数组
     bzData.push(...updatedData);
-	FPData.push(...updatedData)
+	// FPData.push(...updatedData)
 	console.log(FPData)
   }
 };
@@ -3487,15 +3532,31 @@ const setMachineTeams = async(row) => {
 			team_id:formData.value.班组Id
 			})
     if (res.code === 0) {
-		FacilityProduction()
-
-		ElMessage({
+      EquipmentSchedulingEdits(row)
+      ElMessage({
 		        type: 'success',
 		        message: '成功'
 		    })
     }
 }
 
+const EquipmentSchedulingEdits = async(row) => {
+  console.log(row)
+  const res = await EquipmentSchedulingEdit([{
+    capacity:row.工序产能,
+    ProductionHours:row.计划工时,
+    AuxiliaryHours:row.装版时数,
+    shift:row.班组,
+    remark:row.排产备注,
+    start:row.最早开工时间,
+    projectTime:currentTime,
+    UniqId:row.UniqId
+  }])
+  if (res.code === 0) {
+    FacilityProduction()
+  }
+}
+
 // 删除行
 const deleteCompanyFunc = async (row) => {
     const res = await deleteCompany({ ID: row.ID })
@@ -3637,13 +3698,16 @@ const enterDialog = async () => {
 }
 
 const sbzyqdplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
-  // console.log(formData.value['工单编号'])
-  // console.log(row['工单编号|质量信息'].split('|')[0])
   if(formData.value['工单编号'] === row['工单编号|质量信息'].split('|')[0]){
-    console.log(123)
     return 'back-color-row';
   }
 }
+const bzryplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
+  if(formData.value['班组Id'] === row.ID){
+    return 'back-color-row';
+  }
+}
+
 </script>
 
 <style scoped>

+ 22 - 53
src/view/yunyin/chanpinziliao/chanpinziliao.vue

@@ -1288,19 +1288,22 @@
             </el-form>
           </el-dialog>
 
-          <!--    工序损耗列表-->
-              <el-dialog v-model="gxshdisplay" :before-close="()=> gxshdisplay = false" style="width: 800px;" :title="'工序损耗'" destroy-on-close>
-                <el-tree
-                    :data="gxshList"
-                    :render-after-expand="false"
-                    @node-click="gxshselectHandle"
-                    :props="{children: 'children',label: 'label', value: 'value'}"
-                    style="border: 1px solid #ececec; padding: 10px;height: 400px;overflow: auto;"
-                    node-key="value"
-                    :default-expanded-keys="add_gyformData.Gy0_site"
-                >
-                </el-tree>
-              </el-dialog>
+          <!-- 新增查询标准损耗 -->
+          <el-dialog v-model="searchSHModel" :before-close="() => searchSHModel = false">
+            <el-form>
+              <div>
+                <!-- <el-form-item label="关键字:"  class="mab" prop="keyOrder">
+                  <el-space>
+                    <el-input v-model="gymc_keyword" style="width: 100%;"/>
+                    <el-button @click="searchHandle(gymc_keyword)">刷新</el-button>
+                  </el-space>
+                </el-form-item> -->
+                <div style="border:1px solid #eee; width:100%; height: 400px; overflow-y: auto">
+                  <el-tree :data="getSHListdata" :props="defaultProps" @node-click="selectSHNode" />
+                </div>
+              </div>
+            </el-form>
+          </el-dialog>
 
           <!-- 修改印版资料 弹窗 -->
           <el-dialog v-model="ybdialogFormVisible" :before-close="ybcloseDialog" :title="'修改印版资料'" destroy-on-close>
@@ -1528,7 +1531,6 @@ import {
   getProductYbMaterialList,
   getProductYbInfo,
   addProductYbInfo,
-  WastageList,
 } from '@/api/yunyin/yunying'
 defineOptions({   name: 'Company'})
 
@@ -2761,38 +2763,7 @@ const add_yinjian_ent = (event,id1,id2,id3) => {
 const addgydialogFormVisible = ref(false)
 const searchCJModel = ref(false)
 const searchSHModel = ref(false)
-const gxshdisplay = ref(false)
-//工序损耗列表
-const gxshList = ref([])
-const getGxshList = async ()=>{	
-  const WastageList_data = await WastageList({search:add_gyformData.Gy0_site })
-  gxshList.value = [{
-    label: add_gyformData.Gy0_site,
-    value: add_gyformData.Gy0_site,
-    children: []
-  }]
-  if (WastageList_data.data.length === 0) {add_gyformData.标准损耗 = ""
-  add_gyformData.标准损耗2 = ""}
-  if (WastageList_data.data.length > 1) {
-    gxshList.value[0].children = WastageList_data.data.map(item => {
-      return { label: `${item.编号} - ${item.名称}`, label2: item.名称, UniqId: item.UniqId, value: item.编号 }
-    })
-  } else {
-	console.log(WastageList_data.data[0].编号)
-    add_gyformData.标准损耗 = WastageList_data.data[0].编号;
-    add_gyformData.标准损耗2= WastageList_data.data[0].名称;
-  }
-  if(gxshList.value[0].children.length > 1){
-	  gxshdisplay.value = true
-  }
-  
-}
-//点击工序损耗列表数据
-const gxshselectHandle = async (node)=>{
-  add_gyformData.标准损耗 = node.value
-  add_gyformData.标准损耗2 = node.label2
-  gxshdisplay.value = false
-}
+
 const addcpgy_onclick = () => {
 	addgydialogFormVisible.value=true
   // add_yjdialogFormVisible.value = true
@@ -2872,17 +2843,15 @@ const selectCJNode = (nodeData) => {
 }
 const getSHListdata = ref([]);
 const getSH = (code) => {
-  // _getSH()
-  getGxshList()
+  _getSH()
 }
 const _getSH = async () => {
-  const response = await WastageList({search:add_gyformData.Gy0_site});
+  const response = await getProcessLoss({code:add_gyformData.标准损耗});
   // getSHListdata.value = processData(response.data);
   // searchSHModel.value = true
-  // console.log(response.data[0].sys_mc)
-  // add_gyformData.标准损耗2=response.data[0].sys_mc
-  // console.log(getSHListdata.value);
-  console.log(response)
+  console.log(response.data[0].sys_mc)
+  add_gyformData.标准损耗2=response.data[0].sys_mc
+  console.log(getSHListdata.value);
 };
 // const processData = (data) => {
 //   const map = {};

+ 5 - 3
src/view/yunyin/shengchanguanli/components/addGongYi.vue

@@ -242,9 +242,11 @@ const getGxshList = async ()=>{
 }
 //点击工序损耗列表数据
 const gxshselectHandle = async (node)=>{
-  form['shdh'] = node.value
-  form['工序损耗名称'] = node.label2
-  gxshdisplay.value = false
+  if(node.label2){
+    form['shdh'] = node.value
+    form['工序损耗名称'] = node.label2
+    gxshdisplay.value = false
+  }
 }
 const selectHandle = async (node)=>{
   if (node.children && node.children.length> 0) return

+ 6 - 1
src/view/yunyin/shengchanguanli/components/print.vue

@@ -2604,6 +2604,7 @@ const jsondata = {
 }
 hiprint.init()
 const hiprintTemplate = new hiprint.PrintTemplate({ template: jsondata })
+const _gdlx = ref('')
 const cp_print_handleConfirm = async () => {
   let params = {};
   //2310707
@@ -2616,6 +2617,8 @@ const cp_print_handleConfirm = async () => {
   //调用打印接口【打印作业通知单】
   const print_PrintJobOrder = await PrintJobOrder(params);
   console.log(print_PrintJobOrder)
+  _gdlx.value =  '★' +print_PrintJobOrder.data['工单类型']
+
   if(print_PrintJobOrder.data === null){
     ElMessage({type: 'error',message: print_PrintJobOrder.msg})
   }
@@ -2629,7 +2632,9 @@ const cp_print_handleConfirm = async () => {
   const seconds = String(today.getSeconds()).padStart(2, '0');
   const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
   const printdata  = {
-    "minong": "https://shangbiaopic.11467.com/13/85/13855845.jpg",
+    // "minong": "https://shangbiaopic.11467.com/13/85/13855845.jpg",
+    "minong": "https://www.zjminong.com/static/web/images/logo.png?v=v2",
+    "ztlx":_gdlx.value,
     "printcode":print_PrintJobOrder.data['生产批次号'],
     "dysj":currentDate,
     "scpch":print_PrintJobOrder.data['生产批次号'],

+ 12 - 4
src/view/yunyin/shengchanguanli/gongdanshengchan.vue

@@ -140,7 +140,7 @@
                 </el-form-item>
 
                 <el-form-item label="" prop="" style="margin-left: 25px;">
-                  <el-button type="" icon="edit" disabled @click="oneditpcClick">更新排程</el-button>
+                  <el-button type="" icon="edit"  @click="oneditpcClick">更新排程</el-button>
                 </el-form-item>
               </div>
 
@@ -477,6 +477,7 @@ import {
   getOrderProcessLeft,
   getOrderProcessRight,
   gdzl_MachineList,
+  EquipmentSchedulingEdit,
   MachineTeamEdit
 } from "@/api/yunyin/yunying";
 
@@ -1358,6 +1359,7 @@ const pd_gdprintonClick = () => {
 //车间设备排程【按钮】
 const oncjsbpcClick = () => {
   cjsbpcformData['sbdh'] = _machine.value;
+  paichengData.value = [];
   _EquipmentSchedulingdata();
   _ScheduleSelectiondata();
   cjsbpclist.value = true;
@@ -1420,14 +1422,20 @@ const oneditpcClick = async () => {
       AuxiliaryHours: item.辅助工时,
       shift: item.班次安排,
       remark: item.排单备注,
-      start: item.计划开工时间,
-      projectTime: item.计划工时间,
+      start: item.最早开工时间,
+      projectTime: item.计划工时间,
       UniqId: item.UniqId
     };
   });
   console.log(formattedData)
-  // const EquipmentSchedulingEdit_edit = await EquipmentSchedulingEdit(formattedData);
+  const EquipmentSchedulingEdit_edit = await EquipmentSchedulingEdit(formattedData);
   // console.log(EquipmentSchedulingEdit_edit)
+  if (EquipmentSchedulingEdit_edit.code === 0) {
+    ElMessage({ type: 'success', message: '更新成功' });
+    cjsbpclist.value = false;
+  } else {
+    ElMessage({ type: 'error', message: '更新失败' });
+  }
   // cjsbpclist.value = true;
 };
 //车间设备制程【退出】

+ 4 - 38
src/view/yunyin/shengchanguanli/gongdanziliao.vue

@@ -2037,13 +2037,11 @@ const addgdyj_onclick = () => {
     ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能' })
   }else{
     gdyj_clearFormData();
-    // console.log(yjzuidahaoma.value)
     add_gdyjdialogFormVisible.value = true
   }
 }
 //印件新增确定
 const add_gdyjenterDialog =  async  () => {
-  // console.log(add_yjzlformdata)
   if(add_yjzlformdata['yjno'] === ''){
     ElMessage({type: 'warning',message: '印件号不能为空'})
     return false;
@@ -2072,7 +2070,6 @@ const add_gdyjenterDialog =  async  () => {
     yj_zzmc2: add_yjzlformdata['zzmc2'],
     yj_zzmc3: add_yjzlformdata['zzmc3'],
     yj_zzmc4: add_yjzlformdata['zzmc4'],
-
     yj_tlgg: add_yjzlformdata['tlgg'],
     yj_klgg: add_yjzlformdata['klgg'],
     Yj_核算规格: add_yjzlformdata['hsgg'],
@@ -2082,11 +2079,8 @@ const add_gdyjenterDialog =  async  () => {
     yj_ls: add_yjzlformdata['ls'],
     yj_desc: add_yjzlformdata['desc'],
     Sys_id  : "[1031/谭鸿忠]",
-    // 万小张: add_yjzlformdata['万小张'],
   };
-  // console.log(formattedData)
   const PrintDetailAdd_add = await PrintDetailAdd(formattedData);
-  // console.log(PrintDetailAdd_add)
   if(PrintDetailAdd_add.code === 0) {
     ElMessage({type: 'success',message: '添加成功'})
     add_gdyjdialogFormVisible.value = false
@@ -2108,7 +2102,6 @@ const handleTreeData = (treeData) => {
         label:`${item.物料代码} ${item.物料名称}`,
         物料代码:item.物料代码,
         物料名称:item.物料名称
-
       }))
     }))
   }))
@@ -2117,7 +2110,7 @@ const handleTreeData = (treeData) => {
 
 //印件新增【纸张】树状图
 const handleTreeDatas = (treeData) => {
-  console.log(treeData)
+  // console.log(treeData)
   const data = Object.keys(treeData).map((key)=>({
     label:key,
     children: Object.keys(treeData[key]).map((keys)=>({
@@ -2131,7 +2124,6 @@ const handleTreeDatas = (treeData) => {
           物料名称:item.物料名称
         }))
       }))
-
     }))
   }))
   return data
@@ -2219,23 +2211,6 @@ const addgdgy_onclick = () => {
     addGongYiRef.value.open(_Gd_gdbh.value, gongxu)
   }
 }
-// //新增工艺资料确定
-// const add_gdgyenterDialog = async () => {
-//   console.log(1)
-//   // const formattedData = {
-//   //   Yj_Gdbh: _Gd_gdbh.value,
-//   //   yj_Yjno: add_gdgyformData['yjno'],
-//   //   yj_Yjdh: add_gdgyformData['yjdh'],
-//   // };
-//   // console.log(formattedData)
-//   // const ProcessDetailAdd_add = await ProcessDetailAdd(formattedData);
-//   // console.log(ProcessDetailAdd_add)
-//   // add_gdgydialogFormVisible.value = false
-// }
-//新增工艺资料取消
-// const add_gdgycloseDialog = () => {
-//   add_gdgydialogFormVisible.value = false
-// }
 
 
 // =========== 查改U8工单 ===========
@@ -2318,8 +2293,6 @@ const oncgugdcloneclick = () => {
   cgugdlist.value = false;
 };
 
-
-
 // =========== 工艺流程调整 ===========
 const gylctztableColumns = ref(
     [
@@ -2369,10 +2342,7 @@ const gylctztableData = ref([]);
 const oneditgylctzclick = () => {
   if(_Gd_gdbh.value == null){
     gylctzlist.value = false;
-    ElMessage({
-      type: 'warning',
-      message: '请选择具体的工单后,再操作此功能'
-    })
+    ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
   }else{
     gylctzformData['gdbh'] = _Gd_gdbh.value;
     _ProcessFlow();
@@ -2479,7 +2449,6 @@ const _ReferenceWorkOrder = async ()=>{
       const schemes = ReferenceWorkOrder_data.data || [];
       // 直接将数组作为工艺方案数组
       gdzlfjxxformData.cpgyfans = schemes;
-
       if (gdzlfjxxformData.cpgyfans.length > 0) {
         gdzlfjxxformData.cpgyfan = [gdzlfjxxformData.cpgyfans[0]];
       }
@@ -2529,16 +2498,13 @@ const gxclhsformData = reactive({
 const oneditgxclhsclick = () => {
   if(_Gd_gdbh.value == null){
     gxclhslist.value = false;
-    ElMessage({
-      type: 'warning',
-      message: '请选择具体的工单后,再操作此功能'
-    })
+    ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
   }else{
     gxclhsformData['gdbh'] = _Gd_gdbh.value;
     gxclhslist.value = true;
   }
 };
-//工序产量核算【确定】
+//工序产量核算【确定】(未完成)
 const gxclhshandleConfirm = async () => {
   console.log(gxclhsformData['gdbh'])
   // const  = await ({:gxclhsformData['gdbh']});