zck 1 year ago
parent
commit
f42a5e02bd

+ 57 - 46
src/view/performance/chafengbaogong.vue

@@ -176,7 +176,7 @@ export default {
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {hiprint} from "vue-plugin-hiprint";
 import {ref, reactive,nextTick,watch, setBlockTracking } from 'vue'
-import {getSpotList,search,getMachineMac} from '@/api/mes/job'
+import {getSpotList,search,getMachineMac,getTab} from '@/api/mes/job'
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
 defineOptions({name: 'Company'})
@@ -253,7 +253,7 @@ const slformdata = reactive({
 });
 
 //点击【查询】按钮
-const add_searchInfo = ref('DC2408001-1')
+const add_searchInfo = ref('')
 const add_tableData = reactive([]);
 //全局获取颜色款式款号
 const _yskskh= ref('')
@@ -329,6 +329,7 @@ const add_Dialog = async ()=>{
   if(add_searchInfo.value === ''){
     ElMessage({type: 'warning',message: '请勾选具体的出库订单后,再操作此功能'})
   }else{
+
 	let cmArray = [cmformdata.cm1, cmformdata.cm2,cmformdata.cm3,cmformdata.cm4,cmformdata.cm5,cmformdata.cm6,cmformdata.cm7,cmformdata.cm8,cmformdata.cm9,cmformdata.cm10,];
 	let zdscArray = [zdscformdata.zdsc1, zdscformdata.zdsc2,zdscformdata.zdsc3,zdscformdata.zdsc4,zdscformdata.zdsc5,zdscformdata.zdsc6,zdscformdata.zdsc7,zdscformdata.zdsc8,zdscformdata.zdsc9,zdscformdata.zdsc10,]; 
 	let slArray = [slformdata.sl1, slformdata.sl2,slformdata.sl3,slformdata.sl4,slformdata.sl5,slformdata.sl6,slformdata.sl7,slformdata.sl8,slformdata.sl9,slformdata.sl10,]; 
@@ -354,55 +355,65 @@ const add_Dialog = async ()=>{
 			params.code = '车缝';
 			params.sczl_bh = add_formData['组别'];
 			paramsList.push(params); 
-	
 		}
+
 	} 
 	console.log(paramsList)
-	if (paramsList.length > 0) {  
-		const cf_gettab = await search(paramsList);
-		console.log(cf_gettab)
-		if (cf_gettab.code === 0) {  
-			ElMessage({type: 'success', message: '报工成功'});  
-			add_searchInfo.value = '';  
-		} else {  
-			ElMessage({type: 'error', message: '报工失败'});  
+	
+	if (paramsList.length === 0) {  
+		ElMessage({ type: 'info', message: '请填写报告尺码数量' });  
+		return; // 如果没有有效的参数,则提前返回  
+  	}  
+  
+  	let allSuccess = true;  
+	for (let i = 0; i < paramsList.length; i++) {  
+		const cf_gettab = await search(paramsList[i]);  
+		if (cf_gettab.code !== 0) {  
+		ElMessage({ type: 'error', message: '报工失败' });  
+		allSuccess = false;  
+		break; // 如果某个报工失败,则中断循环  
 		}  
-	} else {  
-		ElMessage({type: 'info', message: '请填写报告尺码数量'});  
-	}
-  }
+	}  
+	if (allSuccess) {  
+		const lsjltable = await getTab({order_id:add_searchInfo.value,sczl_jtbh:add_formData['机台号']}); 
+		console.log(lsjltable)
+		add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
+		add_searchInfo.value = ''; // 清除选择  
+		ElMessage({ type: 'success', message: '报工成功' });  
+	}  
+ }
 }
-	//  AttendanceVisible.value = false
-  // 新增取消
-  const add_closeDialog = () => {
-	   AttendanceVisible.value = false
-  };
-  //是否订单尾包选择是否按钮
-  const activeButton = ref(null)
-  const DialogVisible = ref(false)
-  add_formData['是否订单尾包']='0'
-  const setActiveButton= (button) => {
-	  activeButton.value = button; 
-	  if (button === 'yes') {  
-		  add_formData['是否订单尾包'] = '1';
-		  DialogVisible.value = true
-		} else if (button === 'no') {  
-		  add_formData['是否订单尾包'] = '0';
-		  DialogVisible.value = false 
-		} 
-  };
- 
-  // 确定
-  const handleConfirm = () => {
-	  add_formData['是否订单尾包'] = '1'
-	  DialogVisible.value = false
-  };
-  // 取消
-  const confirmDialogVisible = () => {
-	  add_formData['是否订单尾包'] = '0'
-	  DialogVisible.value = false
-  };
- 
+
+// 新增取消
+const add_closeDialog = () => {
+	AttendanceVisible.value = false
+};
+//是否订单尾包选择是否按钮
+const activeButton = ref(null)
+const DialogVisible = ref(false)
+add_formData['是否订单尾包']='0'
+const setActiveButton= (button) => {
+	activeButton.value = button; 
+	if (button === 'yes') {  
+		add_formData['是否订单尾包'] = '1';
+		DialogVisible.value = true
+	} else if (button === 'no') {  
+		add_formData['是否订单尾包'] = '0';
+		DialogVisible.value = false 
+	} 
+};
+
+// 确定
+const handleConfirm = () => {
+	add_formData['是否订单尾包'] = '1'
+	DialogVisible.value = false
+};
+// 取消
+const confirmDialogVisible = () => {
+	add_formData['是否订单尾包'] = '0'
+	DialogVisible.value = false
+};
+
   
   
   // =========== 新增打印小票 ===========

