Browse Source

车间完工和机台日报表新增优化

zck 1 year ago
parent
commit
e9edbe119e
2 changed files with 55 additions and 12 deletions
  1. 1 1
      src/view/performance/Dayreports.vue
  2. 54 11
      src/view/performance/chejianbaogong.vue

+ 1 - 1
src/view/performance/Dayreports.vue

@@ -3137,7 +3137,7 @@ const updateDetailData = async () => {
     const response = await productionadd(restoredData);
     // ADD.value='1'
     // console.log(ADD.value)
-    ADD.value = "0";
+    // ADD.value = "0";
     if (response.code == 0) {
       ElMessage({
         type: "success",

+ 54 - 11
src/view/performance/chejianbaogong.vue

@@ -4,7 +4,6 @@
 		<div style="height: 100px;">
 			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="onBZ" >班组维护</el-button>
 			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 90px"  @click="onchanliang"  v-if="zdtreeType === true" >日产量上报</el-button>
-			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 60px"  @click="onOver" title="完工按钮" >完工</el-button>
 			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="onzhicheng"  >制程检验</el-button>
 			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="ondianjian"  >设备点检</el-button>
 			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 70px"  @click="onxuncha" >管理巡查</el-button>
@@ -17,6 +16,7 @@
 			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 120px" @click="deldbcl_onclick" :disabled="dbclSelection === ''"   title="当班产量明细" >当班产量明细删除</el-button>
 			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 95px"  @click="pd_lcdlistonClick" >流程单查询</el-button>
 			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 15px;font-weight: bold;width: 165px"  @click="scpconClick" >工单生产批次信息查询</el-button>
+			<el-button type="primary" size="large" class="bt" style="color:white;font-size: 20px;font-weight: bold;width: 70px"  @click="onOver" title="完工按钮" >完工</el-button>
 		</div>
 	</header>
 	
@@ -1478,6 +1478,7 @@
 					<el-col :span="2">
 						<el-select v-model="formData3.sczl_bh11" id="bh11" @change="GetLl('create')">
 							<el-option label="" value="" />
+							<el-option label="自备" value="自备" />
 							<el-option label="李有文" value="李有文" />
 							<el-option label="张杭强" value="张杭强" />
 							<el-option label="朱喜文" value="朱喜文" />
@@ -2182,6 +2183,7 @@
               <el-col :span="2">
 				<el-select v-model="dbformData.sczl_bh11" id="bh11" @change="GetLl('update')">
 					<el-option label="" value="" />
+					<el-option label="自备" value="自备" />
 					<el-option label="李有文" value="李有文" />
 					<el-option label="张杭强" value="张杭强" />
 					<el-option label="朱喜文" value="朱喜文" />
@@ -2315,6 +2317,23 @@
 		    </el-table>
 		</el-dialog>
 
+		<el-dialog
+      v-model="wgVisible"
+      destroy-on-close
+	  style="margin-top: 325px;"
+	  
+	  center width="400px"
+      :append-to-body="true"
+      >
+
+      <span style="margin-left: 120px;font-size: 20px;font-weight: bold;">确认完工吗?</span> <!-- 添加确认提示 -->
+      <br>
+      <span slot="footer" class="dialog-footer">
+        <el-button style="margin-left: 70px;margin-top: 30px;" @click="wgVisible = false">取消</el-button>
+        <el-button style="margin-left: 70px;margin-top: 30px; "type="primary" @click="wghandleConfirm">确认</el-button>
+      </span>
+    </el-dialog>
+
 		<Shebeizhuangtai
 		  v-if="dialogSbyxgl"
 		  v-model="dialogSbyxgl"
@@ -2435,7 +2454,7 @@ import {
 // 全量引入格式化工具 请按需保留
 import { getDictFunc, formatDate, formatBoolean, filterDict, ReturnArrImg, onDownloadFile } from '@/utils/format'
 import { ElMessage, ElMessageBox } from 'element-plus'
-import { ref, reactive,watch } from 'vue'
+import { ref, reactive,watch,nextTick } from 'vue'
 import Shebeizhuangtai from '@/view/performance/09-workOrderVerification/componets/shebeizhuangtai.vue'
 import { useUserStore } from '@/pinia/modules/user'
 import PrintPage from '../yunyin/shengchanguanli/components/print.vue'
@@ -2798,7 +2817,8 @@ const chanliangEdits = async() => {
     码包:dbformData.value.码包,
     主电表:dbformData.value.主电表,
     辅电表:dbformData.value.辅电表,
-    sczl_bh98:dbformData.value.sczl_bh11,
+    // sczl_bh98:dbformData.value.sczl_bh11,
+	sczl_bh98:dbformData.value.sczl_bh11 === '自备' ? '' : dbformData.value.sczl_bh11,
     UniqId:dbformData.value.UniqId
   })
   if (response.code === 0) {
@@ -2977,6 +2997,7 @@ const FacilityDetail = async () => {
 //获取拉料人员
 const GetLl = (falg) => {
 	let llyg = {
+			'自备':'自备',
 			'李有文':2024,
 			'张杭强':2023,
 			'朱喜文':2022,
@@ -3402,17 +3423,22 @@ function onDel() {
 }
 //完工按钮
 //完工1
+const wgVisible=ref(false)
 function onOver() {
   // console.log(wangongbh.value)
   // return;
   if(formData.value.工单编号 === '' || formData.value.工单编号 === null){
-    ElMessage({type: 'warning', message: '请选择切换完工工单'})
+    ElMessage({type: 'warning', message: '请选择切换完工工单'})	
     return false;
   }else{
-    SetProcessStatus()
-    FacilityProduction()
+	wgVisible.value=true
   }
 }
+const wghandleConfirm = async () => {
+  SetProcessStatus()
+  FacilityProduction()
+  wgVisible.value=false
+}
 //完工事件
 const SetProcessStatus = async () => {
   console.log(formData.value.工单编号);
@@ -3424,7 +3450,6 @@ const SetProcessStatus = async () => {
 	  FacilityProduction()
   }
 }
-import { nextTick } from 'vue';
 //设备点检
 function ondianjian() {
   getSpotCheckItem(JTMC).then(treeData  => {
@@ -4091,11 +4116,26 @@ const ReportInfo = async () => {
 
 //日产量上报提交按钮
 const chanliangenterDialog = async () => {
-  SubmitDailyProduction()
-  isSubmitting.value = false
+	if(formData3.value.sczl_bh11 === ''){
+		ElMessage({
+		  type: 'error',
+		  message: '请输入拉料人员'
+		})
+	}else{
+		SubmitDailyProduction()
+		isSubmitting.value = false
+	}
+
 }
 const bzchanliangenterDialog = async () => {
-  chanliangEdits()
+	if(dbformData.value.sczl_bh11 === ''){
+		ElMessage({
+		  type: 'error',
+		  message: '请输入拉料人员'
+		})
+	}else{
+		chanliangEdits()
+	}
 }
 //日报表上传
 const SubmitDailyProduction = async () => {
@@ -4115,7 +4155,8 @@ const SubmitDailyProduction = async () => {
     sczl_bh8: formData3.value.sczl_bh8,
     sczl_bh9: formData3.value.sczl_bh9,
     sczl_bh10: formData3.value.sczl_bh10,
-    sczl_bh98:formData3.value.sczl_bh11,
+    // sczl_bh98:formData3.value.sczl_bh11,
+	sczl_bh98:formData3.value.sczl_bh11 === '自备' ? '' : formData3.value.sczl_bh11,
     sczl_rate1: formData3.value.sczl_rate1,
     sczl_rate2: formData3.value.sczl_rate2,
     sczl_rate3: formData3.value.sczl_rate3,
@@ -6001,6 +6042,7 @@ const sbzyqdsatusCellClass = ({row, column, rowIndex, columnIndex}) =>{
     return 'status-plan-usage-low';
   }
 }
+
 </script>
 <style scoped>
 /* 设备作业清单 正在生产中 背景颜色 */
@@ -6165,5 +6207,6 @@ const sbzyqdsatusCellClass = ({row, column, rowIndex, columnIndex}) =>{
 	:deep(.el-tree-node:focus > .el-tree-node__content){
 			background: #ff80ff !important;
 		}
+		/* 假设你知道弹窗内部文本的类名或标签名,这里只是一个示例 */
 
 </style>