|
@@ -2049,6 +2049,7 @@ import {
|
|
|
facilityProcedure,
|
|
facilityProcedure,
|
|
|
dailysearch,
|
|
dailysearch,
|
|
|
dailygetGzByYgbh,
|
|
dailygetGzByYgbh,
|
|
|
|
|
+ MachineChanliangDetail
|
|
|
} from '@/api/jixiaoguanli/jitairibaobiao'
|
|
} from '@/api/jixiaoguanli/jitairibaobiao'
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
@@ -2539,20 +2540,48 @@ const InspectionRecord = async () => {
|
|
|
}
|
|
}
|
|
|
//当班产量明细
|
|
//当班产量明细
|
|
|
const FacilityDetail = async () => {
|
|
const FacilityDetail = async () => {
|
|
|
|
|
+ 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 currentHour = today.getHours(); // 获取当前的小时
|
|
|
|
|
+ let currentDate = `${year}-${month}-${day}`;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
formData.value.production_now=0
|
|
formData.value.production_now=0
|
|
|
formData.value.production_all=0
|
|
formData.value.production_all=0
|
|
|
|
|
+
|
|
|
console.log("machine--->"+JTMC)
|
|
console.log("machine--->"+JTMC)
|
|
|
console.log("Gd_gdbh--->"+formData.value.工单编号)
|
|
console.log("Gd_gdbh--->"+formData.value.工单编号)
|
|
|
console.log("team--->"+BZMC.value)
|
|
console.log("team--->"+BZMC.value)
|
|
|
const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team:BZMC.value });
|
|
const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team:BZMC.value });
|
|
|
- console.log("facilityDetail--》返回的数据")
|
|
|
|
|
console.log(response)
|
|
console.log(response)
|
|
|
|
|
+ console.log("facilityDetail_01")
|
|
|
|
|
+ // 日产量上报上机时间
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
if(response.data === null){
|
|
if(response.data === null){
|
|
|
- formData.value.上机时间=currentDate+' 08:30:00'
|
|
|
|
|
|
|
+ if (currentHour < 8 || (currentHour === 8 && minutes < 30)) {
|
|
|
|
|
+ // 如果当前时间早于08:30, 则设置为前一天的晚班时间20:30
|
|
|
|
|
+ // 需要将日期减一天
|
|
|
|
|
+ const yesterDay = new Date(today.getTime() - 86400000); // 减去一天的毫秒数
|
|
|
|
|
+ const yearYesterday = yesterDay.getFullYear();
|
|
|
|
|
+ const monthYesterday = String(yesterDay.getMonth() + 1).padStart(2, '0');
|
|
|
|
|
+ const dayYesterday = String(yesterDay.getDate()).padStart(2, '0');
|
|
|
|
|
+ formData.value.上机时间 = `${yearYesterday}-${monthYesterday}-${dayYesterday} 20:30:00`;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 如果当前时间晚于或等于08:30, 则设置为当天的白班时间08:30
|
|
|
|
|
+ formData.value.上机时间 = `${currentDate} 08:30:00`;
|
|
|
|
|
+ }
|
|
|
}else{
|
|
}else{
|
|
|
- formData.value.上机时间=currentDate.split('-')[0]+'-'+response.data[0]['生产时间段'].split('>')[1]+':00'
|
|
|
|
|
|
|
+ // formData.value.上机时间 = response.data.sj1
|
|
|
|
|
+ formData.value.上机时间 = currentDate.split('-')[0]+'-'+response.data[0]['生产时间段'].split('>')[1]+':00'
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
|
|
CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
|
|
|
formData.value.production_now=response.data[0].产量
|
|
formData.value.production_now=response.data[0].产量
|
|
|
formData.value.production_all=response.data.total.产量
|
|
formData.value.production_all=response.data.total.产量
|
|
@@ -3237,7 +3266,6 @@ const tableCols2 = [
|
|
|
|
|
|
|
|
//员工工资查询
|
|
//员工工资查询
|
|
|
const gzSel = () =>{
|
|
const gzSel = () =>{
|
|
|
- console.log(formData)
|
|
|
|
|
if(formData.value.班组成员.length==0){
|
|
if(formData.value.班组成员.length==0){
|
|
|
ElMessage({ type: 'warning', message: '未获取到员工' });
|
|
ElMessage({ type: 'warning', message: '未获取到员工' });
|
|
|
return
|
|
return
|
|
@@ -3604,86 +3632,106 @@ const SubmitPatrolRecord = async () => {
|
|
|
//日产量上报提交按钮默认开启
|
|
//日产量上报提交按钮默认开启
|
|
|
const isSubmitting = ref(false)
|
|
const isSubmitting = ref(false)
|
|
|
|
|
|
|
|
-//日产量上报按钮
|
|
|
|
|
|
|
+// 获取当前日期
|
|
|
|
|
+// 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}`;
|
|
|
|
|
+
|
|
|
|
|
+//日产量上报 按钮
|
|
|
function onchanliang() {
|
|
function onchanliang() {
|
|
|
- ReportInfo();
|
|
|
|
|
- //日产量上报提交按钮默认开启
|
|
|
|
|
- isSubmitting.value = false
|
|
|
|
|
|
|
+ //日产量上报弹窗开启
|
|
|
|
|
+ isSubmitting.value = false
|
|
|
|
|
+ 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 ReportInfo = async () => {
|
|
|
- //4.1获取报工单其他信息接口
|
|
|
|
|
- const response = await reportInfo({ machine: JTMC.split("#")[0] });
|
|
|
|
|
- if (response.code === 0) {
|
|
|
|
|
- const { order_info, class: classInfo } = response.data;
|
|
|
|
|
- const newData = {
|
|
|
|
|
- order: order_info.order,
|
|
|
|
|
- yjno: order_info.yjno,
|
|
|
|
|
- gxh: order_info.gxh,
|
|
|
|
|
- gxmc: order_info.gxmc,
|
|
|
|
|
- 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: JTMC.split("#")[0],
|
|
|
|
|
- sczl_bzdh: classInfo.sczl_bzdh,
|
|
|
|
|
- sys_id: classInfo.sys_id,
|
|
|
|
|
- sys_rq: classInfo.sys_rq,
|
|
|
|
|
- mod_rq: classInfo.mod_rq,
|
|
|
|
|
- UniqId: classInfo.UniqId,
|
|
|
|
|
- sczl_bh1: classInfo.sczl_bh1,
|
|
|
|
|
- sczl_bh2: classInfo.sczl_bh2,
|
|
|
|
|
- sczl_bh3: classInfo.sczl_bh3,
|
|
|
|
|
- sczl_bh4: classInfo.sczl_bh4,
|
|
|
|
|
- sczl_bh5: classInfo.sczl_bh5,
|
|
|
|
|
- sczl_bh6: classInfo.sczl_bh6,
|
|
|
|
|
- sczl_bh7: classInfo.sczl_bh7,
|
|
|
|
|
- sczl_bh8: classInfo.sczl_bh8,
|
|
|
|
|
- sczl_bh9: classInfo.sczl_bh9,
|
|
|
|
|
- sczl_bh10: classInfo.sczl_bh10,
|
|
|
|
|
- sczl_name1: classInfo.sczl_name1,
|
|
|
|
|
- sczl_name2: classInfo.sczl_name2,
|
|
|
|
|
- sczl_name3: classInfo.sczl_name3,
|
|
|
|
|
- sczl_name4: classInfo.sczl_name4,
|
|
|
|
|
- sczl_name5: classInfo.sczl_name5,
|
|
|
|
|
- sczl_name6: classInfo.sczl_name6,
|
|
|
|
|
- sczl_name7: classInfo.sczl_name7,
|
|
|
|
|
- sczl_name8: classInfo.sczl_name8,
|
|
|
|
|
- sczl_name9: classInfo.sczl_name9,
|
|
|
|
|
- sczl_name10: classInfo.sczl_name10,
|
|
|
|
|
- sczl_rate1: classInfo.sczl_rate1,
|
|
|
|
|
- sczl_rate2: classInfo.sczl_rate2,
|
|
|
|
|
- sczl_rate3: classInfo.sczl_rate3,
|
|
|
|
|
- sczl_rate4: classInfo.sczl_rate4,
|
|
|
|
|
- sczl_rate5: classInfo.sczl_rate5,
|
|
|
|
|
- sczl_rate6: classInfo.sczl_rate6,
|
|
|
|
|
- sczl_rate7: classInfo.sczl_rate7,
|
|
|
|
|
- sczl_rate8: classInfo.sczl_rate8,
|
|
|
|
|
- sczl_rate9: classInfo.sczl_rate9,
|
|
|
|
|
- sczl_rate10: classInfo.sczl_rate10,
|
|
|
|
|
- Gy0_ms:order_info.Gy0_ms,
|
|
|
|
|
- Gy0_ls:order_info.Gy0_ls,
|
|
|
|
|
- };
|
|
|
|
|
- formData3.value = { ...formData3.value, ...newData };
|
|
|
|
|
- chanliangselectData.splice(0, chanliangselectData.length, ...response.data.bom)
|
|
|
|
|
- chanliangVisible.value = true
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ console.log(formData)
|
|
|
|
|
+ // 获取当前日期
|
|
|
|
|
+ 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 currenttimes = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
|
|
|
+
|
|
|
|
|
+ //4.1获取报工单其他信息接口
|
|
|
|
|
+ const response = await reportInfo({ machine: JTMC.split("#")[0] });
|
|
|
|
|
+ console.log(response)
|
|
|
|
|
+ console.log("reportInfo_01")
|
|
|
|
|
+
|
|
|
|
|
+ // 日产量上报上机时间
|
|
|
|
|
+ if (response.code === 0) {
|
|
|
|
|
+ const { order_info, class: classInfo } = response.data;
|
|
|
|
|
+
|
|
|
|
|
+ // console.log(response.classInfo.UniqId)
|
|
|
|
|
+ const newData = {
|
|
|
|
|
+ order: order_info.order,
|
|
|
|
|
+ yjno: order_info.yjno,
|
|
|
|
|
+ gxh: order_info.gxh,
|
|
|
|
|
+ gxmc: order_info.gxmc,
|
|
|
|
|
+ product_name: order_info.product_name,
|
|
|
|
|
+ yj_name: order_info.yj_name,
|
|
|
|
|
+ gy_name: order_info.gy_name,
|
|
|
|
|
+ 日期:currentDate,
|
|
|
|
|
+ 下机时间:currenttimes,
|
|
|
|
|
+ 上机时间:formData.value.上机时间,
|
|
|
|
|
+ 装版总时长:0,
|
|
|
|
|
+ 定额代号:formData.value.定额代号,
|
|
|
|
|
+ sczl_jtbh: JTMC.split("#")[0],
|
|
|
|
|
+ sczl_bzdh: classInfo.sczl_bzdh,
|
|
|
|
|
+ sys_id: classInfo.sys_id,
|
|
|
|
|
+ sys_rq: classInfo.sys_rq,
|
|
|
|
|
+ mod_rq: classInfo.mod_rq,
|
|
|
|
|
+ UniqId: classInfo.UniqId,
|
|
|
|
|
+ sczl_bh1: classInfo.sczl_bh1,
|
|
|
|
|
+ sczl_bh2: classInfo.sczl_bh2,
|
|
|
|
|
+ sczl_bh3: classInfo.sczl_bh3,
|
|
|
|
|
+ sczl_bh4: classInfo.sczl_bh4,
|
|
|
|
|
+ sczl_bh5: classInfo.sczl_bh5,
|
|
|
|
|
+ sczl_bh6: classInfo.sczl_bh6,
|
|
|
|
|
+ sczl_bh7: classInfo.sczl_bh7,
|
|
|
|
|
+ sczl_bh8: classInfo.sczl_bh8,
|
|
|
|
|
+ sczl_bh9: classInfo.sczl_bh9,
|
|
|
|
|
+ sczl_bh10: classInfo.sczl_bh10,
|
|
|
|
|
+ sczl_name1: classInfo.sczl_name1,
|
|
|
|
|
+ sczl_name2: classInfo.sczl_name2,
|
|
|
|
|
+ sczl_name3: classInfo.sczl_name3,
|
|
|
|
|
+ sczl_name4: classInfo.sczl_name4,
|
|
|
|
|
+ sczl_name5: classInfo.sczl_name5,
|
|
|
|
|
+ sczl_name6: classInfo.sczl_name6,
|
|
|
|
|
+ sczl_name7: classInfo.sczl_name7,
|
|
|
|
|
+ sczl_name8: classInfo.sczl_name8,
|
|
|
|
|
+ sczl_name9: classInfo.sczl_name9,
|
|
|
|
|
+ sczl_name10: classInfo.sczl_name10,
|
|
|
|
|
+ sczl_rate1: classInfo.sczl_rate1,
|
|
|
|
|
+ sczl_rate2: classInfo.sczl_rate2,
|
|
|
|
|
+ sczl_rate3: classInfo.sczl_rate3,
|
|
|
|
|
+ sczl_rate4: classInfo.sczl_rate4,
|
|
|
|
|
+ sczl_rate5: classInfo.sczl_rate5,
|
|
|
|
|
+ sczl_rate6: classInfo.sczl_rate6,
|
|
|
|
|
+ sczl_rate7: classInfo.sczl_rate7,
|
|
|
|
|
+ sczl_rate8: classInfo.sczl_rate8,
|
|
|
|
|
+ sczl_rate9: classInfo.sczl_rate9,
|
|
|
|
|
+ sczl_rate10: classInfo.sczl_rate10,
|
|
|
|
|
+ Gy0_ms:order_info.Gy0_ms,
|
|
|
|
|
+ Gy0_ls:order_info.Gy0_ls,
|
|
|
|
|
+ };
|
|
|
|
|
+ formData3.value = { ...formData3.value, ...newData };
|
|
|
|
|
+ chanliangselectData.splice(0, chanliangselectData.length, ...response.data.bom)
|
|
|
|
|
+ chanliangVisible.value = true
|
|
|
|
|
+ }
|
|
|
// getTableData()
|
|
// getTableData()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -4674,6 +4722,17 @@ const SetMachineStatus = async (row) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
const EquipmentSchedulingEdits = async(row) => {
|
|
const EquipmentSchedulingEdits = async(row) => {
|
|
|
|
|
+ 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}`;
|
|
|
|
|
+
|
|
|
console.log(row)
|
|
console.log(row)
|
|
|
const res = await EquipmentSchedulingEdit([{
|
|
const res = await EquipmentSchedulingEdit([{
|
|
|
capacity:row.工序产能,
|
|
capacity:row.工序产能,
|