export const degreeList = [ { id: 1, value: "普通", }, { id: 2, value: "紧急", }, { id: 3, value: "重要", }, ]; export function maintainServiceDetailFn(worksheetInfo) { let detailsList = [ { label: "单据编号", content: worksheetInfo?.workOrderCode }, { label: "状态", content: worksheetInfo?.status === 1 ? "待分配" : worksheetInfo?.status === 2 ? "待接收" : worksheetInfo?.status === 3 ? "已确认" : "已完成", }, { label: "紧急程度", content: worksheetInfo?.urgent === 1 ? "普通" : worksheetInfo?.urgent === 2 ? "紧急" : "重要", }, { label: "执行人", content: worksheetInfo?.executeUserName }, { label: "联系方式", content: worksheetInfo?.createUserMobile }, { label: "期望完成时间", content: worksheetInfo?.expectDoneTime }, { label: "维修总费用", content: worksheetInfo?.repairAmountSum }, { label: "创建人", content: worksheetInfo?.createUserName }, { label: "创建部门", content: worksheetInfo?.createDeptName }, { label: "创建时间", content: worksheetInfo?.createTime }, { label: "附件", content: worksheetInfo?.attUrl }, { label: "备注", content: worksheetInfo?.content }, ]; return detailsList; } export function maintainDetailFn(worksheetInfo) { let detailsList = [ { label: "工单单号", content: worksheetInfo?.plan?.planCode }, { label: "计划单号", content: worksheetInfo?.plan?.planCode }, { label: "保养名称", content: worksheetInfo?.plan?.planName }, { label: "保养部门", content: worksheetInfo?.plan?.executeDeptName }, { label: "保养人员", content: worksheetInfo?.plan?.executeUserName }, { label: "计划开始时间", content: worksheetInfo?.plan?.firstPlanTime }, { label: "计划结束时间", content: worksheetInfo?.plan?.endPlanTime }, { label: "设备分类", content: worksheetInfo?.plan?.equiTypeName }, { label: "规则名称", content: worksheetInfo?.rule?.ruleName }, { label: "创建人", content: worksheetInfo?.plan?.createUserName }, { label: "创建时间", content: worksheetInfo?.plan?.createTime }, { label: "备注", content: worksheetInfo?.plan?.content }, ]; return detailsList; } export function tourTallyDetailFn(worksheetInfo) { let detailsList = [ { label: "工单单号", content: worksheetInfo?.workOrder?.workOrderCode }, { label: "计划单号", content: worksheetInfo?.plan?.planCode }, { label: "巡点检部门", content: worksheetInfo?.plan?.executeDeptName }, { label: "巡点检名称", content: worksheetInfo?.plan?.planName }, { label: "巡点检人员", content: worksheetInfo?.plan?.executeUserName }, { label: "巡点检周期", content: worksheetInfo?.rule?.cycleValue }, { label: "本次保养时间", content: worksheetInfo?.plan?.firstPlanTime }, { label: "设备分类", content: worksheetInfo?.plan?.equiTypeName }, { label: "规则名称", content: worksheetInfo?.rule?.ruleName }, { label: "创建人", content: worksheetInfo?.plan?.createUserName }, { label: "创建时间", content: worksheetInfo?.plan?.createTime }, // {label:"巡检周期",content:worksheetInfo?.cycleNum}, // {label:"计划开始时间",content:worksheetInfo?.planStartTime}, // {label:"计划结束时间",content:worksheetInfo?.expectTime}, // {label:"巡点检地图",icon:"iconfont icon-yizhihang_1"}, { label: "备注", content: worksheetInfo?.plan?.content }, { label: "操作方式/注意事项", content: worksheetInfo?.rule?.contentImage }, ]; return detailsList; } export function standingBookDetailFn(worksheetInfo, type) { let detailsList = []; let list1 = [ { label: "固定资产编号", content: worksheetInfo?.code }, { label: "设备编号", content: worksheetInfo?.type.name }, { label: "设备名称", content: worksheetInfo?.department }, { label: "权属部门", content: worksheetInfo?.staff.name }, { label: "权属人", content: worksheetInfo?.checkTime }, { label: "规格型号", content: worksheetInfo?.cycleNum }, ]; let list2 = [ { label: "数量", content: worksheetInfo?.code }, { label: "单位", content: worksheetInfo?.type.name }, { label: "维护部门", content: worksheetInfo?.department }, { label: "维护人", content: worksheetInfo?.staff.name }, { label: "品牌", content: worksheetInfo?.checkTime }, { label: "设备位置", content: worksheetInfo?.cycleNum }, { label: "供应商位置", content: worksheetInfo?.planStartTime }, { label: "供应商名称", content: worksheetInfo?.expectTime }, { label: "供应商电话", content: worksheetInfo?.expectTime }, { label: "设备用途", content: worksheetInfo?.creator.name }, { label: "保修期至", content: worksheetInfo?.creator.name }, { label: "投产日期", content: worksheetInfo?.creator.name }, { label: "采购日期", content: worksheetInfo?.creator.name }, { label: "生产日期", content: worksheetInfo?.creator.name }, { label: "建档日期", content: worksheetInfo?.creator.name }, { label: "购置金额", content: worksheetInfo?.creator.name }, { label: "颜色", content: worksheetInfo?.creator.name }, { label: "重量", content: worksheetInfo?.creator.name }, { label: "创建部门", content: worksheetInfo?.org.name }, { label: "创建人", content: worksheetInfo?.creator.name }, { label: "创建时间", content: worksheetInfo?.createTime }, { label: "备注", content: worksheetInfo?.remark }, ]; detailsList = type ? list2 : list1; return detailsList; } // 模具台账基本信息 export function moldsIndfoDetailFn(worksheetInfo, type) { let detailsList = []; let list1 = [ { label: "选择模具分类", content: worksheetInfo?.code }, { label: "单位", content: worksheetInfo?.type.name }, { label: "保修期至", content: worksheetInfo?.department }, { label: "固资编码", content: worksheetInfo?.staff.name }, { label: "维护部门", content: worksheetInfo?.checkTime }, { label: "投产日期", content: worksheetInfo?.cycleNum }, ]; let list2 = [ { label: "数量", content: worksheetInfo?.code }, { label: "单位", content: worksheetInfo?.type.name }, { label: "维护部门", content: worksheetInfo?.department }, { label: "维护人", content: worksheetInfo?.staff.name }, { label: "品牌", content: worksheetInfo?.checkTime }, { label: "设备位置", content: worksheetInfo?.cycleNum }, { label: "供应商位置", content: worksheetInfo?.planStartTime }, { label: "供应商名称", content: worksheetInfo?.expectTime }, { label: "供应商电话", content: worksheetInfo?.expectTime }, { label: "设备用途", content: worksheetInfo?.creator.name }, { label: "保修期至", content: worksheetInfo?.creator.name }, { label: "投产日期", content: worksheetInfo?.creator.name }, { label: "采购日期", content: worksheetInfo?.creator.name }, { label: "生产日期", content: worksheetInfo?.creator.name }, { label: "建档日期", content: worksheetInfo?.creator.name }, { label: "购置金额", content: worksheetInfo?.creator.name }, { label: "颜色", content: worksheetInfo?.creator.name }, { label: "重量", content: worksheetInfo?.creator.name }, { label: "创建部门", content: worksheetInfo?.org.name }, { label: "创建人", content: worksheetInfo?.creator.name }, { label: "创建时间", content: worksheetInfo?.createTime }, { label: "备注", content: worksheetInfo?.remark }, ]; detailsList = type ? list2 : list1; return detailsList; } export function isJobExls(type, data) { // 判断是否需要报工 type==1 报工 type==2 投料 if (type == 1) { let arr = [ { key: "reportNeedEquipment", name: "请添加生产设备", id: 2, }, { key: "reportNeedTurnover", name: "请添加周转车", id: 1, }, ]; arr.map((v) => { if (data.currentTaskDiagram[v.key] == 1) { switch (v.id) { case 1: //周转车 if (!data.turnover.length) { uni.showToast({ title: v.name, icon: "none", }); } return; case 2: //生产设备 if (!data.equipmentList.length) { uni.showToast({ title: v.name, icon: "none", }); } return; } } }); } else { console.log(data); let arrREd = [ { key: "feedNeedTurnover", name: "请添加周转车", id: 1, }, { key: "feedNeedEquipment", name: "请添加生产设备", id: 2, }, { key: "feedNeedMould", name: "请添加模具", id: 3, }, { key: "feedNeedBoat", name: "请添加舟皿", id: 4, }, { key: "feedNeedMateriel", name: "请添加物料", id: 5, }, // { // key: "feedNeedConsumableMaterial", // name: "请添加消耗材料", // id: 6, // }, // { // key: "feedNeedProduct", // name: "请添加产品", // id: 7, // }, { key: "feedNeedSemiProduct", name: "请添加半成品", id: 8, }, // { // key: "feedNeedJunkProduct", // name: "请添加废品", // id: 9, // }, // { // key: "feedNeedReworkProduct", // name: "请添加返工反修品", // id: 10, // }, { key: "feedNeedAridRegion", name: "请添加干燥区", id: 11, }, // { // key: "feedNeedAuxiliaryEquipment", // name: "请添加生产辅助设备", // id: 12, // }, // { // key: "feedNeedMeasuringEquipment", // name: "请添加仪表计量设备", // id: 13, // }, // { // key: "feedNeedQuality", // name: "请先质检", // id: 14, // }, ]; arrREd.map((v) => { if (data.currentTaskDiagram[v.key] == 1) { switch (v.id) { case 1: //周转车 if (!data.turnover.length) { uni.showToast({ title: v.name, icon: "none", }); } return; case 2: //生产设备 if (!data.equipmentList.length) { uni.showToast({ title: v.name, icon: "none", }); } return; case 3: //请添加模具 if (!data.modelList.length) { uni.showToast({ title: v.name, icon: "none", }); } return; case 4: //feedNeedBoat if (!data.palletList.length) { uni.showToast({ title: v.name, icon: "none", }); } return; case 5: //请添加物料 if (!data.instanceList.length) { uni.showToast({ title: v.name, icon: "none", }); } return; // case 6: // //生产设备 // if (!data.equipmentList.length) { // uni.showToast({ // title: v.name, // icon: "none", // }); // } // return; // case 7: // //生产设备 // if (!data.equipmentList.length) { // uni.showToast({ // title: v.name, // icon: "none", // }); // } // return; case 8: //半成品 if (!data.semiProductList.length) { uni.showToast({ title: v.name, icon: "none", }); } return; // case 9: // //生产设备 // if (!data.equipmentList.length) { // uni.showToast({ // title: v.name, // icon: "none", // }); // } // return; // case 10: // //生产设备 // if (!data.equipmentList.length) { // uni.showToast({ // title: v.name, // icon: "none", // }); // } // return; case 11: //干燥区 if (!data.aridRegionList.length) { uni.showToast({ title: v.name, icon: "none", }); } return; // case 12: // //生产设备 // if (!data.equipmentList.length) { // uni.showToast({ // title: v.name, // icon: "none", // }); // } // return; // case 13: // //生产设备 // if (!data.equipmentList.length) { // uni.showToast({ // title: v.name, // icon: "none", // }); // } // return; // case 14: // //生产设备 // if (!data.equipmentList.length) { // uni.showToast({ // title: v.name, // icon: "none", // }); // } // return; } } }); } }