|
|
@@ -2229,6 +2229,9 @@ const handleNodeClick = (nodeData,node) => {
|
|
|
// });
|
|
|
const classbz=ref([])
|
|
|
const FacilityProduction = async (addr) => {
|
|
|
+ if(JTMC === '' || JTMC === null){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
const response = await facilityProduction({machine:JTMC});
|
|
|
if (response.code === 0) {
|
|
|
if(response.data){
|
|
|
@@ -2259,40 +2262,27 @@ const FacilityProduction = async (addr) => {
|
|
|
}
|
|
|
formData.value.class=classbz.value.join(',')
|
|
|
}
|
|
|
- // for (let i = 1; i <= 10; i++) {
|
|
|
- // if (response.data.班组成员) {
|
|
|
- // // formData.value.['sczl_bh12'] = response.data.班组成员[i]['编号'];
|
|
|
- // // formData.value['sczl_name12'] = response.data.班组成员[i]['名字'];
|
|
|
- // // console.log(formData)
|
|
|
- // // console.log(response.data[sczl_bh]['员工姓名'])
|
|
|
- // // console.log(formData.value.sczl_bh)
|
|
|
- // // console.log(sczl_name)
|
|
|
- // } else {
|
|
|
- // console.log(555555555555555)
|
|
|
- // // 如果字段不存在,可以在这里进行处理
|
|
|
- // // console.log('2');
|
|
|
- // // formData.value[sczl_bh] = response.data[sczl_bh]['员工编号'];
|
|
|
- // // formData.value[sczl_name] = response.data[sczl_bh]['员工姓名'];
|
|
|
- // // console.log(formData.value.sczl_bh)
|
|
|
- // // console.log(sczl_name)
|
|
|
- // }
|
|
|
- // }
|
|
|
if(response.data.工单编号){
|
|
|
InspectionRecord()
|
|
|
FacilityDetail()
|
|
|
}
|
|
|
}
|
|
|
- const responses = await MachineDetailList({workshop:CJMC});
|
|
|
- if(responses.code===0){
|
|
|
- responses.data.map(item=>{
|
|
|
- if(item.设备编号==JTMC){
|
|
|
- formData.value.status=item.状态
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ //完工1
|
|
|
+ if(CJMC === '' || CJMC === null){
|
|
|
+ console.log("CJMC空")
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ const responses = await MachineDetailList({workshop:CJMC});
|
|
|
+ if(responses.code===0){
|
|
|
+ responses.data.map(item=>{
|
|
|
+ if(item.设备编号==JTMC){
|
|
|
+ formData.value.status=item.状态
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
FacilityWorklist()
|
|
|
FacilityTeam(JTMC)
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
//设备工作清单
|
|
|
@@ -2571,28 +2561,31 @@ const InspectionRecord = async () => {
|
|
|
const FacilityDetail = async () => {
|
|
|
formData.value.production_now=0
|
|
|
formData.value.production_all=0
|
|
|
+ console.log("machine--->"+JTMC)
|
|
|
+ console.log("Gd_gdbh--->"+formData.value.工单编号)
|
|
|
+ console.log("team--->"+BZMC.value)
|
|
|
const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team:BZMC.value });
|
|
|
+ console.log("facilityDetail--》返回的数据")
|
|
|
+ console.log(response)
|
|
|
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(response.data)
|
|
|
CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
|
|
|
- formData.value.production_now=response.data[0].产量
|
|
|
- formData.value.production_all=response.data.total.产量
|
|
|
+ formData.value.production_now=response.data[0].产量
|
|
|
+ formData.value.production_all=response.data.total.产量
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
//员工编号回车事件
|
|
|
const getygsubmit = (event, inputName) => {
|
|
|
- let combinedString = 'sczl_bh' + inputNme;
|
|
|
- // console.log(combinedString)
|
|
|
- // let variableName = 'sczl_gdbh'+inputName;
|
|
|
- let variableValue = eval('formData3.value.' + combinedString);
|
|
|
- // console.log(variableValue)
|
|
|
- GetYg(variableValue,inputName)
|
|
|
+ let combinedString = 'sczl_bh' + inputNme;
|
|
|
+ let variableValue = eval('formData3.value.' + combinedString);
|
|
|
+ GetYg(variableValue,inputName)
|
|
|
}
|
|
|
+
|
|
|
const blModel = ref(false)
|
|
|
const employeeData = ref('')
|
|
|
const getbzyg = async (value,key) => {
|
|
|
@@ -2952,9 +2945,12 @@ function onDel() {
|
|
|
|
|
|
}
|
|
|
//完工按钮
|
|
|
+//完工1
|
|
|
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()
|
|
|
@@ -2963,15 +2959,12 @@ function onOver() {
|
|
|
}
|
|
|
//完工事件
|
|
|
const SetProcessStatus = async () => {
|
|
|
- // const RESCODE={
|
|
|
- // order:'2311114',
|
|
|
- // yjno:'01',
|
|
|
- // gxh:'01',
|
|
|
- // }
|
|
|
- console.log(formData.value.工单编号,formData.value.印件号,formData.value.工序号);
|
|
|
+ console.log(formData.value.工单编号);
|
|
|
+ console.log(formData.value.印件号);
|
|
|
+ console.log(formData.value.工序号);
|
|
|
const response = await setProcessStatus({order:formData.value.工单编号,yjno:formData.value.印件号,gxh:formData.value.工序号});
|
|
|
console.log(response)
|
|
|
- if (response.code === 0) {
|
|
|
+ if (response.code === 0) {1
|
|
|
FacilityProduction()
|
|
|
}
|
|
|
}
|
|
|
@@ -3606,14 +3599,16 @@ const SubmitPatrolRecord = async () => {
|
|
|
xunchaVisible.value=false
|
|
|
}
|
|
|
}
|
|
|
+const isSubmitting = ref(false)
|
|
|
|
|
|
|
|
|
//日产量上报
|
|
|
function onchanliang() {
|
|
|
+ ReportInfo();
|
|
|
+ isSubmitting.value = false
|
|
|
//获取机台号
|
|
|
console.log(JTMC.split("#")[0]);
|
|
|
//日产量上报 4.1获取报工单其他信息
|
|
|
- ReportInfo();
|
|
|
}
|
|
|
|
|
|
// 获取当前日期
|
|
|
@@ -3691,11 +3686,10 @@ const ReportInfo = async () => {
|
|
|
// getTableData()
|
|
|
}
|
|
|
|
|
|
-const isSubmitting = ref(false)
|
|
|
//日产量上报提交按钮
|
|
|
const chanliangenterDialog = async () => {
|
|
|
- isSubmitting.value = false
|
|
|
SubmitDailyProduction()
|
|
|
+ isSubmitting.value = false
|
|
|
}
|
|
|
const bzchanliangenterDialog = async () => {
|
|
|
chanliangEdits()
|
|
|
@@ -3751,12 +3745,13 @@ const SubmitDailyProduction = async () => {
|
|
|
bom: formData3.value.formattedArray
|
|
|
}
|
|
|
console.log(restoredData)
|
|
|
+ //4.2日产量上报 添加
|
|
|
const response = await submitDailyProduction(restoredData);
|
|
|
console.log(response)
|
|
|
if (response.code === 0) {
|
|
|
- isSubmitting.value = true
|
|
|
- chanliangVisible.value=false
|
|
|
FacilityDetail()
|
|
|
+ isSubmitting.value = true
|
|
|
+ chanliangVisible.value = false
|
|
|
ElMessage({type: 'success',message: '成功'})
|
|
|
}
|
|
|
}
|
|
|
@@ -4650,10 +4645,12 @@ const updateCompanyFunc = async(row) => {
|
|
|
}
|
|
|
}
|
|
|
const rowws = ref(null)
|
|
|
+const wangongbh = ref(null)
|
|
|
//设备作业清单单机
|
|
|
const yjupdateCompanyFunc = async(row) => {
|
|
|
console.log(row)
|
|
|
rowws.value = row
|
|
|
+ wangongbh.value = row['工单编号|质量信息'].replace(/\|$/, '')
|
|
|
console.log("通过 "+row['工单编号|质量信息'].replace(/\|$/, '')+" 获取右上角数据↓↓↓↓↓")
|
|
|
const res = await Procedure({ Gd_gdbh: row['工单编号|质量信息'].replace(/\|$/, '') })
|
|
|
console.log(res)
|
|
|
@@ -4702,7 +4699,7 @@ const MachineWorkOrderEdits = async(row) => {
|
|
|
})
|
|
|
console.log(res)
|
|
|
if (res.code === 0) {
|
|
|
- SetMachineStatus(row)
|
|
|
+ SetMachineStatus(row)
|
|
|
}
|
|
|
}
|
|
|
//设置机台状态
|