|
|
@@ -2,16 +2,16 @@
|
|
|
<div>
|
|
|
<header>
|
|
|
<div style="height: 50px;">
|
|
|
- <el-button type="primary" @click="onBZ" >班组维护</el-button>
|
|
|
- <el-button type="primary" @click="onchanliang" v-if="zdtreeType === true" >日产量上报</el-button>
|
|
|
- <el-button type="primary" @click="onOver" >完工</el-button>
|
|
|
- <el-button type="primary" @click="onzhicheng" >制程检验</el-button>
|
|
|
- <el-button type="primary" @click="ondianjian" >设备点检</el-button>
|
|
|
- <el-button type="primary" @click="onxuncha" >管理巡查</el-button>
|
|
|
- <el-button type="primary" @click="onstatus" >设置机台状态</el-button>
|
|
|
- <el-button type="primary" @click="onyinban">印版领退</el-button>
|
|
|
- <el-button type="primary" @click="onClear" >换型清场</el-button>
|
|
|
- <el-button type="primary" @click="oncomplaints" >客诉记录</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="onBZ" >班组维护</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="onchanliang" v-if="zdtreeType === true" >日产量上报</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="onOver" >完工</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="onzhicheng" >制程检验</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="ondianjian" >设备点检</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="onxuncha" >管理巡查</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="onstatus" >设置机台状态</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="onyinban">印版领退</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="onClear" >换型清场</el-button>
|
|
|
+ <el-button type="primary" size="large" @click="oncomplaints" >客诉记录</el-button>
|
|
|
</div>
|
|
|
</header>
|
|
|
|
|
|
@@ -130,13 +130,13 @@
|
|
|
|
|
|
<el-tab-pane label="班组人员及分配比例" @click="showTable('工艺资料')" name="second">
|
|
|
<el-table ref="multipleTable"
|
|
|
- highlight-current-row="true"
|
|
|
:show-overflow-tooltip="true"
|
|
|
:row-style="{ height: '20px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
:header-cell-style="{ padding: '0px' }"
|
|
|
@row-dblclick="gyupdateCompanyFunc"
|
|
|
:row-class-name="rowClassStyle"
|
|
|
+ :cell-class-name="bzryplanUsageCellClass"
|
|
|
style="width: 100%;height: 400px" border tooltip-effect="dark" :data="FPData" row-key="ID" @selection-change="handleSelectionChange"
|
|
|
@row-click="clickybupdate">
|
|
|
<el-table-column type="selection" label="选择" width="55" />
|
|
|
@@ -1348,7 +1348,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
|
|
|
<el-form-item label="工号 " prop="id" style="margin-top=0px; margin-bottom: 0px;">
|
|
|
- <el-input v-model="xunchaData.sczl_bh" @keyup.enter.native="getygsubmit($event, '11')" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
|
|
|
+ <el-input v-model="xunchaData.sczl_bh" @keyup.enter.native="getxunchayg($event)" placeholder="" style="margin-top=0px; margin-bottom: 0px;"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="4" style="margin-top=0px; margin-bottom: 0px;">
|
|
|
@@ -1858,6 +1858,10 @@ import {
|
|
|
getCompanyList
|
|
|
} from '@/api/company'
|
|
|
|
|
|
+import {
|
|
|
+ EquipmentSchedulingEdit,
|
|
|
+} from "@/api/yunyin/yunying";
|
|
|
+
|
|
|
import {
|
|
|
ProcessInspectionRecordsItemAdd,
|
|
|
AdditionalInspectionRecordAdd,
|
|
|
@@ -2076,6 +2080,7 @@ const FacilityProduction = async () => {
|
|
|
formData.value.班组Id=response.data.班组Id
|
|
|
formData.value.machine=JTMC
|
|
|
formData.value.状态=response.data.状态
|
|
|
+ formData.value.定额代号=response.data.定额代号
|
|
|
BZMC.value=response.data.班组编号
|
|
|
// 填充sczl_bh和sczl_name字段
|
|
|
let sczl_bhkey=''
|
|
|
@@ -2147,6 +2152,7 @@ const FacilityWorklist = async () => {
|
|
|
}
|
|
|
//检验记录
|
|
|
const InspectionRecord = async () => {
|
|
|
+ JYData=[]
|
|
|
const response = await inspectionRecord({machine:JTMC,Gd_gdbh:formData.value.工单编号,team:BZMC.value});
|
|
|
if(response.code==0){
|
|
|
// 提取 inspectiontime 作为列名
|
|
|
@@ -2190,6 +2196,12 @@ const FacilityDetail = async () => {
|
|
|
formData.value.production_all=0
|
|
|
const response = await facilityDetail({ machine: JTMC, Gd_gdbh: formData.value.工单编号, team:BZMC.value });
|
|
|
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(formData.value.上机时间)
|
|
|
CLMXData.splice(0, CLMXData.length, ...Object.values(response.data));
|
|
|
formData.value.production_now=response.data[0].产量
|
|
|
formData.value.production_all=response.data.total.产量
|
|
|
@@ -2205,6 +2217,13 @@ const getygsubmit = (event, inputName) => {
|
|
|
// console.log(variableValue)
|
|
|
GetYg(variableValue,inputName)
|
|
|
}
|
|
|
+
|
|
|
+const getxunchayg = async (value) => {
|
|
|
+ const response = await getYg({sczl_bh:xunchaData.value.sczl_bh});
|
|
|
+ if (response.code === 0) {
|
|
|
+ xunchaData.value.sczl_name=response.data.ygxm
|
|
|
+ }
|
|
|
+}
|
|
|
//获取员工信息
|
|
|
const GetYg = async (value,inputName) => {
|
|
|
const response = await getYg({sczl_bh:value});
|
|
|
@@ -2493,22 +2512,26 @@ const RemodelGetTab = async() => {
|
|
|
const response = await remodelGetTab()
|
|
|
let arr=[]
|
|
|
if (response.code === 0) {
|
|
|
- for(let key in response.data){
|
|
|
- if(response.data[key][0]){
|
|
|
- let children =[]
|
|
|
- for (let i = 0; i < response.data[key].length; i++) {
|
|
|
- children.push({label:response.data[key][i],machine:key})
|
|
|
- }
|
|
|
- arr.push({
|
|
|
- label:key,
|
|
|
- children:children
|
|
|
- })
|
|
|
- console.log(response.data[key].length)
|
|
|
- }else{
|
|
|
- arr.push({label:key})
|
|
|
- }
|
|
|
- }
|
|
|
- huanxingtreeData.value=arr
|
|
|
+ // for(let key in response.data){
|
|
|
+ // if(response.data[key][0]){
|
|
|
+ // let children =[]
|
|
|
+ // for (let i = 0; i < response.data[key].length; i++) {
|
|
|
+ // children.push({label:response.data[key][i],machine:key})
|
|
|
+ // }
|
|
|
+ // arr.push({
|
|
|
+ // label:key,
|
|
|
+ // children:children
|
|
|
+ // })
|
|
|
+ // console.log(response.data[key].length)
|
|
|
+ // }else{
|
|
|
+ // arr.push({label:key})
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // huanxingtreeData.value=arr
|
|
|
+ huanxingtreeData.value=[{label:JTMC,children:response.data[JTMC].map(item=>({
|
|
|
+ label:item,
|
|
|
+ machine:JTMC
|
|
|
+ }))}]
|
|
|
}
|
|
|
}
|
|
|
//设置机台状态
|
|
|
@@ -2690,35 +2713,13 @@ const FieldInspectionRecord = async () => {
|
|
|
}
|
|
|
}
|
|
|
//获取机台编号
|
|
|
-const GetMachineMac = async () => {
|
|
|
- var xmlhttp = null;
|
|
|
- var res;
|
|
|
- if (window.XMLHttpRequest) {
|
|
|
- xmlhttp = new XMLHttpRequest();
|
|
|
- } else if (window.ActiveXObject) {
|
|
|
- xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
- }
|
|
|
- // 2. 设置回调函数
|
|
|
- xmlhttp.onreadystatechange = function() {
|
|
|
- if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
|
|
- res = eval('('+xmlhttp.response+')');
|
|
|
- let result = ''
|
|
|
- for (let i = 0; i < res.macAddress.length; i++) {
|
|
|
- if (i % 2 === 0 && i !== 0) {
|
|
|
- result += '-' // 根据实际需求修改分隔符
|
|
|
- }
|
|
|
- result += res.macAddress[i]
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // 3. 打开一个连接http://10.10.4.42/
|
|
|
- xmlhttp.open("get", "http://127.0.0.1:8090/init")
|
|
|
- // 5. 发送
|
|
|
- xmlhttp.send();
|
|
|
+const GetMachineMac = async (addr) => {
|
|
|
+ console.log(addr);
|
|
|
+ const response = await getMachineMac({ addr: addr });
|
|
|
// const response = await getMachineMac({ addr: '68-ED-A4-26-5D-5E' });
|
|
|
// const response = await getMachineMac({ addr: '68-ED-A4-26-5D-90' });
|
|
|
// const response = await getMachineMac({ addr: '68-ED-A4-26-5E-50' });
|
|
|
- const response = await getMachineMac({ addr: '68-ED-A4-26-60-CC' });
|
|
|
+ // const response = await getMachineMac({ addr: '68-ED-A4-26-60-CC' });
|
|
|
// const response = await getMachineMac({ addr: '68-ED-A4-26-5F-8E' });
|
|
|
// const response = await getMachineMac({ addr: '68-ED-A4-26-60-C8' });
|
|
|
// const response = await getMachineMac({ addr: '40-62-31-21-4E-15' });
|
|
|
@@ -2726,7 +2727,6 @@ const GetMachineMac = async () => {
|
|
|
// const response = await getMachineMac({ addr: '68-ED-A4-26-60-E5' });
|
|
|
// const response = await getMachineMac({ addr: '68-ED-A4-26-5E-4E' });
|
|
|
// const response = await getMachineMac({ addr: '68-ED-A4-26-60-D1' });
|
|
|
- console.log(response);
|
|
|
if (response.code === 0) {
|
|
|
// 将接口返回的数据添加到树型结构中
|
|
|
let newNode = {
|
|
|
@@ -2745,7 +2745,34 @@ const GetMachineMac = async () => {
|
|
|
FacilityProduction();
|
|
|
}
|
|
|
}
|
|
|
-GetMachineMac()
|
|
|
+const GetAddr = () => {
|
|
|
+ var xmlhttp = null;
|
|
|
+ var res;
|
|
|
+ if (window.XMLHttpRequest) {
|
|
|
+ xmlhttp = new XMLHttpRequest();
|
|
|
+ } else if (window.ActiveXObject) {
|
|
|
+ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
|
|
|
+ }
|
|
|
+ // 2. 设置回调函数
|
|
|
+ xmlhttp.onreadystatechange = function() {
|
|
|
+ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
|
|
|
+ res = eval('('+xmlhttp.response+')');
|
|
|
+ let result = ''
|
|
|
+ for (let i = 0; i < res.macAddress.length; i++) {
|
|
|
+ if (i % 2 === 0 && i !== 0) {
|
|
|
+ result += '-' // 根据实际需求修改分隔符
|
|
|
+ }
|
|
|
+ result += res.macAddress[i]
|
|
|
+ }
|
|
|
+ GetMachineMac(result)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 3. 打开一个连接http://10.10.4.42/
|
|
|
+ xmlhttp.open("get", "http://127.0.0.1:8090/init")
|
|
|
+ // 5. 发送
|
|
|
+ xmlhttp.send();
|
|
|
+}
|
|
|
+GetAddr()
|
|
|
//提交巡查记录
|
|
|
const SubmitPatrolRecord = async () => {
|
|
|
console.log(JTMC.split("#")[0])
|
|
|
@@ -2775,8 +2802,21 @@ function onchanliang() {
|
|
|
console.log(JTMC.split("#")[0]); // 通过value属性获取ref对象的值,然后再调用split方法
|
|
|
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 response = await reportInfo({ machine: JTMC.split("#")[0] });
|
|
|
if (response.code === 0) {
|
|
|
const { order_info, class: classInfo } = response.data;
|
|
|
@@ -2788,6 +2828,11 @@ const ReportInfo = async () => {
|
|
|
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: classInfo.sczl_jtbh.split('#')[0],
|
|
|
sczl_bzdh: classInfo.sczl_bzdh,
|
|
|
sys_id: classInfo.sys_id,
|
|
|
@@ -3121,10 +3166,10 @@ const FacilityTeam = async (value) => {
|
|
|
const updatedData = response.data.map(item => {
|
|
|
return { ...item, JTMC: value }; // 添加 JTMC 属性
|
|
|
});
|
|
|
-
|
|
|
+ FPData.splice(0, FPData.length, ...updatedData)
|
|
|
// 将更新后的数据添加到 bzData 数组
|
|
|
bzData.push(...updatedData);
|
|
|
- FPData.push(...updatedData)
|
|
|
+ // FPData.push(...updatedData)
|
|
|
console.log(FPData)
|
|
|
}
|
|
|
};
|
|
|
@@ -3487,15 +3532,31 @@ const setMachineTeams = async(row) => {
|
|
|
team_id:formData.value.班组Id
|
|
|
})
|
|
|
if (res.code === 0) {
|
|
|
- FacilityProduction()
|
|
|
-
|
|
|
- ElMessage({
|
|
|
+ EquipmentSchedulingEdits(row)
|
|
|
+ ElMessage({
|
|
|
type: 'success',
|
|
|
message: '成功'
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const EquipmentSchedulingEdits = async(row) => {
|
|
|
+ console.log(row)
|
|
|
+ const res = await EquipmentSchedulingEdit([{
|
|
|
+ capacity:row.工序产能,
|
|
|
+ ProductionHours:row.计划工时,
|
|
|
+ AuxiliaryHours:row.装版时数,
|
|
|
+ shift:row.班组,
|
|
|
+ remark:row.排产备注,
|
|
|
+ start:row.最早开工时间,
|
|
|
+ projectTime:currentTime,
|
|
|
+ UniqId:row.UniqId
|
|
|
+ }])
|
|
|
+ if (res.code === 0) {
|
|
|
+ FacilityProduction()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// 删除行
|
|
|
const deleteCompanyFunc = async (row) => {
|
|
|
const res = await deleteCompany({ ID: row.ID })
|
|
|
@@ -3637,13 +3698,16 @@ const enterDialog = async () => {
|
|
|
}
|
|
|
|
|
|
const sbzyqdplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
- // console.log(formData.value['工单编号'])
|
|
|
- // console.log(row['工单编号|质量信息'].split('|')[0])
|
|
|
if(formData.value['工单编号'] === row['工单编号|质量信息'].split('|')[0]){
|
|
|
- console.log(123)
|
|
|
return 'back-color-row';
|
|
|
}
|
|
|
}
|
|
|
+const bzryplanUsageCellClass = ({row, column, rowIndex, columnIndex}) =>{
|
|
|
+ if(formData.value['班组Id'] === row.ID){
|
|
|
+ return 'back-color-row';
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|