+ 4 - 3
src/view/performance/chukubaogong.vue

@@ -10,15 +10,13 @@
 			  				  style="width: 270px;margin: 5px;height: 50px;">
 			  				  </el-input>
 			      <el-button type="primary" icon="search" @click="add_onSubmit" style="margin: 5px;height: 50px;">查询</el-button>
-            <!-- <el-date-picker v-model="add_riqiformData['日期']" type="date" style="width: 150px;height: 40px;"/> -->
-            <el-button type="primary" @click="add_Dialog" style="margin: 5px;height: 50px;">确认出库</el-button>
         </div>
       </layout-header>
       <layout>
         <layout-content >
         <el-main>
           <div class="gva-table-box">
-           <el-table ref="multipleTable" style="width: 100%;height: 65vh" tooltip-effect="dark"
+           <el-table ref="multipleTable" style="width: 100%;height: 60vh" tooltip-effect="dark"
                       :row-style="{ height: '20px' }"  :header-cell-style="{ padding: '0px' }"
                       :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
                       :data="add_tableData"  border row-key="ID"
@@ -36,6 +34,9 @@
               <el-table-column  sortable  align="left" label="面料出库人" prop="面料出库人" width="150" />
               <el-table-column  sortable  align="left" label="日期" prop="日期" width="160" /> -->
             </el-table>
+            <div class="dialog-footer" style="text-align: left;margin-right: 60px;">
+						<el-button type="primary" @click="add_Dialog" 	 style="width: 110px;height: 60px;font-size: 20px;">确认</el-button>
+					</div>
           </div>
         </el-main>
       </layout-content>

+ 14 - 4
src/view/performance/datangbaogong.vue

@@ -57,7 +57,7 @@
 					<div @contextmenu.prevent>
 						 <el-table
 							 ref="multipleTableRef"
-							 style="width: 100%;height: 37vh"
+							 style="width: 100%;height: 53vh"
 							 tooltip-effect="dark"
 							 :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
 							 :cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
