zck 1 rok temu
rodzic
commit
2b0b5424ed

+ 15 - 15
src/view/dashboard/dashboardCharts/echartsLine.vue

@@ -14,9 +14,9 @@
 import * as echarts from 'echarts'
 import { nextTick, onMounted, onUnmounted, ref, shallowRef } from 'vue'
 // import 'echarts/theme/macarons'
-// import {
-//  index
-// } from '@/api/jixiaoguanli/jitairibaobiao'
+import {
+ index
+} from '@/api/jixiaoguanli/jitairibaobiao'
 var dataAxis = [
   
 ]
@@ -25,18 +25,18 @@ var dataAxis = [
 // }
 const getindex = async () => {
     //接口调用函数
-    const response  = await index();
-	console.log()
-	response.data.monthData.forEach(item => {
-	dataAxis.push(item.month);
-	data.push(item.count)	
-	});
-	console.log(dataAxis);
-	console.log(data);
-	 // 数据填充后更新图表数据
-	    if (chart.value) {
-	        setOptions();
-	    }
+  //   const response  = await index();
+	// console.log()
+	// response.data.monthData.forEach(item => {
+	// dataAxis.push(item.month);
+	// data.push(item.count)	
+	// });
+	// console.log(dataAxis);
+	// console.log(data);
+	//  // 数据填充后更新图表数据
+	//     if (chart.value) {
+	//         setOptions();
+	//     }
 }
 getindex()
 var data = [

+ 11 - 11
src/view/dashboard/dashboardTable/dashboardTable.vue

@@ -32,18 +32,18 @@ const dataTimeline = ref([])
 
 const getindex = async () => {
    
-	// 模拟接口返回的数据
-	const responseData = await index();
-	console.log(responseData)
+	// // 模拟接口返回的数据
+	// const responseData = await index();
+	// console.log(responseData)
 	
-	// 提取客诉数据
-	const customerData = responseData.data.customer
-	customerData.forEach((item, index) => {
-	  dataTimeline.value.push({
-	    客诉描述: item['客诉描述'],
-	    日期: item['日期']
-	  })
-	})
+	// // 提取客诉数据
+	// const customerData = responseData.data.customer
+	// customerData.forEach((item, index) => {
+	//   dataTimeline.value.push({
+	//     客诉描述: item['客诉描述'],
+	//     日期: item['日期']
+	//   })
+	// })
 }
 getindex()
 

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

@@ -97,12 +97,12 @@ const weatherInfo = useWeatherInfo()
 
 const getindex = async () => {
     //接口调用函数
-    const response  = await index();
-	console.log(response.data.workOrderData["已完工"].toString())
-	labelValue1.value = response.data.workOrderData["已完工"].toString();
-	labelValue2.value = response.data.workOrderData["计划中"].toString();
-	labelValue3.value = response.data.workOrderData["排程中"].toString();
-	labelValue4.value = response.data.workOrderData["制程中"].toString();
+    // const response  = await index();
+	// console.log(response.data.workOrderData["已完工"].toString())
+	// labelValue1.value = response.data.workOrderData["已完工"].toString();
+	// labelValue2.value = response.data.workOrderData["计划中"].toString();
+	// labelValue3.value = response.data.workOrderData["排程中"].toString();
+	// labelValue4.value = response.data.workOrderData["制程中"].toString();
 	
 }
 getindex()

+ 6 - 2
src/view/performance/baozhuangbaogong.vue

@@ -165,7 +165,10 @@ const _code = '包装'
 const Machine = ref('')
 //全局获取UniqId
 const UniqId = ref('')
-
+//全局获取工序
+const _gx = '7'
+//全局获取工序名称
+const _gxmc = '包装'
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
   console.log("本页面获取物理地址",Machine.value)
@@ -336,8 +339,9 @@ const add_Dialog = async ()=>{
 			}, 100); // 延迟100毫秒
 			// searcs.value = '';
 			add_formData['尺码']=''
-			add_formData['数量']=''
+			add_formData['数量']=''
 			add_formData['上报数量']=''
+			add_formData['剩余数量']=''
 		//  searcs.value = 1;
 		 add_searchInfo.value = ''
 			ElMessage({type: 'success', message: '报工成功'});  

+ 17 - 1
src/view/performance/caiqiebaogong.vue

@@ -177,7 +177,7 @@ export default {
 // 全量引入格式化工具 请按需保留
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {ref, reactive} from 'vue';
-import {getSpotList,search,getTab} from '@/api/mes/job'
+import {getSpotList,getInfo,} from '@/api/mes/job';
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
 import {ElMessage} from "element-plus";
@@ -329,6 +329,10 @@ const _UniqId = ref('');
 
 //点击【查询】按钮
 const add_onSubmit = async ()=>{
+  if (!add_searchInfo.value.startsWith('DC')) {  
+    // 如果没有以"DC"开头,则添加前缀  
+    add_searchInfo.value = 'DC' + add_searchInfo.value;  
+  }  
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
@@ -337,6 +341,10 @@ const add_onSubmit = async ()=>{
     const order =add_searchInfo.value;
 	_order.value =add_searchInfo.value;
     const getSpotLists = await getSpotList({order:order,code:'裁切'});
+    if(getSpotLists.data.total === 0){
+      ElMessage({type: 'warning',message: '请先出库此订单再使用裁切报工' })
+      return false
+    }
 	console.log(getSpotLists)
 	add_tableData.value = getSpotLists.data.data;
   _UniqId.value = getSpotLists.data.list[0].UniqId
@@ -376,6 +384,14 @@ const add_onSubmit = async ()=>{
   }
 };
 
+//表格行点击
+const tableRowClick = async (row)=>{
+  add_searchInfo.value = row.子订单编号
+	console.log(row)
+	_order.value = row.子订单编号
+  add_onSubmit();
+}
+
 //复选框选择
 const ckSelection = ref('')
 const handleSelectionChange = (selection, type) => {

+ 4 - 0
src/view/performance/chafengbaogong.vue

@@ -394,6 +394,10 @@ const add_searchInfo = ref('')
 const add_onSubmit = async ()=>{
 	sizeDatas.length = 0;
 	add_tableData.length = 0;
+	if (!add_searchInfo.value.startsWith('DC')) {  
+	// 如果没有以"DC"开头,则添加前缀  
+	add_searchInfo.value = 'DC' + add_searchInfo.value;  
+	}  
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
     const WorkListdata = [];
     add_tableData.splice(0,add_tableData.length,...WorkListdata);

+ 54 - 59
src/view/performance/chukubaogong.vue

@@ -22,8 +22,7 @@
            <el-table ref="multipleTable" style="width: 100%;height: 64vh" tooltip-effect="dark"
                       :row-style="{ height: '40px' }"  :header-cell-style="{ padding: '0px' }"
                       :cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
-                      :data="add_tableData"  border row-key="ID"
-                      size="small"  
+                      :data="add_tableData"  border row-key="ID" size="small"  
 					  :cell-class-name="tableDataCellClass"
                       highlight-current-row="true"  @row-dblclick="add_updateCompanyFunc"
                       @row-click="add_tableRowClick" :show-overflow-tooltip="true"
@@ -35,6 +34,7 @@
               <el-table-column  sortable  align="left" label="款式" prop="款式" width="100"/>
               <el-table-column  sortable  align="left" label="色系名称" prop="颜色" width="150"/>
 			  <el-table-column  sortable  align="left" label="是否出库" prop="是否出库" width="120"/>
+			  <el-table-column  sortable  align="left" label="出库时间" prop="ck_rq" width="120"/>
             </el-table>
             <div class="dialog-footer" style="text-align: left;margin-right: 60px;">
 			</div>
@@ -44,20 +44,20 @@
     </layout>
   </div>
 </template>
+
 <script setup>
 // 全量引入格式化工具 请按需保留
 import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
 import {ref, reactive} from 'vue'
 import {getSpotList,getSpotTab} from '@/api/mes/job'
 import {ElMessage} from "element-plus";
-import { get } from 'scriptjs';
+// import { get } from 'scriptjs';
 defineOptions({name: 'Company'})
 import { useUserStore } from '@/pinia/modules/user'
-
+//获取用户登录信息
 const userStore = useUserStore()
 const _username = ref('')
 _username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
-
 //全局调用获取当前日期
 const today = new Date();
 const year = today.getFullYear();
@@ -68,37 +68,34 @@ const minutes = String(today.getMinutes()).padStart(2, '0');
 const seconds = String(today.getSeconds()).padStart(2, '0');
 const currentDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 const currentDates = `${year}-${month}-${day}`;
-
+//自动聚焦光标input
 const getMachineMacdata = async () => {
 	setTimeout(() => {
-				const inputElement = document.getElementById('searchInput');
-				if (inputElement) {
-					inputElement.focus();		
-				}
-			}, 100); // 延迟100毫秒
+		const inputElement = document.getElementById('searchInput');
+		if (inputElement) {
+			inputElement.focus();		
+		}
+	}, 100); // 延迟100毫秒
 }
 getMachineMacdata();
 
+//全局调用参数
 const add_searchInfo = ref('')//搜索
 const add_tableData = reactive([])//表格
-const _orderid = ref('')//订单编号
-const searcs = ref('')
+const _orderid = ref('')//订单编号
+const searcs = ref('')//默认记录扫描两次出库
 
 //表格行点击
 const add_tableRowClick = async (row)=>{
-  add_searchInfo.value = row.子订单编号
+//   add_searchInfo.value = row.子订单编号
 	console.log(row)
 	_orderid.value = row.子订单编号
 }
 
 //点击【查询】按钮
 const add_onSubmit = async ()=>{
-	setTimeout(() => {
-	    const inputElement = document.querySelector('#searchInput');
-	    if (inputElement) {
-	        inputElement.focus();
-	    }
-	}, 100); // 延迟100毫秒
+	//自动聚焦光标input
+	getMachineMacdata();
 	
   if(add_searchInfo.value === ''){
     const WorkListdata = [];
@@ -106,19 +103,19 @@ const add_onSubmit = async ()=>{
     add_tableData.splice(0,add_tableData.length,...WorkListdata);
     ElMessage({type: 'warning',message: '请扫描子订单编号' })
   }else{
-	  if (add_searchInfo.value.includes('-')) {
-		  if(searcs.value == ''){
+	  if (add_searchInfo.value.includes('-')) {//子订单编号
+		  if(searcs.value == ''){ //第一次扫码 查询数据
 			  console.log("查询子订单编号数据")
-			  const getSpotLists = await getSpotList({order:add_searchInfo.value,code:'出库'});
+			  const getSpotLists = await getSpotList({order:add_searchInfo.value,code:'出库'});//出库报工修改
 			  add_tableData.splice(0,add_tableData.length,...getSpotLists.data.data);
 			  add_searchInfo.value = ''
 			  searcs.value = 1;
 			  return;
 		  }
-		  if(searcs.value == 1){
+		  if(searcs.value == 1){//第二次扫码,如果两次相同代表可以出库
 			if(add_tableData[0]['子订单编号'] === add_searchInfo.value){
 				console.log("出库")
-				add_Dialogs();
+				add_Dialogs();//调用出库按钮
 				searcs.value = '';
 			}else{
 				ElMessage({type: 'warning',message: '两次扫码不一致,请重新扫描子订单出库' })
@@ -128,45 +125,48 @@ const add_onSubmit = async ()=>{
 				add_searchInfo.value = ''
 			}
 		  }
-	  } else {
-		  console.log("查询订单编号数据")
-		  const WorkListdata = [];
-		  searcs.value = '';
-	      const getSpotLists = await getSpotList({order:add_searchInfo.value,code:'出库'});
-	      add_tableData.splice(0,add_tableData.length,...getSpotLists.data.data);
-		  add_searchInfo.value = ''
+	  } else {//订单编号
+			console.log("查询订单编号数据")
+			const WorkListdata = [];
+			searcs.value = '';
+			const getSpotLists = await getSpotList({order:add_searchInfo.value,code:'出库'});
+			add_tableData.splice(0,add_tableData.length,...getSpotLists.data.data);
+			add_searchInfo.value = ''
 	  }
     
   }
 };
+
 //确认出库按钮
 const add_Dialog = async () => {
-	let params = {
-	  order_id: _orderid.value,
-	//   code_ck_rq: currentDates,
-	  code: '出库',
-	  sys_id: _username.value,
-	};
-	console.log(params)
-				const ck_gettab = await getSpotTab(params);// 发起出库请求
-				if (ck_gettab.code === 0) {// 出库成功后的处理
-					 searcs.value = '';
-					 ElMessage({ type: 'success', message: '出库成功' });
-					 const getSpotLists = await getSpotList({ order: _orderid.value, code: '出库' });// 获取并更新表格数据
-					 add_tableData.splice(0, add_tableData.length, ...getSpotLists.data.data);
-					 add_searchInfo.value = ''
-				}else {
-				 searcs.value = '';
-	    const getSpotLists = await getSpotList({ order: _orderid.value, code: '出库' }); // 出库失败,重新获取数据
+	// console.log("确认出库按钮")
+	let params = {}
+	if(_orderid.value === ''){
+		params.order_id = add_tableData[0]['子订单编号'];
+	}else{
+		params.order_id = _orderid.value;
+	}
+	params.code = '出库';
+	params.sys_id = _username.value;
+	const ck_gettab = await getSpotTab(params);// 发起出库请求
+	if (ck_gettab.code === 0) {// 出库成功后的处理
+		searcs.value = '';
+		ElMessage({ type: 'success', message: '出库成功'});
+		const getSpotLists = await getSpotList({order:params.order_id,code: '出库'});// 获取并更新表格数据
+		add_tableData.splice(0, add_tableData.length, ...getSpotLists.data.data);
+		add_searchInfo.value = ''
+	}else {
+		searcs.value = '';
+	    const getSpotLists = await getSpotList({order: params.order_id, code: '出库'}); // 出库失败,重新获取数据
 	    add_tableData.splice(0, add_tableData.length, ...getSpotLists.data.data);
 	  }
 }
-//扫码确认出库按钮
+
+//确认出库按钮
 const add_Dialogs = async () => {
 	if(add_tableData[0]['子订单编号'] === add_searchInfo.value){
 		 let params = {
 		   order_id: add_searchInfo.value,
-		   code_ck_rq: currentDates,
 		   code: '出库',
 		   sys_id: _username.value,
 		 };
@@ -192,7 +192,7 @@ const add_Dialogs = async () => {
 	}
 	return false;
 	
-	
+//下面代码代表多条出库
   if (add_tableData.length > 1) {
 	searcs.value = '';
     ElMessage({ type: 'warning', message: '出库出现多条数据'});
@@ -208,7 +208,6 @@ const add_Dialogs = async () => {
   }
   let params = {
     order_id: orderData['子订单编号'],
-    code_ck_rq: currentDates,
     code: '出库',
     sys_id: _username.value,
   };
@@ -254,12 +253,8 @@ const Restore_onSubmit = async ()=>{
 		add_tableData.splice(0,add_tableData.length,...getSpotLists.data.data);
 		}
 	}
-	setTimeout(() => {
-	    const inputElement = document.querySelector('#searchInput');
-	    if (inputElement) {
-	        inputElement.focus();
-	    }
-	}, 100); // 延迟100毫秒
+	//自动聚焦光标input
+	getMachineMacdata();
 }
 
 //复选框选择

+ 6 - 1
src/view/performance/datangbaogong.vue

@@ -165,6 +165,10 @@ const _code = '大烫'
 const Machine = ref('')
 //全局获取UniqId
 const UniqId = ref('')
+//全局获取工序
+const _gx = '5'
+//全局获取工序名称
+const _gxmc = '大烫'
 
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
@@ -336,8 +340,9 @@ const add_Dialog = async ()=>{
 			}, 100); // 延迟100毫秒
 			// searcs.value = '';
 			add_formData['尺码']=''
-			add_formData['数量']=''
+			add_formData['数量']=''
 			add_formData['上报数量']=''
+			add_formData['剩余数量']=''
 		//  searcs.value = 1;
 		 add_searchInfo.value = ''
 			ElMessage({type: 'success', message: '报工成功'});  

+ 9 - 3
src/view/performance/houdaoshougong.vue

@@ -165,6 +165,11 @@ const _code = '后道'
 const Machine = ref('')
 //全局获取UniqId
 const UniqId = ref('')
+//全局获取工序
+const _gx = '4'
+//全局获取工序名称
+const _gxmc = '后道收样'
+
 
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
@@ -225,7 +230,7 @@ const activeButtonValue = ref('')
 //代表扫描两次自动保存
 const searcs = ref('')
 const _order = ref('')
-//查询
+//查询
 const add_onSubmit = async ()=>{
   if(add_searchInfo.value === '' || add_searchInfo.value === undefined){
     const WorkListdata = [];
@@ -251,7 +256,7 @@ const add_onSubmit = async ()=>{
 		 add_searchInfo.value = ''
 		 setTimeout(() => {
 		const inputElement = document.getElementById('sbsl');
-		if (inputElement) {
+		if (add_formData['剩余数量']) {
 			inputElement.focus();		
 		}
 	}, 100); // 延迟100毫秒
@@ -336,8 +341,9 @@ const add_Dialog = async ()=>{
 			}, 100); // 延迟100毫秒
 			// searcs.value = '';
 			add_formData['尺码']=''
-			add_formData['数量']=''
+			add_formData['数量']=''
 			add_formData['上报数量']=''
+			add_formData['剩余数量']=''
 		//  searcs.value = 1;
 		 add_searchInfo.value = ''
 			ElMessage({type: 'success', message: '报工成功'});  

+ 37 - 37
src/view/performance/lingliaobaogong.vue

@@ -5,7 +5,7 @@
           <div class="gva-table-box">
               <h1 style="margin: 0%;margin-bottom: 6px;">领料报工</h1>
               <el-row :gutter="24" style="margin-bottom: 6px;">
-                    <el-input v-model="add_searchInfo" placeholder="请扫描子订单编号"
+                    <el-input v-model="add_searchInfo" placeholder="请扫描子订单编号领料"
                                   @keyup.enter="add_onSubmit"
                                   id="searchInput" 
                                   style="width: 220px;height: 50px;margin-left: 10px;">
@@ -29,43 +29,44 @@
       </layout>
     </div>
   </template>
-  <script setup>
-  // 全量引入格式化工具 请按需保留
-  import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
-  import {ref, reactive} from 'vue'
+
+<script setup>
+// 全量引入格式化工具 请按需保留
+import { Layout, LayoutSider, LayoutContent } from '@arco-design/web-vue';
+import {ref, reactive} from 'vue'
+import {processAdd} from '@/api/mes/job'
 import {getMachineMac} from '@/api/jixiaoguanli/jitairibaobiao'
 import {getMac} from '@/api/jixiaoguanli/baogong'
-  import {ElMessage} from "element-plus";
-  import { get } from 'scriptjs';
-  defineOptions({name: 'Company'})
-  import { useUserStore } from '@/pinia/modules/user'
-  
-  const userStore = useUserStore()
-  const _username = ref('')
-  _username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
-  
-  //全局调用获取当前日期
-  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} ${hours}:${minutes}:${seconds}`;
-  const currentDates = `${year}-${month}-${day}`;
-  
+import {ElMessage} from "element-plus";
+import { get } from 'scriptjs';
+defineOptions({name: 'Company'})
+import { useUserStore } from '@/pinia/modules/user'
+//获取用户登录信息
+const userStore = useUserStore()
+const _username = ref('')
+_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
 
-  
-  const add_formData = reactive({
-	机台号: '',	
-	工序: '',
-	组别: '',
-	人员: '',	
-	尺码: '',
-	数量: '',
-	是否订单尾包: '',
-  });
+//全局调用获取当前日期
+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} ${hours}:${minutes}:${seconds}`;
+const currentDates = `${year}-${month}-${day}`;
+
+//机台数据
+const add_formData = reactive({
+  机台号: '',	
+  工序: '',
+  组别: '',
+  人员: '',	
+  尺码: '',
+  数量: '',
+  是否订单尾包: '',
+});
 
 //全局获取code,接口接收code
 const _code = '领料'
@@ -76,7 +77,7 @@ const UniqId = ref('')
 
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
-  console.log("本页面获取物理地址",Machine.value)
+  console.log("领料报工物理地址",Machine.value)
   try {
     const data  = await getMachineMac({sys_sbID:'70-ED-A4-26-5F-30'});
 	add_formData['机台号'] = data.data['机台号']
@@ -149,7 +150,6 @@ const add_onSubmit = async ()=>{
     console.log(processAdd_post)
     if (processAdd_post.code === 0) {
       add_searchInfo.value = ''
-
       ElMessage({type: 'success',message: '领料成功'})
     } else {
       ElMessage({ type: 'error',message: '领料失败'})

+ 7 - 2
src/view/performance/zongjianbaogong.vue

@@ -166,7 +166,10 @@ const _code = '总检'
 const Machine = ref('')
 //全局获取UniqId
 const UniqId = ref('')
-
+//全局获取工序
+const _gx = '6'
+//全局获取工序名称
+const _gxmc = '总检'
 //物理地址获取机台编号
 const getMachineMacdata = async () => {
   console.log("本页面获取物理地址",Machine.value)
@@ -215,6 +218,7 @@ const GetAddr =  () => {
   // 5. 发送
   xmlhttp.send();
 }
+getMachineMacdata();
 // GetAddr()
 //搜索
 const add_searchInfo = ref('')
@@ -336,8 +340,9 @@ const add_Dialog = async ()=>{
 			}, 100); // 延迟100毫秒
 			// searcs.value = '';
 			add_formData['尺码']=''
-			add_formData['数量']=''
+			add_formData['数量']=''
 			add_formData['上报数量']=''
+			add_formData['剩余数量']=''
 		//  searcs.value = 1;
 		 add_searchInfo.value = ''
 			ElMessage({type: 'success', message: '报工成功'});