| | |
| | | let loadingInstance; |
| | | let loadingStatus = false; |
| | | if (process.env.NODE_ENV == 'development') { |
| | | axios.defaults.baseURL = 'http://127.0.0.1:8099/'; |
| | | axios.defaults.baseURL = 'http://192.168.12.101:8099/'; |
| | | } |
| | | else if (process.env.NODE_ENV == 'debug') { |
| | | axios.defaults.baseURL = 'http://192.168.12.101:8099/'; |
| | |
| | | cnName: 'å·¥åä¿¡æ¯', |
| | | name: 'tomes/VV_Workinfo', |
| | | url: "/VV_Workinfo/", |
| | | sortName: "workOrder" |
| | | sortName: "CreateTime" |
| | | }); |
| | | const editFormFields = ref({"stackNoRange":""}); |
| | | const editFormOptions = ref([[{"title":"æå
æ°é","field":"stackNoRange","type":"number"}]]); |
| | |
| | | cnName: 'å·¥ååå²ä¿¡æ¯', |
| | | name: 'tomes/VV_Workinfo_hty', |
| | | url: "/VV_Workinfo_hty/", |
| | | sortName: "FinishTime" |
| | | sortName: "completedate" |
| | | }); |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | const searchFormFields = ref({"workOrder":"","jobID":"","drawingNo":"","productName":"","heatID":"","billetID":"","SN":"","processCode":"","CreateTime":"","FinishTime":"","operatetype":"","productDesc":""}); |
| | | const searchFormOptions = ref([[{"title":"å¾å·","field":"drawingNo","type":"like"},{"title":"å·¥ä½ä»¤å·","field":"workOrder","type":"like"},{"title":"å·¥åç¼å·","field":"jobID","type":"like"}],[{"title":"产ååç§°","field":"productName","type":"like"},{"title":"ç代å·","field":"heatID","type":"like"},{"title":"é¢å¯å·","field":"billetID","type":"like"}],[{"title":"车轮SNå·","field":"SN","type":"like"},{"dataKey":"WorkTypes","data":[],"title":"å·¥åç±»å","field":"processCode","type":"select"},{"dataKey":"WorkOperateTypes","data":[],"title":"æä½ç±»å","field":"operatetype","type":"select"}],[{"title":"å建æ¶é´","field":"CreateTime","type":"date"},{"title":"宿æ¶é´","field":"FinishTime","type":"date"},{"title":"产åæè¿°","field":"productDesc","type":"like"}]]); |
| | | const searchFormOptions = ref([[{"title":"å¾å·","field":"drawingNo","type":"like"},{"title":"å·¥ä½ä»¤å·","field":"workOrder","type":"like"},{"title":"å·¥åç¼å·","field":"jobID","type":"like"}],[{"title":"产ååç§°","field":"productName","type":"like"},{"title":"ç代å·","field":"heatID","type":"like"},{"title":"é¢å¯å·","field":"billetID","type":"like"}],[{"title":"车轮SNå·","field":"SN","type":"like"},{"dataKey":"WorkTypes","data":[],"title":"å·¥åç±»å","field":"processCode","type":"select"},{"dataKey":"WorkOperateTypes","data":[],"title":"æä½ç±»å","field":"operatetype","type":"select"}],[{"title":"å建æ¶é´","field":"CreateTime","type":"date"},{"title":"æä½æ¶é´","field":"completedate","type":"date"},{"title":"产åæè¿°","field":"productDesc","type":"like"}]]); |
| | | const columns = ref([{field:'mes_id',title:'å·¥å头表ID',hidden:true,type:'guid',width:110,require:true,align:'left',sort:true}, |
| | | {field:'workOrder',title:'å·¥ä½ä»¤å·',type:'string',sort:true,width:110,align:'left'}, |
| | | {field:'jobID',title:'å·¥åç¼å·',type:'string',sort:true,width:110,align:'left'}, |
| | |
| | | {field:'heatBatchID',title:'çå¤çæ¹æ¬¡',hidden:true,type:'string',width:110,align:'left'}, |
| | | {field:'Status',title:'å·¥åç¶æ',type:'string',width:110,align:'left'}, |
| | | {field:'FinishTime',title:'宿æ¶é´',type:'datetime',width:150,align:'left',sort:true}, |
| | | {field:'completedate',title:'æä½æ¶é´',type:'datetime',width:150,align:'left',sort:true}, |
| | | {field:'operatetype',title:'æä½ç±»å',type:'string',bind:{ key:'WorkOperateTypes',data:[]},width:110,align:'left'}, |
| | | {field:'compeletor',title:'æä½è
',type:'string',width:110,align:'left'}, |
| | | {field:'productDesc',title:'产åæè¿°',type:'string',width:180,align:'left'}]); |
| | |
| | | cnName: 'å·¥å头表', |
| | | name: 'tomes/dt_mes_head', |
| | | url: "/dt_mes_head/", |
| | | sortName: "ID" |
| | | sortName: "CreateTime" |
| | | }); |
| | | const editFormFields = ref({"skip_op_1":"","skip_op_2":"","skip_op_3":""}); |
| | | const editFormFields = ref({"stackNoRange":"","skip_op_1":"","skip_op_2":"","skip_op_3":""}); |
| | | const editFormOptions = ref([ |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "è§è§æ£æµ1", "required": true, "field": "skip_op_1", "type": "radio" }], |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "è§è§æ£æµ2", "required": true, "field": "skip_op_2", "type": "radio" }], |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "å·é²éæ¶²", "required": true, "field": "skip_op_3", "type": "radio" }], |
| | | [{"title":"æå
æ°é","field":"stackNoRange","type":"number"}], |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "è§è§æ£æµ1", "required": true, "field": "skip_op_1", "type": "select" }], |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "è§è§æ£æµ2", "required": true, "field": "skip_op_2", "type": "select" }], |
| | | [{ "dataKey": "skip_op_Status", "data": [], "title": "å·é²éæ¶²", "required": true, "field": "skip_op_3", "type": "select" }], |
| | | // [{ |
| | | // title: "æå®åºåº", field: "area", |
| | | // data: [ |
| | |
| | | const columns = ref([{field:'mes_id',title:'mes_id',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'}, |
| | | {field:'workOrder',title:'å·¥ä½ä»¤å·',type:'string',width:110,align:'left',sort:true}, |
| | | {field:'jobID',title:'å·¥åç¼å·',type:'string',width:110,align:'left'}, |
| | | {field:'reqID',title:'éæ±åå·',type:'string',width:110,align:'left'}, |
| | | {field:'reqIDLineNo',title:'éæ±åå·è¡å·',type:'string',width:110,align:'left'}, |
| | | {field:'materialCode',title:'ç©æç¼ç ',type:'string',width:110,align:'left'}, |
| | | // {field:'reqID',title:'éæ±åå·',type:'string',width:110,align:'left'}, |
| | | // {field:'reqIDLineNo',title:'éæ±åå·è¡å·',type:'string',width:110,align:'left'}, |
| | | // {field:'materialCode',title:'ç©æç¼ç ',type:'string',width:110,align:'left'}, |
| | | {field:'drawingNo',title:'å¾å·',type:'string',width:110,align:'left'}, |
| | | {field:'drawingNoVer',title:'ææ¯ç¶æ',type:'string',width:110,align:'left'}, |
| | | {field:'productName',title:'产ååç§°',type:'string',width:110,align:'left'}, |
| | | // {field:'productName',title:'产ååç§°',type:'string',width:110,align:'left'}, |
| | | {field:'processCode',title:'å·¥åç±»å',bind: { key: 'WorkTypes' },type:'string',width:110,align:'left'}, |
| | | {field:'quantity',title:'è®¡åæ°é',type:'int',width:110,align:'left'}, |
| | | {field:'finishNum',title:'宿æ°é',type:'int',width:110,align:'left'}, |
| | | {field:'area',title:'æå®åºåº',type:'string',width:110,align:'left'}, |
| | | // {field:'typeID',title:'è½®å代ç ',type:'string',width:110,align:'left'}, |
| | | {field:'stackNoRange',title:'æå
æ°é',type:'int',width:110,align:'left',sort:true}, |
| | | {field:'skip_op_1',title:'è§è§æ£æµ1',type:'bool',bind:{ key:'skip_op_Status',data:[]},width:110,require:true,align:'left'}, |
| | | {field:'skip_op_2',title:'è§è§æ£æµ2',type:'bool',bind:{ key:'skip_op_Status',data:[]},width:110,require:true,align:'left'}, |
| | | {field:'skip_op_3',title:'å·é²éæ¶²',type:'bool',bind:{ key:'skip_op_Status',data:[]},width:110,require:true,align:'left'}, |
| | | {field:'area',title:'æå®åºåº',type:'string',width:110,align:'left'}, |
| | | {field:'typeID',title:'è½®å代ç ',type:'string',width:110,align:'left'}, |
| | | {field:'stackNoRange',title:'æå
æ°é',type:'int',width:110,align:'left'}, |
| | | {field:'maxDiameterDiff',title:'è½®å¾åå·®',type:'decimal',width:110,align:'left'}, |
| | | // {field:'maxDiameterDiff',title:'è½®å¾åå·®',type:'decimal',width:110,align:'left'}, |
| | | {field:'expectedStartTime',title:'计åå¼å§æ¶é´',type:'datetime',width:150,align:'left',sort:true}, |
| | | {field:'expectedFinishTime',title:'计å宿æ¶é´',type:'datetime',width:150,align:'left',sort:true}, |
| | | {field:'CreateTime',title:'å建æ¶é´',type:'datetime',width:150,align:'left',sort:true}, |
| | |
| | | public string typeID { get; set; } |
| | | |
| | | /// <summary> |
| | | /// |
| | | ///æå
æ°é |
| | | /// </summary> |
| | | [Key] |
| | | [Display(Name = "stackNoRange")] |
| | |
| | | [Editable(true)] |
| | | public string productDesc { get; set; } |
| | | |
| | | |
| | | /// <summary> |
| | | ///æä½æ¶é´ |
| | | /// </summary> |
| | | [Display(Name = "æä½æ¶é´")] |
| | | [Column(TypeName = "datetime")] |
| | | [Editable(true)] |
| | | public DateTime? completedate { get; set; } |
| | | } |
| | | } |
| | |
| | | var station = stationinfoRepository.Find(x => x.area == areaCode && x.stationCode.Substring(x.stationCode.Length - 1, 1) == AreaNr.ToString()).FirstOrDefault(); |
| | | if (station != null) |
| | | { |
| | | if (station.quantity >= 5) |
| | | if (station.quantity >= Mes_Work.stackNoRange) |
| | | //if (station.quantity >= 5) |
| | | { |
| | | Pipeline_client.WriteByOrder("W_AlarmSignal", (Int16)2, name);//æ¥è¦ |
| | | WriteLog.Write_Log(name + "æ¾æå®æåºé", Wheel_SN, "车轮æ°é已满ï¼", $"åºåå·ï¼{AreaNr}ï¼\n车轮æ°ï¼{station.quantity}\né误信æ¯ï¼åºåå·è½¦è½®æ°é已满ï¼"); |
| | |
| | | .Where(x => x.enable |
| | | && x.stationCode != NGStation |
| | | && x.location_state == LocationStateEnum.Stroge.ToString() |
| | | && x.quantity < 5 |
| | | && x.quantity < Work.stackNoRange |
| | | //&& x.quantity < 5 |
| | | && x.stationType == Work.drawingNo |
| | | && x.Number == Work.workOrder |
| | | && x.heatNumber == Work.heatID) |
| | |
| | | .Where(x => x.enable |
| | | && x.stationCode != NGStation |
| | | && x.location_state == LocationStateEnum.Stroge.ToString() |
| | | && x.quantity < 5 |
| | | && x.quantity < Work.stackNoRange |
| | | //&& x.quantity < 5 |
| | | && x.stationType == Work.drawingNo |
| | | && x.Number == Work.workOrder) |
| | | .OrderByDescending(x => x.quantity) |
| | |
| | | #endregion |
| | | |
| | | #region æç车轮å å第å个æ¶ä¸åå¦å¤ä¸ä¸ªçå·çå
¥åºä»»å¡ |
| | | if (Stationinfo.quantity + 1 >= 4) |
| | | //if (Stationinfo.quantity + 1 >= 4) |
| | | if (Stationinfo.quantity + 1 >= Work.stackNoRange - 1) |
| | | { |
| | | var stationinfo = Stations.Where(x => x.enable && x.stationCode != NGStation && x.stationCode != Stationinfo.stationCode && x.location_state == LocationStateEnum.Stroge.ToString() && x.quantity > 0).FirstOrDefault(); |
| | | if (stationinfo != null) |
| | |
| | | dt_stationinfo Stationinfo = Stations.Where(x => x.enable |
| | | && x.stationCode == NGStation |
| | | && x.location_state == LocationStateEnum.Stroge.ToString() |
| | | && x.quantity < 5 |
| | | && x.quantity < Work.stackNoRange |
| | | //&& x.quantity < 5 |
| | | && x.stationType == Work.drawingNo).FirstOrDefault(); |
| | | |
| | | if (Stationinfo == null) |
| | |
| | | tasktype = "TaskType_OutsourceInbound"; |
| | | AGVTask.AddQueueTask(stationinfoRepository, agvtaskRepository, stationinfo, tasktype, Work); |
| | | } |
| | | |
| | | #region MyRegion |
| | | /// <summary> |
| | | /// AGVä»»å¡ |
| | | /// </summary> |
| | | //public void agvtask(Idt_stationinfoRepository stationinfoRepository, dt_stationinfo stationinfo, VV_Mes_Workinfo Work, string tasktype) |
| | | //{ |
| | | // VOLContext Context = new VOLContext(); |
| | | // Idt_agvtaskRepository agvtaskRepository = new dt_agvtaskRepository(Context); |
| | | // Idt_mes_headRepository mes_HeadRepository = new dt_mes_headRepository(Context); |
| | | |
| | | // var task = agvtaskRepository.Find(x => x.agv_fromaddress == stationinfo.stationCode).FirstOrDefault(); |
| | | // if (task != null) return; |
| | | // //var mes_Head = mes_HeadRepository.Find(x => x.jobID == Work.jobID).FirstOrDefault(); |
| | | // //if (mes_Head == null) |
| | | // //{ |
| | | // // stationinfo.remark = "触åå
¥åºä»»å¡,使ªæ¾å°å·¥å头表ï¼"; |
| | | // // stationinfo.location_state = LocationStateEnum.Abnormal.ToString(); |
| | | // // stationinfoRepository.Update(stationinfo, true); |
| | | // // return; |
| | | // //} |
| | | |
| | | // dt_stationinfo TargetLocation = null; |
| | | // //int CompeletedNum = Convert.ToInt32(mes_Head.quantity) - Convert.ToInt32(mes_Head.finishNum); |
| | | // //if (mes_Head.quantity <= 50) tasktype = "TaskType_OutsourceInbound"; |
| | | |
| | | // if (tasktype == "TaskType_OutsourceInbound" || !string.IsNullOrEmpty(Work.area)) |
| | | // TargetLocation = StationTask.GetEmptyLocation(stationinfoRepository); |
| | | // else if (tasktype == "TaskType_Inbound") |
| | | // TargetLocation = GetLocation.GetEmptyLocation(stationinfoRepository, Work, stationinfo); |
| | | // //TargetLocation = GetLocation.GetEmptyLocation(stationinfoRepository, mes_Head, stationinfo); |
| | | // if (TargetLocation != null) |
| | | // { |
| | | // dt_agvtask agvtask = new dt_agvtask() |
| | | // { |
| | | // agv_fromaddress = stationinfo.stationCode, |
| | | // agv_id = Guid.NewGuid(), |
| | | // agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"), |
| | | // agv_grade = 1, |
| | | // agv_createtime = DateTime.Now, |
| | | // agv_taskstate = "Create", |
| | | // agv_materielid = stationinfo.stationType, |
| | | // agv_qty = stationinfo.quantity, |
| | | // agv_tasktype = tasktype, |
| | | // agv_toaddress = TargetLocation.stationCode, |
| | | // agv_userid = "ç³»ç»", |
| | | // bindSN = stationinfo.bindSN, |
| | | // agv_worktype = Convert.ToInt32(Work.processCode), |
| | | // agv_materbarcode = Work.materialCode, |
| | | // agv_Traytype = stationinfo.tray_type, |
| | | // jobID = stationinfo.Number, |
| | | // agv_TrayStatus = stationinfo.tray_status |
| | | // }; |
| | | // agvtaskRepository.Add(agvtask, true); |
| | | // stationinfo.location_state = LocationStateEnum.InBusy.ToString(); |
| | | // stationinfoRepository.Update(stationinfo, true); |
| | | // TargetLocation.location_state = LocationStateEnum.InBusy.ToString(); |
| | | // TargetLocation.stationType = agvtask.agv_materielid; |
| | | // TargetLocation.heatNumber = stationinfo.heatNumber; |
| | | // TargetLocation.Number = agvtask.jobID; |
| | | // stationinfoRepository.Update(TargetLocation, true); |
| | | // } |
| | | //} |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | |
| | | dt_stationinfo TargetLocation = null; |
| | | string tasktype = ""; |
| | | |
| | | if (item.quantity == 5) |
| | | //if (item.quantity == 5) |
| | | if (item.quantity == work.stackNoRange) |
| | | { |
| | | if (!string.IsNullOrEmpty(work.area) || item.stationCode.Contains("3")) |
| | | tasktype = "TaskType_OutsourceInbound"; |
| | |
| | | tasktype = "TaskType_Inbound"; |
| | | |
| | | AGVTask.AddQueueTask(stationinfoRepository, agvtaskRepository, item, tasktype, work); |
| | | |
| | | #region MyRegion |
| | | //if (/*(mesinfo.quantity <= 50 &&*/ !string.IsNullOrEmpty(work.area) || item.stationCode.Contains("3")) |
| | | //{ |
| | | // //todo 寻æ¾å¯æ¾è´§å¤åæ¾è´§å° |
| | | // tasktype = "TaskType_OutsourceInbound"; |
| | | // TargetLocation = GetEmptyLocation(stationinfoRepository); |
| | | |
| | | //} |
| | | //else |
| | | //{ |
| | | // //todo: è°ç¨WMSæ¥å£åå»ºä»»å¡ |
| | | // tasktype = "TaskType_Inbound"; |
| | | // TargetLocation = GetLocation.GetEmptyLocation(stationinfoRepository, work, item); |
| | | //} |
| | | //if (TargetLocation != null) |
| | | //{ |
| | | // dt_agvtask agvtask = new dt_agvtask() |
| | | // { |
| | | // agv_fromaddress = item.stationCode, |
| | | // agv_id = Guid.NewGuid(), |
| | | // agv_tasknum = IdenxManager.GetTaskNo("KH-", "WMS"), |
| | | // agv_grade = 1, |
| | | // agv_createtime = DateTime.Now, |
| | | // agv_taskstate = "Create", |
| | | // agv_materielid = item.stationType, |
| | | // agv_qty = item.quantity, |
| | | // agv_tasktype = tasktype, |
| | | // agv_toaddress = TargetLocation.stationCode, |
| | | // agv_userid = "ç³»ç»", |
| | | // bindSN = item.bindSN, |
| | | // agv_worktype = Convert.ToInt32(work.processCode), |
| | | // agv_materbarcode = work.materialCode, |
| | | // agv_Traytype = item.tray_type, |
| | | // jobID = item.Number, |
| | | // agv_TrayStatus = item.tray_status |
| | | // }; |
| | | // agvtaskRepository.Add(agvtask, true); |
| | | |
| | | // item.location_state = LocationStateEnum.InBusy.ToString(); |
| | | // stationinfoRepository.Update(item, true); |
| | | |
| | | // TargetLocation.location_state = LocationStateEnum.InBusy.ToString(); |
| | | // TargetLocation.stationType = agvtask.agv_materielid; |
| | | // TargetLocation.heatNumber = item.heatNumber; |
| | | // TargetLocation.billetID = item.billetID; |
| | | // TargetLocation.Number = agvtask.jobID; |
| | | // stationinfoRepository.Update(TargetLocation, true); |
| | | // WriteDBLog.Success("å建å
¥åºä»»å¡", $"ä»»å¡ç¼å·ï¼{agvtask.agv_tasknum}", "PCS"); |
| | | //} |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | quantity = workInfo.quantity, |
| | | reqID = workInfo.reqID, |
| | | reqIDLineNo = workInfo.reqIDLineNo, |
| | | stackNoRange = workInfo.stackNoRange, |
| | | stackNoRange = 5, |
| | | //stackNoRange = workInfo.stackNoRange, |
| | | typeID = workInfo.typeID, |
| | | workOrder = workInfo.workOrder, |
| | | processCode = workInfo.processCode, |