@@ -138,7 +138,7 @@ export default {
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {hiprint} from "vue-plugin-hiprint";
 import {ref, reactive,nextTick,watch, setBlockTracking } from 'vue'
-import {getSpotList,search,getMachineMac} from '@/api/mes/job'
+import {getSpotList,search,getMachineMac,getTab} from '@/api/mes/job'
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
 defineOptions({name: 'Company'})
@@ -173,7 +173,7 @@ getMachineMacdata();
 
 
 //点击【查询】按钮DC2408001-1,01,8,10,0
-const add_searchInfo = ref('DC2408001-1,DT01,10,20,0')
+const add_searchInfo = ref('')
 const add_tableData = reactive([]);
 const activeButtonValue = ref('')
 const UniqId = ref('')
@@ -232,8 +232,18 @@ const add_Dialog = async ()=>{
 				// 注意:如果search函数不支持数组,并且需要单独调用每个params,您可能需要使用Promise.all  
 				const cf_gettab = await search({UniqId:UniqId._value,code:'大烫'}); // 调用search函数  
 				if (cf_gettab.code === 0) {  
-					ElMessage({type: 'success', message: '报工成功'});  
+					const firstPart = add_searchInfo.value.split(',')[0];  
+					const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
+					console.log(lsjltable)
+					add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
 					add_searchInfo.value = '';  
+					setTimeout(() => {
+						const inputElement = document.getElementById('searchInput');
+						if (inputElement) {
+							inputElement.focus();		
+						}
+					}, 100); // 延迟100毫秒
+					ElMessage({type: 'success', message: '报工成功'});  
 				} else {  
 					ElMessage({type: 'error', message: '报工失败'});  
 				}  

+ 15 - 5
src/view/performance/houdaoshougong.vue

@@ -105,7 +105,7 @@
 					<div @contextmenu.prevent>
 						 <el-table
 							 ref="multipleTableRef"
-							 style="width: 100%;height: 37vh"
+							 style="width: 100%;height: 53vh"
 							 tooltip-effect="dark"
 							 :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
 							 :cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
@@ -186,7 +186,7 @@ export default {
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {hiprint} from "vue-plugin-hiprint";
 import {ref, reactive,nextTick,watch, setBlockTracking } from 'vue'
-import {getSpotList,search,getMachineMac} from '@/api/mes/job'
+import {getSpotList,search,getMachineMac,getTab} from '@/api/mes/job'
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
 defineOptions({name: 'Company'})
@@ -221,7 +221,7 @@ getMachineMacdata();
 
 
 //点击【查询】按钮DC2408001-1,01,8,10,0
-const add_searchInfo = ref('DC2408001-1,HD01,32,12,0')
+const add_searchInfo = ref('')
 const add_tableData = reactive([]);
 const activeButtonValue = ref('')
 const UniqId = ref('')
@@ -279,9 +279,19 @@ const add_Dialog = async ()=>{
 				// 假设search函数可以处理一个包含多个参数的数组  
 				// 注意:如果search函数不支持数组,并且需要单独调用每个params,您可能需要使用Promise.all  
 				const cf_gettab = await search({UniqId:UniqId._value,code:'后道'}); // 调用search函数  
-				if (cf_gettab.code === 0) {  
-					ElMessage({type: 'success', message: '报工成功'});  
+				if (cf_gettab.code === 0) {
+					const firstPart = add_searchInfo.value.split(',')[0];  
+					const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
+					console.log(lsjltable)
+					add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
 					add_searchInfo.value = '';  
+					setTimeout(() => {
+						const inputElement = document.getElementById('searchInput');
+						if (inputElement) {
+							inputElement.focus();		
+						}
+					}, 100); // 延迟100毫秒
+					ElMessage({type: 'success', message: '报工成功'});  
 				} else {  
 					ElMessage({type: 'error', message: '报工失败'});  
 				}  

+ 15 - 5
src/view/performance/zongjianbaogong.vue

@@ -105,7 +105,7 @@
 					<div @contextmenu.prevent>
 						 <el-table
 							 ref="multipleTableRef"
-							 style="width: 100%;height: 37vh"
+							 style="width: 100%;height: 53vh"
 							 tooltip-effect="dark"
 							 :row-style="{ height: '50px' }" :header-cell-style="{ padding: '5px', fontSize: '20px' }"
 							 :cell-style="{ padding: '10px', fontSize: '20px' }" :header-row-style="{ height: '20px' }"
@@ -186,7 +186,7 @@ export default {
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {hiprint} from "vue-plugin-hiprint";
 import {ref, reactive,nextTick,watch, setBlockTracking } from 'vue'
-import {getSpotList,search,getMachineMac} from '@/api/mes/job'
+import {getSpotList,search,getMachineMac,getTab} from '@/api/mes/job'
 import {ElMessage} from "element-plus";
 import { get } from 'scriptjs';
 defineOptions({name: 'Company'})
@@ -221,7 +221,7 @@ getMachineMacdata();
 
 
 //点击【查询】按钮DC2408001-1,01,8,10,0
-const add_searchInfo = ref('DC2408001-1,HD01,32,12,0')
+const add_searchInfo = ref('')
 const add_tableData = reactive([]);
 const activeButtonValue = ref('')
 const UniqId = ref('')
@@ -278,10 +278,20 @@ const add_Dialog = async ()=>{
 			if (add_formData.数量 && add_formData.数量 !== '') {  
 				// 假设search函数可以处理一个包含多个参数的数组  
 				// 注意:如果search函数不支持数组,并且需要单独调用每个params,您可能需要使用Promise.all  
-				const cf_gettab = await search({UniqId:UniqId._value,code:'后道'}); // 调用search函数  
+				const cf_gettab = await search({UniqId:UniqId._value,code:'总检'}); // 调用search函数  
 				if (cf_gettab.code === 0) {  
-					ElMessage({type: 'success', message: '报工成功'});  
+					const firstPart = add_searchInfo.value.split(',')[0];  
+					const lsjltable = await getTab({order_id:firstPart,sczl_jtbh:add_formData['机台号']}); 
+					console.log(lsjltable)
+					add_tableData.splice(0,add_tableData.length,...lsjltable.data.records);
 					add_searchInfo.value = '';  
+					setTimeout(() => {
+						const inputElement = document.getElementById('searchInput');
+						if (inputElement) {
+							inputElement.focus();		
+						}
+					}, 100); // 延迟100毫秒
+					ElMessage({type: 'success', message: '报工成功'});  
 				} else {  
 					ElMessage({type: 'error', message: '报工失败'});  
 				}