山东雷驰
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
78 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{nEup:function(t,e,a){"use strict";a.r(e),a.d(e,"TaskModule",function(){return ua});var o=a("PCNd"),i=a("tyNb"),r=a("mrSG"),c=a("pHS2"),n=a("3Pt+"),s=a("0IaG"),l=a("weu1"),u=a("zmn3"),m=a("fXoL"),d=a("bUwk"),b=a("Olgc"),p=a("kmnG"),h=a("qFsG"),f=a("d3UM"),g=a("ofXK"),v=a("7OFo"),_=a("1jcm"),C=a("bTqV"),k=a("FKr1"),T=a("sYmb");function U(t,e){if(1&t&&(m.Ub(0,"span"),m.Hc(1),m.Tb()),2&t){const t=m.fc().$implicit;m.Cb(1),m.Ic(t.warehouse.name)}}function O(t,e){if(1&t&&(m.Ub(0,"mat-option",15),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t),m.Cb(1),m.Ic(t.name)}}function w(t,e){if(1&t&&(m.Ub(0,"mat-optgroup",12),m.Fc(1,U,2,1,"span",13),m.Ub(2,"span"),m.Hc(3),m.Tb(),m.Fc(4,O,2,2,"mat-option",14),m.Tb()),2&t){const t=e.$implicit;m.Cb(1),m.lc("ngIf",!t.index),m.Cb(2),m.Ic(t.name),m.Cb(1),m.lc("ngForOf",t.cell)}}const y=function(){return[2,2,2]},S=function(t){return{delimiter:"-",blocks:t}};let F=(()=>{class t{constructor(t,e,a,o,i){if(this._data=t,this._formBuilder=e,this._httpService=a,this._toastService=o,this._dialogRef=i,this.save=()=>Object(r.a)(this,void 0,void 0,function*(){void 0!==(yield this._httpService.post("tasks",{operation:"infeed",task:{warehouse:this._form.controls.original.value.warehouse,barcode:this._form.controls.barcode.value,original:this._form.controls.original.value.id,destination:this._form.controls.destination.value?"name:"+this._form.controls.destination.value:null,priority:0,manual:this._form.controls.manual.value}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&(this._toastService.show("\u64cd\u4f5c\u6210\u529f"),this._dialogRef.close(!0))}),this._form=this._formBuilder.group({barcode:["",[n.u.required]],original:["",[n.u.required]],destination:[""],manual:[!1]}),this._data.length){const t=[];this._data.forEach(e=>e.area.forEach((a,o)=>t.push({id:a.id,name:a.name,warehouse:{id:e.id,name:e.name},index:o}))),this._httpService.get(`cells?${Object(l.a)(Object(u.a)(t,t=>`area=${t.id}&`),"")}type=Station&in=true`).then(e=>{const a=Object(c.a)(e.items,"area");this._station=t.filter(t=>!!a[t.id]&&(a[t.id].forEach(e=>e.warehouse=t.warehouse.id),t.cell=a[t.id],!0)),1==this._station.length&&1==e.items.length&&this._form.controls.original.setValue(e.items[0])})}}get form(){return this._form}get station(){return this._station}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(s.a),m.Ob(n.d),m.Ob(d.a),m.Ob(b.a),m.Ob(s.g))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-main-infeed"]],decls:34,vars:32,consts:[["mat-dialog-title",""],["autocomplete","off",3,"formGroup"],["mat-dialog-content",""],["matInput","","formControlName","barcode","required",""],["formControlName","original","required",""],["class","mat-optgroup-lv2",4,"ngFor","ngForOf"],["matInput","","formControlName","destination",3,"cleave"],["mat-dialog-actions","","align","end"],["formControlName","manual","color","primary"],[1,"spacer"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""],[1,"mat-optgroup-lv2"],[4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(m.Ub(0,"h2",0),m.Hc(1),m.gc(2,"translate"),m.Tb(),m.Ub(3,"form",1),m.Ub(4,"div",2),m.Ub(5,"mat-form-field"),m.Ub(6,"mat-label"),m.Hc(7),m.gc(8,"translate"),m.Tb(),m.Pb(9,"input",3),m.Tb(),m.Ub(10,"mat-form-field"),m.Ub(11,"mat-label"),m.Hc(12),m.gc(13,"translate"),m.Tb(),m.Ub(14,"mat-select",4),m.Fc(15,w,5,3,"mat-optgroup",5),m.Tb(),m.Tb(),m.Ub(16,"mat-form-field"),m.Ub(17,"mat-label"),m.Hc(18),m.gc(19,"translate"),m.Tb(),m.Pb(20,"input",6),m.Tb(),m.Tb(),m.Ub(21,"div",7),m.Ub(22,"mat-slide-toggle",8),m.Hc(23),m.gc(24,"translate"),m.Tb(),m.Pb(25,"span",9),m.Ub(26,"button",10),m.bc("click",function(){return e.save()}),m.Hc(27),m.gc(28,"uppercase"),m.gc(29,"translate"),m.Tb(),m.Ub(30,"button",11),m.Hc(31),m.gc(32,"uppercase"),m.gc(33,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.Cb(1),m.Ic(m.hc(2,11,"routes.task.infeed")),m.Cb(2),m.lc("formGroup",e.form),m.Cb(4),m.Ic(m.hc(8,13,"routes.task.barcode")),m.Cb(5),m.Ic(m.hc(13,15,"routes.task.station")),m.Cb(3),m.lc("ngForOf",e.station),m.Cb(3),m.Ic(m.hc(19,17,"routes.task.target")),m.Cb(2),m.lc("cleave",m.pc(30,S,m.oc(29,y))),m.Cb(3),m.Ic(m.hc(24,19,"routes.task.main.manual")),m.Cb(3),m.lc("disabled",e.form.invalid),m.Cb(1),m.Ic(m.hc(28,21,m.hc(29,23,"shared.dialog.ok"))),m.Cb(4),m.Ic(m.hc(32,25,m.hc(33,27,"shared.dialog.cancel"))))},directives:[s.h,n.v,n.o,n.g,s.e,p.b,p.e,h.b,n.c,n.n,n.f,n.t,f.a,g.m,v.a,s.c,_.a,C.a,s.d,k.n,g.n,k.o],pipes:[T.d,g.v],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}.mat-dialog-actions[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1 1 auto}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label{height:auto!important}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label>span{display:block}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label>span:last-child{margin-left:16px}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label>span:last-child:not(:first-child){margin-top:-8px}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-option{padding-left:48px!important}"]}),t})();function I(t,e){if(1&t&&(m.Ub(0,"span"),m.Hc(1),m.Tb()),2&t){const t=m.fc().$implicit;m.Cb(1),m.Ic(t.warehouse.name)}}function H(t,e){if(1&t&&(m.Ub(0,"mat-option",14),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t),m.Cb(1),m.Ic(t.name)}}function $(t,e){if(1&t&&(m.Ub(0,"mat-optgroup",11),m.Fc(1,I,2,1,"span",12),m.Ub(2,"span"),m.Hc(3),m.Tb(),m.Fc(4,H,2,2,"mat-option",13),m.Tb()),2&t){const t=e.$implicit;m.Cb(1),m.lc("ngIf",!t.index),m.Cb(2),m.Ic(t.name),m.Cb(1),m.lc("ngForOf",t.cell)}}let x=(()=>{class t{constructor(t,e,a,o,i){if(this._data=t,this._formBuilder=e,this._httpService=a,this._toastService=o,this._dialogRef=i,this.save=()=>Object(r.a)(this,void 0,void 0,function*(){void 0!==(yield this._httpService.post("tasks",{operation:"outfeed",task:{warehouse:this._form.controls.destination.value.warehouse,barcode:this._form.controls.barcode.value,destination:this._form.controls.destination.value.id,priority:0,manual:this._form.controls.manual.value}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&(this._toastService.show("\u64cd\u4f5c\u6210\u529f"),this._dialogRef.close(!0))}),this._form=this._formBuilder.group({barcode:["",[n.u.required]],destination:["",[n.u.required]],manual:[!1]}),this._data.length){const t=[];this._data.forEach(e=>e.area.forEach((a,o)=>t.push({id:a.id,name:a.name,warehouse:{id:e.id,name:e.name},index:o}))),this._httpService.get(`cells?${Object(l.a)(Object(u.a)(t,t=>`area=${t.id}&`),"")}type=Station&out=true`).then(e=>{const a=Object(c.a)(e.items,"area");this._station=t.filter(t=>!!a[t.id]&&(a[t.id].forEach(e=>e.warehouse=t.warehouse.id),t.cell=a[t.id],!0)),1==this._station.length&&1==e.items.length&&this._form.controls.destination.setValue(e.items[0])})}}get form(){return this._form}get station(){return this._station}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(s.a),m.Ob(n.d),m.Ob(d.a),m.Ob(b.a),m.Ob(s.g))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-main-outfeed"]],decls:29,vars:25,consts:[["mat-dialog-title",""],["autocomplete","off",3,"formGroup"],["mat-dialog-content",""],["matInput","","formControlName","barcode","required",""],["formControlName","destination","required",""],["class","mat-optgroup-lv2",4,"ngFor","ngForOf"],["mat-dialog-actions","","align","end"],["formControlName","manual","color","primary"],[1,"spacer"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""],[1,"mat-optgroup-lv2"],[4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(m.Ub(0,"h2",0),m.Hc(1),m.gc(2,"translate"),m.Tb(),m.Ub(3,"form",1),m.Ub(4,"div",2),m.Ub(5,"mat-form-field"),m.Ub(6,"mat-label"),m.Hc(7),m.gc(8,"translate"),m.Tb(),m.Pb(9,"input",3),m.Tb(),m.Ub(10,"mat-form-field"),m.Ub(11,"mat-label"),m.Hc(12),m.gc(13,"translate"),m.Tb(),m.Ub(14,"mat-select",4),m.Fc(15,$,5,3,"mat-optgroup",5),m.Tb(),m.Tb(),m.Tb(),m.Ub(16,"div",6),m.Ub(17,"mat-slide-toggle",7),m.Hc(18),m.gc(19,"translate"),m.Tb(),m.Pb(20,"span",8),m.Ub(21,"button",9),m.bc("click",function(){return e.save()}),m.Hc(22),m.gc(23,"uppercase"),m.gc(24,"translate"),m.Tb(),m.Ub(25,"button",10),m.Hc(26),m.gc(27,"uppercase"),m.gc(28,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.Cb(1),m.Ic(m.hc(2,9,"routes.task.outfeed")),m.Cb(2),m.lc("formGroup",e.form),m.Cb(4),m.Ic(m.hc(8,11,"routes.task.barcode")),m.Cb(5),m.Ic(m.hc(13,13,"routes.task.station")),m.Cb(3),m.lc("ngForOf",e.station),m.Cb(3),m.Ic(m.hc(19,15,"routes.task.main.manual")),m.Cb(3),m.lc("disabled",e.form.invalid),m.Cb(1),m.Ic(m.hc(23,17,m.hc(24,19,"shared.dialog.ok"))),m.Cb(4),m.Ic(m.hc(27,21,m.hc(28,23,"shared.dialog.cancel"))))},directives:[s.h,n.v,n.o,n.g,s.e,p.b,p.e,h.b,n.c,n.n,n.f,n.t,f.a,g.m,s.c,_.a,C.a,s.d,k.n,g.n,k.o],pipes:[T.d,g.v],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}.mat-dialog-actions[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1 1 auto}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label{height:auto!important}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label>span{display:block}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label>span:last-child{margin-left:16px}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label>span:last-child:not(:first-child){margin-top:-8px}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-option{padding-left:48px!important}"]}),t})();var M=a("uT1x"),q=a("LV2V"),G=a("jLvU"),P=a("5WsY"),j=a("EUcb"),N=function(t){return Object(j.a)(t)&&Object(P.a)(t)},E=Object(q.a)(function(t){return Object(G.a)(Object(M.a)(t,1,N,!0))}),V=a("CpTu");const R=function(){return[2,2,2]},W=function(t){return{delimiter:"-",blocks:t}};let B=(()=>{class t{constructor(t,e,a,o,i){this._data=t,this._formBuilder=e,this._httpService=a,this._toastService=o,this._dialogRef=i,this.save=()=>Object(r.a)(this,void 0,void 0,function*(){let t=yield this._httpService.get(`stocks?${Object(l.a)(Object(u.a)(E(...Object(u.a)(this._data,"area")),t=>`area=${t.id}&`),"")}barcode=${this._form.controls.barcode.value}`);t.total?(t=yield this._httpService.post("tasks",{operation:"transfer",task:{warehouse:Object(V.a)(this._data,["name",t.items[0].warehouse]).id,barcode:this._form.controls.barcode.value,destination:"name:"+this._form.controls.destination.value,priority:0,manual:this._form.controls.manual.value}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}),void 0!==t&&(this._toastService.show("\u64cd\u4f5c\u6210\u529f"),this._dialogRef.close(!0))):this._toastService.show("\u5e93\u5b58\u4e0d\u5b58\u5728")}),this._form=this._formBuilder.group({barcode:["",[n.u.required]],destination:["",[n.u.required]],manual:[!1]})}get form(){return this._form}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(s.a),m.Ob(n.d),m.Ob(d.a),m.Ob(b.a),m.Ob(s.g))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-main-transfer"]],decls:28,vars:28,consts:[["mat-dialog-title",""],["autocomplete","off",3,"formGroup"],["mat-dialog-content",""],["matInput","","formControlName","barcode","required",""],["matInput","","formControlName","destination","required","",3,"cleave"],["mat-dialog-actions","","align","end"],["formControlName","manual","color","primary"],[1,"spacer"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""]],template:function(t,e){1&t&&(m.Ub(0,"h2",0),m.Hc(1),m.gc(2,"translate"),m.Tb(),m.Ub(3,"form",1),m.Ub(4,"div",2),m.Ub(5,"mat-form-field"),m.Ub(6,"mat-label"),m.Hc(7),m.gc(8,"translate"),m.Tb(),m.Pb(9,"input",3),m.Tb(),m.Ub(10,"mat-form-field"),m.Ub(11,"mat-label"),m.Hc(12),m.gc(13,"translate"),m.Tb(),m.Pb(14,"input",4),m.Tb(),m.Tb(),m.Ub(15,"div",5),m.Ub(16,"mat-slide-toggle",6),m.Hc(17),m.gc(18,"translate"),m.Tb(),m.Pb(19,"span",7),m.Ub(20,"button",8),m.bc("click",function(){return e.save()}),m.Hc(21),m.gc(22,"uppercase"),m.gc(23,"translate"),m.Tb(),m.Ub(24,"button",9),m.Hc(25),m.gc(26,"uppercase"),m.gc(27,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.Cb(1),m.Ic(m.hc(2,9,"routes.task.transfer")),m.Cb(2),m.lc("formGroup",e.form),m.Cb(4),m.Ic(m.hc(8,11,"routes.task.barcode")),m.Cb(5),m.Ic(m.hc(13,13,"routes.task.target")),m.Cb(2),m.lc("cleave",m.pc(26,W,m.oc(25,R))),m.Cb(3),m.Ic(m.hc(18,15,"routes.task.main.manual")),m.Cb(3),m.lc("disabled",e.form.invalid),m.Cb(1),m.Ic(m.hc(22,17,m.hc(23,19,"shared.dialog.ok"))),m.Cb(4),m.Ic(m.hc(26,21,m.hc(27,23,"shared.dialog.cancel"))))},directives:[s.h,n.v,n.o,n.g,s.e,p.b,p.e,h.b,n.c,n.n,n.f,n.t,v.a,s.c,_.a,C.a,s.d],pipes:[T.d,g.v],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}.mat-dialog-actions[_ngcontent-%COMP%] .spacer[_ngcontent-%COMP%]{flex:1 1 auto}"]}),t})();var L=a("EDME"),A=a("S+vS"),Q=a("Xi3o"),z=a("TmDA"),D=a("NFeN"),K=a("Qu3c"),J=a("++hd");const X=["$crud"],Y=["$state"],Z=["$priority"],tt=["$time"],et=["$qs"],at=["$qsSelect"],ot=["$stateText"],it=["$area"];function rt(t,e){1&t&&(m.Ub(0,"mat-icon",18),m.gc(1,"translate"),m.Hc(2,"watch_later"),m.Tb()),2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.state.waiting"))}function ct(t,e){1&t&&(m.Ub(0,"mat-icon",19),m.gc(1,"translate"),m.Hc(2,"delete"),m.Tb()),2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.state.CallDelete"))}function nt(t,e){1&t&&(m.Ub(0,"mat-icon",19),m.gc(1,"translate"),m.Hc(2,"swap_vertical_circle"),m.Tb()),2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.state.Wcsgot"))}function st(t,e){1&t&&(m.Ub(0,"mat-icon",20),m.gc(1,"translate"),m.Hc(2,"error"),m.Tb()),2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.state.WaiteWmsResult"))}function lt(t,e){if(1&t&&(m.Ub(0,"mat-icon",20),m.gc(1,"translate"),m.Hc(2,"error"),m.Tb()),2&t){const t=m.fc().$implicit;m.nc("matTooltip","",m.hc(1,2,"routes.task.main.state.blocked"),"\uff1a",t.remark||"\u672a\u77e5\u539f\u56e0","")}}function ut(t,e){if(1&t&&(m.Ub(0,"mat-icon",21),m.gc(1,"translate"),m.Hc(2,"highlight_off"),m.Tb()),2&t){const t=m.fc().$implicit;m.nc("matTooltip","",m.hc(1,2,"routes.task.main.state.ScanError"),"\uff1a",t.remark||"\u672a\u77e5\u539f\u56e0","")}}function mt(t,e){if(1&t&&(m.Ub(0,"mat-icon",21),m.gc(1,"translate"),m.Hc(2,"highlight_off"),m.Tb()),2&t){const t=m.fc().$implicit;m.nc("matTooltip","",m.hc(1,2,"routes.task.main.state.UploadError"),"\uff1a",t.remark||"\u672a\u77e5\u539f\u56e0","")}}function dt(t,e){if(1&t&&(m.Ub(0,"mat-icon",21),m.gc(1,"translate"),m.Hc(2,"highlight_off"),m.Tb()),2&t){const t=m.fc().$implicit;m.nc("matTooltip","",m.hc(1,2,"routes.task.main.state.WmsResultFail"),"\uff1a",t.remark||"\u672a\u77e5\u539f\u56e0","")}}function bt(t,e){if(1&t&&(m.Ub(0,"mat-icon",21),m.gc(1,"translate"),m.Hc(2,"highlight_off"),m.Tb()),2&t){const t=m.fc().$implicit;m.nc("matTooltip","",m.hc(1,2,"routes.task.main.state.AgvFail"),"\uff1a",t.remark||"\u672a\u77e5\u539f\u56e0","")}}function pt(t,e){if(1&t&&(m.Ub(0,"mat-icon",21),m.gc(1,"translate"),m.Hc(2,"highlight_off"),m.Tb()),2&t){const t=m.fc().$implicit;m.nc("matTooltip","",m.hc(1,2,"routes.task.main.state.Fail"),"\uff1a",t.remark||"\u672a\u77e5\u539f\u56e0","")}}function ht(t,e){1&t&&(m.Ub(0,"mat-icon",19),m.gc(1,"translate"),m.Hc(2,"swap_vertical_circle"),m.Tb()),2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.state.running"))}function ft(t,e){1&t&&(m.Sb(0,12),m.Fc(1,rt,3,3,"mat-icon",13),m.Fc(2,ct,3,3,"mat-icon",14),m.Fc(3,nt,3,3,"mat-icon",14),m.Fc(4,st,3,3,"mat-icon",15),m.Fc(5,lt,3,4,"mat-icon",15),m.Fc(6,ut,3,4,"mat-icon",16),m.Fc(7,mt,3,4,"mat-icon",16),m.Fc(8,dt,3,4,"mat-icon",16),m.Fc(9,bt,3,4,"mat-icon",16),m.Fc(10,pt,3,4,"mat-icon",16),m.Fc(11,ht,3,3,"mat-icon",17),m.Rb()),2&t&&(m.lc("ngSwitch",e.$implicit.state),m.Cb(1),m.lc("ngSwitchCase","Waiting"),m.Cb(1),m.lc("ngSwitchCase","CallDelete"),m.Cb(1),m.lc("ngSwitchCase","Wcsgot"),m.Cb(1),m.lc("ngSwitchCase","WaiteWmsResult"),m.Cb(1),m.lc("ngSwitchCase","Blocked"),m.Cb(1),m.lc("ngSwitchCase","ScanError"),m.Cb(1),m.lc("ngSwitchCase","UploadError"),m.Cb(1),m.lc("ngSwitchCase","WmsResultFail"),m.Cb(1),m.lc("ngSwitchCase","AgvFail"),m.Cb(1),m.lc("ngSwitchCase","Fail"))}function gt(t,e){1&t&&(m.Ub(0,"span"),m.Hc(1),m.gc(2,"translate"),m.Tb()),2&t&&(m.Cb(1),m.Ic(m.hc(2,1,"routes.task.main.priority")))}function vt(t,e){1&t&&m.Pb(0,"span")}function _t(t,e){1&t&&(m.Sb(0,12),m.Fc(1,gt,3,3,"span",22),m.Fc(2,vt,1,0,"span",23),m.Rb()),2&t&&(m.lc("ngSwitch",e.$implicit.priority),m.Cb(1),m.lc("ngSwitchCase",10))}function Ct(t,e){1&t&&(m.Hc(0),m.gc(1,"date")),2&t&&m.Ic(m.ic(1,1,e.$implicit.time,"yyyy-MM-dd HH:mm:ss"))}function kt(t,e){1&t&&(m.Hc(0),m.gc(1,"translate")),2&t&&m.Ic(m.hc(1,1,"routes.material.enum.qs."+e.$implicit.qualityState))}function Tt(t,e){if(1&t&&(m.Ub(0,"mat-option",26),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t.code),m.Cb(1),m.Ic(t.name)}}function Ut(t,e){if(1&t&&(m.Ub(0,"mat-select",24),m.bc("ngModelChange",function(t){return e.$implicit.qualityState=t}),m.Fc(1,Tt,2,2,"mat-option",25),m.Tb()),2&t){const t=e.$implicit,a=m.fc();m.lc("ngModel",t.qualityState)("disabled",!0),m.Cb(1),m.lc("ngForOf",a.qualityState)}}function Ot(t,e){1&t&&(m.Hc(0),m.gc(1,"translate")),2&t&&m.Ic(m.hc(1,1,"routes.task.main.state."+e.$implicit.state))}function wt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",28),m.bc("click",function(){return m.wc(t),m.fc(2).infeed()}),m.Hc(1),m.gc(2,"uppercase"),m.gc(3,"translate"),m.Tb(),m.Ub(4,"button",28),m.bc("click",function(){return m.wc(t),m.fc(2).outfeed()}),m.Hc(5),m.gc(6,"uppercase"),m.gc(7,"translate"),m.Tb(),m.Ub(8,"button",28),m.bc("click",function(){return m.wc(t),m.fc(2).transfer()}),m.Hc(9),m.gc(10,"uppercase"),m.gc(11,"translate"),m.Tb()}2&t&&(m.Cb(1),m.Ic(m.hc(2,3,m.hc(3,5,"routes.task.infeed"))),m.Cb(4),m.Ic(m.hc(6,7,m.hc(7,9,"routes.task.outfeed"))),m.Cb(4),m.Ic(m.hc(10,11,m.hc(11,13,"routes.task.transfer"))))}function yt(t,e){1&t&&m.Fc(0,wt,12,15,"ng-template",null,27,m.Gc)}function St(t,e){1&t&&(m.Ub(0,"p"),m.Hc(1),m.gc(2,"translate"),m.Tb(),m.Ub(3,"ul",31),m.Ub(4,"li",32),m.Ub(5,"span"),m.Hc(6),m.gc(7,"translate"),m.Tb(),m.Tb(),m.Ub(8,"li",33),m.Ub(9,"span"),m.Hc(10),m.gc(11,"translate"),m.Tb(),m.Tb(),m.Ub(12,"li",33),m.Ub(13,"span"),m.Hc(14),m.gc(15,"translate"),m.Tb(),m.Tb(),m.Ub(16,"li",34),m.Ub(17,"span"),m.Hc(18),m.gc(19,"translate"),m.Tb(),m.Tb(),m.Ub(20,"li",34),m.Ub(21,"span"),m.Hc(22),m.gc(23,"translate"),m.Tb(),m.Tb(),m.Ub(24,"li",34),m.Ub(25,"span"),m.Hc(26),m.gc(27,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.Cb(1),m.Ic(m.hc(2,7,"shared.operation.dyeing")),m.Cb(5),m.Ic(m.hc(7,9,"routes.task.main.state.Running")),m.Cb(4),m.Ic(m.hc(11,11,"routes.task.main.state.Blocked")),m.Cb(4),m.Ic(m.hc(15,13,"routes.task.main.state.WaiteWmsResult")),m.Cb(4),m.Ic(m.hc(19,15,"routes.task.main.state.ScanError")),m.Cb(4),m.Ic(m.hc(23,17,"routes.task.main.state.UploadError")),m.Cb(4),m.Ic(m.hc(27,19,"routes.task.main.state.WmsResultFail")))}const Ft=function(t){return{"app-foreground-primary":t}};function It(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",29),m.bc("click",function(){m.wc(t);const e=m.fc();return e.colorful=!e.colorful}),m.Ub(1,"mat-icon"),m.Hc(2,"brush"),m.Tb(),m.Fc(3,St,28,21,"ng-template",null,30,m.Gc),m.Tb()}if(2&t){const t=m.uc(4),e=m.fc();m.lc("matTooltipTemplate",t)("ngClass",m.pc(2,Ft,e.colorful))}}function Ht(t,e){if(1&t&&(m.Ub(0,"mat-option",26),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t.id),m.Cb(1),m.Ic(t.name)}}function $t(t,e){if(1&t&&(m.Ub(0,"mat-optgroup",38),m.Fc(1,Ht,2,2,"mat-option",25),m.Tb()),2&t){const t=e.$implicit;m.lc("label",t.name),m.Cb(1),m.lc("ngForOf",t.area)}}function xt(t,e){if(1&t&&(m.Ub(0,"mat-form-field",35),m.Ub(1,"mat-label"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Ub(4,"mat-select",36),m.Fc(5,$t,2,2,"mat-optgroup",37),m.Tb(),m.Tb()),2&t){const t=e.$implicit,a=m.fc();m.lc("formGroup",t),m.Cb(2),m.Ic(m.hc(3,3,"routes.task.area")),m.Cb(3),m.lc("ngForOf",a.area)}}function Mt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().setPriority(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"trending_up"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.setpriority"))}function qt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().calldelete(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"delete"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.delete"))}function Gt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().reupload(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"replay"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.reupload"))}function Pt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().localcomplete(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"keyboard_tab"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.localComplete"))}function jt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().checkComplete(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"replay"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.reupload"))}function Nt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().recompletenohiwms(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"keyboard_tab"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.localComplete"))}function Et(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().checkComplete(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"check"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.checkComplete"))}function Vt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().cancel(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"close"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.cancel"))}function Rt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().checkComplete(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"sync"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.recompleteForAgv"))}function Wt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().recompletenoagv(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"sync_disabled"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.directCompleteForAgv"))}function Bt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().checkComplete(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"check"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.checkComplete"))}function Lt(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",40),m.bc("click",function(){m.wc(t);const e=m.fc().$implicit;return m.fc().cancel(e)}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"close"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.main.operation.cancel"))}function At(t,e){1&t&&(m.Sb(0,12),m.Fc(1,Mt,4,3,"button",39),m.Fc(2,qt,4,3,"button",39),m.Fc(3,Gt,4,3,"button",39),m.Fc(4,Pt,4,3,"button",39),m.Fc(5,jt,4,3,"button",39),m.Fc(6,Nt,4,3,"button",39),m.Fc(7,Et,4,3,"button",39),m.Fc(8,Vt,4,3,"button",39),m.Fc(9,Rt,4,3,"button",39),m.Fc(10,Wt,4,3,"button",39),m.Fc(11,Bt,4,3,"button",39),m.Fc(12,Lt,4,3,"button",39),m.Rb()),2&t&&(m.lc("ngSwitch",e.$implicit.state),m.Cb(1),m.lc("ngSwitchCase","Waiting"),m.Cb(1),m.lc("ngSwitchCase","Waiting"),m.Cb(1),m.lc("ngSwitchCase","UploadError"),m.Cb(1),m.lc("ngSwitchCase","UploadError"),m.Cb(1),m.lc("ngSwitchCase","WmsResultFail"),m.Cb(1),m.lc("ngSwitchCase","WmsResultFail"),m.Cb(1),m.lc("ngSwitchCase","ScanError"),m.Cb(1),m.lc("ngSwitchCase","ScanError"),m.Cb(1),m.lc("ngSwitchCase","AgvFail"),m.Cb(1),m.lc("ngSwitchCase","AgvFail"),m.Cb(1),m.lc("ngSwitchCase","Fail"),m.Cb(1),m.lc("ngSwitchCase","Fail"))}let Qt=(()=>{class t{constructor(t,e,a,o){this._dialogService=t,this._httpService=e,this._toastService=a,this._i18nService=o,this._colorful=!0,this.dyeing=t=>{if(this.colorful)switch(t.state){case"Running":return"app-background-primary-lighter";case"Blocked":case"WaiteWmsResult":return"app-background-accent-lighter";case"ScanError":case"UploadError":case"WmsResultFail":case"AgvFail":case"Fail":return"app-background-warn-lighter"}return null},this.infeed=()=>Object(r.a)(this,void 0,void 0,function*(){(yield this._dialogService.open(F,{data:this._area}))&&this._template.refresh()}),this.outfeed=()=>Object(r.a)(this,void 0,void 0,function*(){(yield this._dialogService.open(x,{data:this._area}))&&this._template.refresh()}),this.transfer=()=>Object(r.a)(this,void 0,void 0,function*(){(yield this._dialogService.open(B,{data:this._area}))&&this._template.refresh()}),this.reupload=t=>Object(r.a)(this,void 0,void 0,function*(){var e="";"UploadError"==t.state&&(e=this._i18nService.translate("routes.task.main.operation.reupload")),"WmsResultFail"==t.state&&(e=this._i18nService.translate("routes.task.main.operation.reupload")),(yield this._dialogService.open(L.a,{data:e}))&&(this._template.loading=!0,void 0!==(yield this._httpService.post("tasks",{operation:"ReuploadHiWMS",task:{id:t.id,manual:!0}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&this._toastService.show("\u64cd\u4f5c\u6210\u529f"),yield this._template.refresh(),this._template.loading=!1)}),this.localcomplete=t=>Object(r.a)(this,void 0,void 0,function*(){var e="";"UploadError"==t.state&&(e=this._i18nService.translate("routes.task.main.operation.localComplete")),"WmsResultFail"==t.state&&(e=this._i18nService.translate("routes.task.main.operation.localComplete")),(yield this._dialogService.open(L.a,{data:e}))&&(this._template.loading=!0,void 0!==(yield this._httpService.post("tasks",{operation:"SetRollByLocalComplete",task:{id:t.id,manual:!0}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&this._toastService.show("\u64cd\u4f5c\u6210\u529f"),yield this._template.refresh(),this._template.loading=!1)}),this.checkComplete=t=>Object(r.a)(this,void 0,void 0,function*(){var e="";"ScanError"==t.state&&(e=this._i18nService.translate("routes.task.main.operation.checkComplete")),"Fail"==t.state&&(e=this._i18nService.translate("routes.task.main.operation.checkComplete")),"WmsResultFail"==t.state&&(e=this._i18nService.translate("routes.task.main.operation.reupload")),"AgvFail"==t.state&&(e=this._i18nService.translate("routes.task.main.operation.recompleteForAgv")),(yield this._dialogService.open(L.a,{data:e}))&&(this._template.loading=!0,void 0!==(yield this._httpService.post("tasks",{operation:"Complete",task:{id:t.id,manual:!0}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&this._toastService.show("\u64cd\u4f5c\u6210\u529f"),yield this._template.refresh(),this._template.loading=!1)}),this.cancel=t=>Object(r.a)(this,void 0,void 0,function*(){var e=this._i18nService.translate("routes.task.main.operation.cancel");(yield this._dialogService.open(L.a,{data:e}))&&(this._template.loading=!0,void 0!==(yield this._httpService.post("tasks",{operation:"Cancel",task:{id:t.id,barcode:t.barcode,manual:!0}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&this._toastService.show("\u64cd\u4f5c\u6210\u529f"),yield this._template.refresh(),this._template.loading=!1)}),this.recompletenoagv=t=>Object(r.a)(this,void 0,void 0,function*(){var e=this._i18nService.translate("routes.task.main.operation.directCompleteForAgv");(yield this._dialogService.open(L.a,{data:e}))&&(this._template.loading=!0,void 0!==(yield this._httpService.post("tasks",{operation:"RecompleteForNoAgv",task:{id:t.id,manual:!0,tag:"1"}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&this._toastService.show("\u64cd\u4f5c\u6210\u529f"),yield this._template.refresh(),this._template.loading=!1)}),this.recompletenohiwms=t=>Object(r.a)(this,void 0,void 0,function*(){var e=this._i18nService.translate("routes.task.main.operation.localComplete");(yield this._dialogService.open(L.a,{data:e}))&&(this._template.loading=!0,void 0!==(yield this._httpService.post("tasks",{operation:"RecompleteForNoHiwms",task:{id:t.id,manual:!0,tag:"1"}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&this._toastService.show("\u64cd\u4f5c\u6210\u529f"),yield this._template.refresh(),this._template.loading=!1)}),this.calldelete=t=>Object(r.a)(this,void 0,void 0,function*(){var e=this._i18nService.translate("routes.task.main.operation.delete");(yield this._dialogService.open(L.a,{data:e}))&&(this._template.loading=!0,void 0!==(yield this._httpService.post("tasks",{operation:"CallDelete",task:{id:t.id,barcode:t.barcode}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&this._toastService.show("\u64cd\u4f5c\u6210\u529f"),yield this._template.refresh(),this._template.loading=!1)}),this.setPriority=t=>Object(r.a)(this,void 0,void 0,function*(){var e=this._i18nService.translate("routes.task.main.operation.uppriority");(yield this._dialogService.open(L.a,{data:e}))&&(this._template.loading=!0,void 0!==(yield this._httpService.post("tasks",{operation:"SetPriority",task:{id:t.id,priority:10}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&this._toastService.show("\u64cd\u4f5c\u6210\u529f"),yield this._template.refresh(),this._template.loading=!1)})}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,function*(){const t=yield this._httpService.join(this._httpService.get("warehouses"),this._httpService.get("areas"),this._httpService.get("items?name=qualityState"));let e=Object(c.a)(t[1].items,"warehouse");this._area=t[0].items.filter(t=>t.area=e[t.id]),e=t[1].items.map(t=>t.id),this._qualityState=t[2].items,this._defination=[{id:"state",header:"routes.task.state",template:this._stateTextColumn,filter:{order:1,field:"text"}},{id:"barcode",header:"routes.task.barcode",filter:{order:2,field:"text"}},{id:"type",header:"routes.task.type"},{id:"priority",template:this._priortityolumn,header:"routes.task.priority"},{id:"goodsName",header:"routes.task.goodsName"},,{id:"qualityState",header:"routes.material.qs",template:this._qsSelectColumn,filter:{order:6,field:"select",range:this._qualityState}},{id:"warehouse",header:"routes.task.warehouse"},{id:"area",header:"routes.task.area",filter:{order:1,field:"multi-select",template:this._areaControl,default:e},display:null},{id:"original",header:"routes.task.original",filter:{order:3,field:"text"}},{id:"destination",header:"routes.task.destination",filter:{order:4,field:"text"}},{id:"time",header:"routes.task.timestamp",template:this._timeColumn,filter:{order:5,field:"date-range"}},{id:"operator",header:"routes.task.operator"},{id:"tag",header:"routes.task.tag",display:null},{id:"remark",header:"routes.task.remark"}],this._api="tasks"})}get defination(){return this._defination}get api(){return this._api}get area(){return this._area}get qualityState(){return this._qualityState}get colorful(){return this._colorful}set colorful(t){this._colorful=t}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(A.a),m.Ob(d.a),m.Ob(b.a),m.Ob(Q.a))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-main"]],viewQuery:function(t,e){if(1&t&&(m.Oc(X,!0),m.Oc(Y,!0),m.Oc(Z,!0),m.Oc(tt,!0),m.Oc(et,!0),m.Oc(at,!0),m.Oc(ot,!0),m.Oc(it,!0)),2&t){let t;m.tc(t=m.cc())&&(e._template=t.first),m.tc(t=m.cc())&&(e._stateColumn=t.first),m.tc(t=m.cc())&&(e._priortityolumn=t.first),m.tc(t=m.cc())&&(e._timeColumn=t.first),m.tc(t=m.cc())&&(e._qsColumn=t.first),m.tc(t=m.cc())&&(e._qsSelectColumn=t.first),m.tc(t=m.cc())&&(e._stateTextColumn=t.first),m.tc(t=m.cc())&&(e._areaControl=t.first)}},decls:21,vars:10,consts:[[3,"selectable","addable","editable","deletable","row-class","defination","api","toolbar-buttons-template","toolbar-icons-template","row-operation-template"],["$crud",""],["$state",""],["$priority",""],["$time",""],["$qs",""],["$qsSelect",""],["$stateText",""],[4,"ngif"],["$dyeing",""],["$area",""],["$operation",""],[3,"ngSwitch"],["class","app-foreground-secondary",3,"matTooltip",4,"ngSwitchCase"],["class","app-foreground-primary",3,"matTooltip",4,"ngSwitchCase"],["class","app-foreground-accent",3,"matTooltip",4,"ngSwitchCase"],["class","app-foreground-warn",3,"matTooltip",4,"ngSwitchCase"],["class","app-foreground-primary",3,"matTooltip",4,"ngSwitchDefault"],[1,"app-foreground-secondary",3,"matTooltip"],[1,"app-foreground-primary",3,"matTooltip"],[1,"app-foreground-accent",3,"matTooltip"],[1,"app-foreground-warn",3,"matTooltip"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[2,"width","100px",3,"ngModel","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["$add",""],["mat-button","","color","primary",3,"click"],["mat-icon-button","",3,"matTooltipTemplate","ngClass","click"],["$tooltip",""],[1,"tooltip-ul"],[1,"app-foreground-primary"],[1,"app-foreground-accent"],[1,"app-foreground-warn"],[3,"formGroup"],["formControlName","area","multiple",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],["mat-icon-button","",3,"matTooltip","click",4,"ngSwitchCase"],["mat-icon-button","",3,"matTooltip","click"]],template:function(t,e){if(1&t&&(m.Ub(0,"crud-template",0,1),m.Fc(2,ft,12,11,"ng-template",null,2,m.Gc),m.Fc(4,_t,3,2,"ng-template",null,3,m.Gc),m.Fc(6,Ct,2,4,"ng-template",null,4,m.Gc),m.Fc(8,kt,2,3,"ng-template",null,5,m.Gc),m.Fc(10,Ut,2,3,"ng-template",null,6,m.Gc),m.Fc(12,Ot,2,3,"ng-template",null,7,m.Gc),m.Fc(14,yt,2,0,void 0,8),m.Fc(15,It,5,4,"ng-template",null,9,m.Gc),m.Fc(17,xt,6,5,"ng-template",null,10,m.Gc),m.Fc(19,At,13,13,"ng-template",null,11,m.Gc),m.Tb()),2&t){const t=m.uc(16),a=m.uc(20);m.lc("selectable",!1)("addable",!1)("editable",!1)("deletable",!1)("row-class",e.dyeing)("defination",e.defination)("api",e.api)("toolbar-icons-template",t)("row-operation-template",a),m.Cb(14),m.lc("ngif",!1)}},directives:[z.a,g.p,g.q,g.r,D.a,K.c,f.a,n.n,n.q,g.m,k.o,C.a,J.a,g.l,p.b,n.o,n.g,p.e,n.f,k.n],pipes:[T.d,g.e,g.v],styles:[".tooltip-ul[_ngcontent-%COMP%]{margin-top:-8px;margin-bottom:0;padding-left:0;list-style-type:disc;list-style-position:inside}.tooltip-ul[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff}"]}),t})();var zt=a("BeL+");function Dt(t,e){if(1&t&&(m.Ub(0,"span"),m.Hc(1),m.Tb()),2&t){const t=m.fc().$implicit;m.Cb(1),m.Ic(t.warehouse.name)}}function Kt(t,e){if(1&t&&(m.Ub(0,"mat-option",13),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t),m.Cb(1),m.Ic(t.name)}}function Jt(t,e){if(1&t&&(m.Ub(0,"mat-optgroup",10),m.Fc(1,Dt,2,1,"span",11),m.Ub(2,"span"),m.Hc(3),m.Tb(),m.Fc(4,Kt,2,2,"mat-option",12),m.Tb()),2&t){const t=e.$implicit;m.Cb(1),m.lc("ngIf",!t.index),m.Cb(2),m.Ic(t.name),m.Cb(1),m.lc("ngForOf",t.cell)}}let Xt=(()=>{class t{constructor(t,e,a,o,i){if(this._data=t,this._formBuilder=e,this._httpService=a,this._toastService=o,this._dialogRef=i,this.outfeed=()=>Object(r.a)(this,void 0,void 0,function*(){const t=this._form.controls.destination.value,e=this._station.filter(e=>e.warehouse.id==t.warehouse);let a=yield this._httpService.get(`stocks?pallet=true&excludeTask=true&${Object(l.a)(Object(u.a)(e,t=>`area=${t.id}&`),"")}barcode=${this._form.controls.barcode.value||""}`);if((null==a?void 0:a.total)>0){let e=0;for(const o of a.items)if(void 0!==(yield this._httpService.post("tasks",{operation:"outfeed",task:{warehouse:t.warehouse,barcode:o.barcode,destination:t.id,priority:0,manual:!1}}).catch(()=>{}))&&++e==this._form.controls.quantity.value)break;this._toastService.show(`\u64cd\u4f5c\u5b8c\u6210\uff1a\u6210\u529f ${e} \u4e2a\u3002`)}else this._toastService.show("\u64cd\u4f5c\u5b8c\u6210\uff1a\u6210\u529f 0 \u4e2a\u3002");this._dialogRef.close(!0)}),this._form=this._formBuilder.group({quantity:[null,[n.u.required]],barcode:null,destination:[null,[n.u.required]]}),this._data.length){const t=[];this._data.forEach(e=>e.area.forEach((a,o)=>t.push({id:a.id,name:a.name,warehouse:{id:e.id,name:e.name},index:o}))),this._httpService.get(`cells?${Object(l.a)(Object(u.a)(t,t=>`area=${t.id}&`),"")}type=Station&out=true`).then(e=>{const a=Object(c.a)(e.items,"area");this._station=t.filter(t=>!!a[t.id]&&(t.cell=a[t.id],!0))})}}get form(){return this._form}get station(){return this._station}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(s.a),m.Ob(n.d),m.Ob(d.a),m.Ob(b.a),m.Ob(s.g))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-pallet-batch"]],decls:30,vars:25,consts:[["mat-dialog-title",""],["autocomplete","off",3,"formGroup"],["mat-dialog-content",""],["matInput","","formControlName","quantity","type","number","min","1","required",""],["matInput","","formControlName","barcode","required",""],["formControlName","destination","required",""],["class","mat-optgroup-lv2",4,"ngFor","ngForOf"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""],[1,"mat-optgroup-lv2"],[4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(m.Ub(0,"h2",0),m.Hc(1),m.gc(2,"translate"),m.Tb(),m.Ub(3,"form",1),m.Ub(4,"div",2),m.Ub(5,"mat-form-field"),m.Ub(6,"mat-label"),m.Hc(7),m.gc(8,"translate"),m.Tb(),m.Pb(9,"input",3),m.Tb(),m.Ub(10,"mat-form-field"),m.Ub(11,"mat-label"),m.Hc(12),m.gc(13,"translate"),m.Tb(),m.Pb(14,"input",4),m.Tb(),m.Ub(15,"mat-form-field"),m.Ub(16,"mat-label"),m.Hc(17),m.gc(18,"translate"),m.Tb(),m.Ub(19,"mat-select",5),m.Fc(20,Jt,5,3,"mat-optgroup",6),m.Tb(),m.Tb(),m.Tb(),m.Ub(21,"div",7),m.Ub(22,"button",8),m.bc("click",function(){return e.outfeed()}),m.Hc(23),m.gc(24,"uppercase"),m.gc(25,"translate"),m.Tb(),m.Ub(26,"button",9),m.Hc(27),m.gc(28,"uppercase"),m.gc(29,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.Cb(1),m.Ic(m.hc(2,9,"routes.task.pallet.batch")),m.Cb(2),m.lc("formGroup",e.form),m.Cb(4),m.Ic(m.hc(8,11,"routes.task.pallet.quantity")),m.Cb(5),m.Ic(m.hc(13,13,"routes.task.pallet.feature")),m.Cb(5),m.Ic(m.hc(18,15,"routes.task.pallet.station")),m.Cb(3),m.lc("ngForOf",e.station),m.Cb(2),m.lc("disabled",e.form.invalid),m.Cb(1),m.Ic(m.hc(24,17,m.hc(25,19,"shared.dialog.ok"))),m.Cb(4),m.Ic(m.hc(28,21,m.hc(29,23,"shared.dialog.cancel"))))},directives:[s.h,n.v,n.o,n.g,s.e,p.b,p.e,h.b,n.c,n.r,n.n,n.f,n.t,f.a,g.m,s.c,C.a,s.d,k.n,g.n,k.o],pipes:[T.d,g.v],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label{height:auto!important}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label>span{display:block}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label>span:last-child{margin-left:16px}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-optgroup-label>span:last-child:not(:first-child){margin-top:-8px}.mat-optgroup.mat-optgroup-lv2[_ngcontent-%COMP%] >.mat-option{padding-left:48px!important}"]}),t})();function Yt(t,e){if(1&t&&(m.Ub(0,"mat-option",10),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t),m.Cb(1),m.Ic(t.name)}}function Zt(t,e){if(1&t&&(m.Ub(0,"mat-optgroup",8),m.Fc(1,Yt,2,2,"mat-option",9),m.Tb()),2&t){const t=e.$implicit;m.lc("label",t.name),m.Cb(1),m.lc("ngForOf",t.cell)}}let te=(()=>{class t{constructor(t,e,a,o){this._data=t,this._formBuilder=e,this._httpService=a,this._dialogRef=o,this.save=()=>Object(r.a)(this,void 0,void 0,function*(){this._dialogRef.close(this._form.controls.station.value)}),this._form=this._formBuilder.group({station:[null,[n.u.required]]}),this._data.length&&this._httpService.get(`cells?${Object(l.a)(Object(u.a)(this._data,t=>`area=${t.id}&`),"")}type=Station&out=true`).then(e=>{const a=Object(c.a)(e.items,"area");this._station=t.filter(t=>!!a[t.id]&&(a[t.id].forEach(e=>e.warehouse=t.warehouse),t.cell=a[t.id],!0)),1==this._station.length&&1==e.items.length&&this._form.controls.station.setValue(e.items[0])})}get form(){return this._form}get station(){return this._station}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(s.a),m.Ob(n.d),m.Ob(d.a),m.Ob(s.g))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-pallet-outfeed"]],decls:20,vars:19,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["autocomplete","off",3,"formGroup"],["formControlName","station","required",""],[3,"label",4,"ngFor","ngForOf"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""],[3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(m.Ub(0,"h2",0),m.Hc(1),m.gc(2,"translate"),m.Tb(),m.Ub(3,"div",1),m.Ub(4,"form",2),m.Ub(5,"mat-form-field"),m.Ub(6,"mat-label"),m.Hc(7),m.gc(8,"translate"),m.Tb(),m.Ub(9,"mat-select",3),m.Fc(10,Zt,2,2,"mat-optgroup",4),m.Tb(),m.Tb(),m.Tb(),m.Tb(),m.Ub(11,"div",5),m.Ub(12,"button",6),m.bc("click",function(){return e.save()}),m.Hc(13),m.gc(14,"uppercase"),m.gc(15,"translate"),m.Tb(),m.Ub(16,"button",7),m.Hc(17),m.gc(18,"uppercase"),m.gc(19,"translate"),m.Tb(),m.Tb()),2&t&&(m.Cb(1),m.Ic(m.hc(2,7,"routes.task.pallet.outfeed")),m.Cb(3),m.lc("formGroup",e.form),m.Cb(3),m.Ic(m.hc(8,9,"routes.task.pallet.station")),m.Cb(3),m.lc("ngForOf",e.station),m.Cb(2),m.lc("disabled",e.form.invalid),m.Cb(1),m.Ic(m.hc(14,11,m.hc(15,13,"shared.dialog.ok"))),m.Cb(4),m.Ic(m.hc(18,15,m.hc(19,17,"shared.dialog.cancel"))))},directives:[s.h,s.e,n.v,n.o,n.g,p.b,p.e,f.a,n.n,n.f,n.t,g.m,s.c,C.a,s.d,k.n,k.o],pipes:[T.d,g.v],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}"]}),t})();const ee=["$crud"],ae=["$area"];function oe(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",5),m.bc("click",function(){return m.wc(t),m.fc().batch()}),m.Hc(1),m.gc(2,"uppercase"),m.gc(3,"translate"),m.Tb()}2&t&&(m.Cb(1),m.Ic(m.hc(2,1,m.hc(3,3,"routes.task.pallet.batch"))))}function ie(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",6),m.bc("click",function(){return m.wc(t),m.fc().outfeed()}),m.gc(1,"translate"),m.Ub(2,"mat-icon"),m.Hc(3,"get_app"),m.Tb(),m.Tb()}2&t&&m.mc("matTooltip",m.hc(1,1,"routes.task.pallet.outfeed"))}function re(t,e){if(1&t&&(m.Ub(0,"mat-option",12),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t.id),m.Cb(1),m.Ic(t.name)}}function ce(t,e){if(1&t&&(m.Ub(0,"mat-optgroup",10),m.Fc(1,re,2,2,"mat-option",11),m.Tb()),2&t){const t=e.$implicit;m.lc("label",t.name),m.Cb(1),m.lc("ngForOf",t.area)}}function ne(t,e){if(1&t&&(m.Ub(0,"mat-form-field",7),m.Ub(1,"mat-label"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Ub(4,"mat-select",8),m.Fc(5,ce,2,2,"mat-optgroup",9),m.Tb(),m.Tb()),2&t){const t=e.$implicit,a=m.fc();m.lc("formGroup",t),m.Cb(2),m.Ic(m.hc(3,3,"routes.task.area")),m.Cb(3),m.lc("ngForOf",a.area)}}let se=(()=>{class t{constructor(t,e,a){this._dialogService=t,this._httpService=e,this._toastService=a,this.batch=()=>Object(r.a)(this,void 0,void 0,function*(){(yield this._dialogService.open(Xt,{data:this.area}))&&this._template.refresh()}),this.outfeed=()=>Object(r.a)(this,void 0,void 0,function*(){const t=Object(zt.a)(this._template.selection.selected.map(t=>t.warehouse));if(t.length>1)return void this._toastService.show("\u4e0d\u5141\u8bb8\u6279\u91cf\u64cd\u4f5c\u4e0d\u540c\u4ed3\u5e93\u7684\u9879\u76ee");let e=yield this._dialogService.open(te,{data:this.area.find(e=>e.name==t[0]).area});if(e){let t=0,a=0;this._template.loading=!0;for(const o of this._template.selection.selected)e=yield this._httpService.post("tasks",{operation:"outfeed",task:{warehouse:e.warehouse,barcode:o.barcode,destination:e.id,priority:0,manual:!1}}).catch(()=>{}),void 0!==e?t++:a++;this._toastService.show(`\u64cd\u4f5c\u5b8c\u6210\uff1a\u6210\u529f ${t} \u4e2a\uff1b\u5931\u8d25 ${a} \u4e2a\u3002`),t&&(yield this._template.refresh()),this._template.loading=!1}})}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,function*(){const t=yield this._httpService.join(this._httpService.get("warehouses"),this._httpService.get("areas"));let e=Object(c.a)(t[1].items,"warehouse");this._area=t[0].items.filter(t=>t.area=e[t.id]),e=t[1].items.map(t=>t.id),this._defination=[{id:"warehouse",header:"routes.task.pallet.warehouse"},{id:"area",header:"routes.task.pallet.area",filter:{field:"multi-select",template:this._areaControl,default:e},display:null},{id:"cell",header:"routes.task.pallet.cell",filter:{field:"text"}},{id:"barcode",header:"routes.task.pallet.barcode"},{id:"barcode",header:"routes.task.pallet.feature",filter:{field:"text"},display:null}],this._api="stocks"})}get defination(){return this._defination}get api(){return this._api}get area(){return this._area}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(A.a),m.Ob(d.a),m.Ob(b.a))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-pallet"]],viewQuery:function(t,e){if(1&t&&(m.Oc(ee,!0),m.Oc(ae,!0)),2&t){let t;m.tc(t=m.cc())&&(e._template=t.first),m.tc(t=m.cc())&&(e._areaControl=t.first)}},decls:8,vars:8,consts:[[3,"addable","editable","deletable","defination","api","query","toolbar-buttons-template","toolbar-selection-template"],["$crud",""],["$batch",""],["$outfeed",""],["$area",""],["mat-button","","color","primary",3,"click"],["mat-icon-button","",3,"matTooltip","click"],[3,"formGroup"],["formControlName","area","multiple",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){if(1&t&&(m.Ub(0,"crud-template",0,1),m.Fc(2,oe,4,5,"ng-template",null,2,m.Gc),m.Fc(4,ie,4,3,"ng-template",null,3,m.Gc),m.Fc(6,ne,6,5,"ng-template",null,4,m.Gc),m.Tb()),2&t){const t=m.uc(3),a=m.uc(5);m.lc("addable",!1)("editable",!1)("deletable",!1)("defination",e.defination)("api",e.api)("query","pallet=true&excludeTask=true")("toolbar-buttons-template",t)("toolbar-selection-template",a)}},directives:[z.a,C.a,K.c,D.a,p.b,n.o,n.g,p.e,f.a,n.n,n.f,g.m,k.n,k.o],pipes:[g.v,T.d],styles:[""]}),t})();var le=a("owWc"),ue=a("QibW"),me=a("A5z7");function de(t,e){if(1&t&&(m.Ub(0,"mat-option",17),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t.id),m.Cb(1),m.Ic(t.name)}}function be(t,e){if(1&t){const t=m.Vb();m.Ub(0,"mat-chip",18),m.bc("removed",function(){m.wc(t);const a=e.index;return m.fc().enum.remove(a)}),m.Hc(1),m.Ub(2,"mat-icon",19),m.Hc(3,"cancel"),m.Tb(),m.Tb()}if(2&t){const t=e.$implicit;m.Cb(1),m.Jc(" ",t," ")}}function pe(t,e){if(1&t&&(m.Ub(0,"mat-form-field"),m.Ub(1,"mat-label"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Pb(4,"input",20),m.Tb()),2&t){const t=e.$implicit;m.Cb(2),m.Ic(m.hc(3,2,"routes.task.disablement."+t)),m.Cb(2),m.lc("formControlName",t)}}const he=function(){return[2,2,2]},fe=function(t){return{delimiter:"-",blocks:t}},ge=function(){return["zmin","zmax","xmin","xmax","ymin","ymax"]};let ve=(()=>{class t{constructor(t,e,a,o,i,c){this._data=t,this._formBuilder=e,this._httpService=a,this._i18nService=o,this._toastService=i,this._dialogRef=c,this.enum={append:t=>{var e;const a=this._form.controls.enum;8!=(null===(e=t.value)||void 0===e?void 0:e.length)||a.value.includes(t.value)||(a.value.push(t.value),a.updateValueAndValidity()),t.input.value=null},remove:t=>{const e=this._form.controls.enum;e.value.splice(t,1),e.updateValueAndValidity()}},this.change=t=>{if(this._mode=t.value,"enum"==this._mode){for(const t in this._form.controls)"enum"!=t&&"warehouse"!=t&&(this._form.controls[t].setValue(null),this._form.controls[t].disable());this._form.controls.enum.enable()}else{for(const t in this._form.controls)"enum"!=t&&"warehouse"!=t&&this._form.controls[t].enable();this._form.controls.enum.value.length=0,this._form.controls.enum.disable()}},this.save=()=>Object(r.a)(this,void 0,void 0,function*(){if(!this._form.controls.cellTag.value||""==this._form.controls.cellTag.value.trim())return void this._toastService.show("\u8bf7\u586b\u5199\u7981\u7528\u539f\u56e0");let t;if("enum"==this._mode)t=this._form.controls.enum.value;else{t=[];for(let e=this._form.controls.xmin.value;e<=this._form.controls.xmax.value;e++)for(let a=this._form.controls.ymin.value;a<=this._form.controls.ymax.value;a++)for(let o=this._form.controls.zmin.value;o<=this._form.controls.zmax.value;o++)t.push(o.toString().padStart(2,"0")+"-"+e.toString().padStart(2,"0")+"-"+a.toString().padStart(2,"0"))}const e=yield this._httpService.post("disablements/batch",{method:"create",warehouse:this._form.controls.warehouse.value,data:t,celltag:this._form.controls.cellTag.value}).catch(()=>{this._toastService.show(this._i18nService.translate("shared.notification.fail")),this._dialogRef.close({success:!1})});if(void 0!==e){let t=0,a=0,o=0;for(const i of e)switch(i){case!1:t++;break;case!0:a++;break;default:o++}this._toastService.show("enum"==this._mode&&o?`\u64cd\u4f5c\u5b8c\u6210\uff1a\u6210\u529f ${t} \u4e2a\uff1b\u5931\u8d25 ${a} \u4e2a\uff1b\u65e0\u6548\u9879 ${o} \u4e2a\u3002`:`\u64cd\u4f5c\u5b8c\u6210\uff1a\u6210\u529f ${t} \u4e2a\uff1b\u5931\u8d25 ${a} \u4e2a\u3002`),this._dialogRef.close({success:!0})}}),this._form=this._formBuilder.group({warehouse:[1==t.length?t[0].id:null,[n.u.required]],enum:[[],[n.u.required]],xmin:[{value:null,disabled:!0},[n.u.required]],xmax:[{value:null,disabled:!0},[n.u.required]],ymin:[{value:null,disabled:!0},[n.u.required]],ymax:[{value:null,disabled:!0},[n.u.required]],zmin:[{value:null,disabled:!0},[n.u.required]],zmax:[{value:null,disabled:!0},[n.u.required]],cellTag:[null,null]}),this._mode="enum"}get form(){return this._form}get warehouse(){return this._data}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(s.a),m.Ob(n.d),m.Ob(d.a),m.Ob(Q.a),m.Ob(b.a),m.Ob(s.g))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-disablement-edit"]],decls:41,vars:40,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["autocomplete","off",3,"formGroup"],["formControlName","warehouse","required",""],[3,"value",4,"ngFor","ngForOf"],["name","mode","value","enum","checked","true",3,"change"],["formControlName","enum","required",""],["$chip",""],[3,"removed",4,"ngFor","ngForOf"],[3,"matChipInputFor","matChipInputAddOnBlur","cleave","matChipInputTokenEnd"],["name","mode","value","range",3,"change"],[1,"grid"],[4,"ngFor","ngForOf"],["matInput","","formControlName","cellTag","required",""],["mat-dialog-actions","","align","end"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""],[3,"value"],[3,"removed"],["matChipRemove",""],["matInput","","type","number","min","0","required","",3,"formControlName"]],template:function(t,e){if(1&t&&(m.Ub(0,"h2",0),m.Hc(1),m.gc(2,"translate"),m.Tb(),m.Ub(3,"div",1),m.Ub(4,"form",2),m.Ub(5,"mat-form-field"),m.Ub(6,"mat-label"),m.Hc(7),m.gc(8,"translate"),m.Tb(),m.Ub(9,"mat-select",3),m.Fc(10,de,2,2,"mat-option",4),m.Tb(),m.Tb(),m.Ub(11,"mat-radio-button",5),m.bc("change",function(t){return e.change(t)}),m.Hc(12),m.gc(13,"translate"),m.Tb(),m.Ub(14,"mat-form-field"),m.Ub(15,"mat-label"),m.Hc(16),m.gc(17,"translate"),m.Tb(),m.Ub(18,"mat-chip-list",6,7),m.Fc(20,be,4,1,"mat-chip",8),m.Ub(21,"input",9),m.bc("matChipInputTokenEnd",function(t){return e.enum.append(t)}),m.Tb(),m.Tb(),m.Tb(),m.Ub(22,"mat-radio-button",10),m.bc("change",function(t){return e.change(t)}),m.Hc(23),m.gc(24,"translate"),m.Tb(),m.Ub(25,"div",11),m.Fc(26,pe,5,4,"mat-form-field",12),m.Tb(),m.Ub(27,"mat-form-field"),m.Ub(28,"mat-label"),m.Hc(29),m.gc(30,"translate"),m.Tb(),m.Pb(31,"input",13),m.Tb(),m.Tb(),m.Tb(),m.Ub(32,"div",14),m.Ub(33,"button",15),m.bc("click",function(){return e.save()}),m.Hc(34),m.gc(35,"uppercase"),m.gc(36,"translate"),m.Tb(),m.Ub(37,"button",16),m.Hc(38),m.gc(39,"uppercase"),m.gc(40,"translate"),m.Tb(),m.Tb()),2&t){const t=m.uc(19);m.Cb(1),m.Ic(m.hc(2,16,"shared.operation.add")),m.Cb(3),m.lc("formGroup",e.form),m.Cb(3),m.Ic(m.hc(8,18,"routes.task.disablement.warehouse")),m.Cb(3),m.lc("ngForOf",e.warehouse),m.Cb(2),m.Ic(m.hc(13,20,"routes.task.disablement.enum")),m.Cb(4),m.Ic(m.hc(17,22,"routes.task.disablement.cell")),m.Cb(4),m.lc("ngForOf",e.form.controls.enum.value),m.Cb(1),m.lc("matChipInputFor",t)("matChipInputAddOnBlur",!0)("cleave",m.pc(37,fe,m.oc(36,he))),m.Cb(2),m.Ic(m.hc(24,24,"routes.task.disablement.range")),m.Cb(3),m.lc("ngForOf",m.oc(39,ge)),m.Cb(3),m.Ic(m.hc(30,26,"routes.task.disablement.cellTag")),m.Cb(4),m.lc("disabled",e.form.invalid),m.Cb(1),m.Ic(m.hc(35,28,m.hc(36,30,"shared.dialog.ok"))),m.Cb(4),m.Ic(m.hc(39,32,m.hc(40,34,"shared.dialog.cancel")))}},directives:[s.h,s.e,n.v,n.o,n.g,p.b,p.e,f.a,n.n,n.f,n.t,g.m,ue.b,me.c,me.b,v.a,h.b,n.c,s.c,C.a,s.d,k.o,me.a,D.a,me.d,n.r],pipes:[T.d,g.v],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.mat-radio-button[_ngcontent-%COMP%]{width:100%;margin:12px 0}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}.grid[_ngcontent-%COMP%]{display:grid;margin:0 12px;grid-template-rows:auto auto auto;grid-template-columns:50% 50%;-moz-column-gap:24px;column-gap:24px;justify-content:center}"]}),t})();const _e=["$crud"],Ce=["$area"],ke=["$cell"];function Te(t,e){if(1&t&&(m.Ub(0,"mat-option",9),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t.id),m.Cb(1),m.Ic(t.name)}}function Ue(t,e){if(1&t&&(m.Ub(0,"mat-optgroup",7),m.Fc(1,Te,2,2,"mat-option",8),m.Tb()),2&t){const t=e.$implicit;m.lc("label",t.name),m.Cb(1),m.lc("ngForOf",t.area)}}function Oe(t,e){if(1&t&&(m.Ub(0,"mat-form-field",4),m.Ub(1,"mat-label"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Ub(4,"mat-select",5),m.Fc(5,Ue,2,2,"mat-optgroup",6),m.Tb(),m.Tb()),2&t){const t=e.$implicit,a=m.fc();m.lc("formGroup",t),m.Cb(2),m.Ic(m.hc(3,3,"routes.task.area")),m.Cb(3),m.lc("ngForOf",a.area)}}const we=function(){return[2,2,2]},ye=function(t){return{delimiter:"-",blocks:t}};function Se(t,e){1&t&&(m.Ub(0,"mat-form-field",4),m.Ub(1,"mat-label"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Pb(4,"input",10),m.Tb()),2&t&&(m.lc("formGroup",e.$implicit),m.Cb(2),m.Ic(m.hc(3,3,"routes.task.disablement.cell")),m.Cb(2),m.lc("cleave",m.pc(6,ye,m.oc(5,we))))}let Fe=(()=>{class t{constructor(t,e,a,o){this._dialogService=t,this._httpService=e,this._i18nService=a,this._toastService=o,this.convertor=t=>{const e=Object(le.a)(this._area,(t,e)=>(t[e.id]=e.name,t),{});return t.items.forEach(t=>t.warehouse=e[t.warehouse]),t}}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,function*(){const t=yield this._httpService.join(this._httpService.get("warehouses"),this._httpService.get("areas"));let e=Object(c.a)(t[1].items.filter(t=>"LKQ"==t.type),"warehouse");this._area=t[0].items.filter(t=>t.area=e[t.id]),e=t[1].items.map(t=>t.id),this._defination=[{id:"name",header:"routes.task.disablement.cell",filter:{order:2,field:"text",template:this._cellControl}},{id:"warehouse",header:"routes.task.disablement.warehouse"},{id:"area",header:"routes.task.disablement.area",filter:{order:1,field:"multi-select",template:this._areaControl,default:e},display:null},{id:"laneway",header:"routes.task.disablement.laneway",filter:{order:3,field:"text"}},{id:"cellTag",header:"routes.task.disablement.cellTag",filter:{order:4,field:"text"}}],this._api="disablements",this._template.edit=()=>Object(r.a)(this,void 0,void 0,function*(){(yield this._dialogService.open(ve,{data:this._area}))&&this._template.refresh()}),this._template.delete=()=>Object(r.a)(this,void 0,void 0,function*(){let t=Object(zt.a)(this._template.selection.selected.map(t=>t.warehouse));if(t.length>1)this._toastService.show("\u4e0d\u5141\u8bb8\u6279\u91cf\u64cd\u4f5c\u4e0d\u540c\u4ed3\u5e93\u7684\u9879\u76ee");else if(yield this._dialogService.confirm(this._i18nService.translate("shared.notification.confirm"))){t=this._area.find(e=>e.name==t[0]).id;const e=yield this._httpService.post("disablements/batch",{method:"delete",warehouse:t,data:this._template.selection.selected.map(t=>t.name)}).catch(()=>{this._toastService.show(this._i18nService.translate("shared.notification.fail"))});if(void 0!==e){let t=0,a=0;for(const o of e)switch(o){case!0:t++;break;case!1:a++}this._toastService.show(`\u64cd\u4f5c\u5b8c\u6210\uff1a\u6210\u529f ${t} \u4e2a\uff1b\u5931\u8d25 ${a} \u4e2a\u3002`),this._template.refresh()}}})})}get defination(){return this._defination}get api(){return this._api}get area(){return this._area}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(A.a),m.Ob(d.a),m.Ob(Q.a),m.Ob(b.a))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-disablement"]],viewQuery:function(t,e){if(1&t&&(m.Oc(_e,!0),m.Oc(Ce,!0),m.Oc(ke,!0)),2&t){let t;m.tc(t=m.cc())&&(e._template=t.first),m.tc(t=m.cc())&&(e._areaControl=t.first),m.tc(t=m.cc())&&(e._cellControl=t.first)}},decls:6,vars:4,consts:[[3,"editable","defination","api","convertor"],["$crud",""],["$area",""],["$cell",""],[3,"formGroup"],["formControlName","area","multiple",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["matInput","","formControlName","name",3,"cleave"]],template:function(t,e){1&t&&(m.Ub(0,"crud-template",0,1),m.Fc(2,Oe,6,5,"ng-template",null,2,m.Gc),m.Fc(4,Se,5,8,"ng-template",null,3,m.Gc),m.Tb()),2&t&&m.lc("editable",!1)("defination",e.defination)("api",e.api)("convertor",e.convertor)},directives:[z.a,p.b,n.o,n.g,p.e,f.a,n.n,n.f,g.m,k.n,k.o,h.b,n.c,v.a],pipes:[T.d],styles:[""]}),t})();var Ie=a("FFMq");const He=["$result"],$e=["$time"],xe=["$warehouse"];function Me(t,e){1&t&&(m.Ub(0,"mat-icon",10),m.Hc(1,"sentiment_very_dissatisfied"),m.Tb())}function qe(t,e){1&t&&m.Qb(0)}function Ge(t,e){1&t&&(m.Ub(0,"mat-icon",11),m.Hc(1,"sentiment_satisfied_alt"),m.Tb())}function Pe(t,e){if(1&t&&(m.Sb(0,6),m.Fc(1,Me,2,0,"mat-icon",7),m.Fc(2,qe,1,0,"ng-container",8),m.Fc(3,Ge,2,0,"mat-icon",9),m.Rb()),2&t){const t=e.$implicit;m.lc("ngSwitch",t.state),m.Cb(1),m.lc("ngSwitchCase",900==t.state||2==t.state?t.state:-1),m.Cb(1),m.lc("ngSwitchCase",null)}}function je(t,e){1&t&&(m.Hc(0),m.gc(1,"date")),2&t&&m.Ic(m.ic(1,1,e.$implicit[e.field.id],"yyyy-MM-dd HH:mm:ss"))}function Ne(t,e){1&t&&(m.Ub(0,"p"),m.Hc(1),m.gc(2,"translate"),m.Tb(),m.Ub(3,"ul",14),m.Ub(4,"li",15),m.Ub(5,"span"),m.Hc(6),m.gc(7,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.Cb(1),m.Ic(m.hc(2,2,"shared.operation.dyeing")),m.Cb(5),m.Ic(m.hc(7,4,"routes.task.instruction.abnormal")))}const Ee=function(t){return{"app-foreground-primary":t}};function Ve(t,e){if(1&t){const t=m.Vb();m.Ub(0,"button",12),m.bc("click",function(){m.wc(t);const e=m.fc();return e.colorful=!e.colorful}),m.Ub(1,"mat-icon"),m.Hc(2,"brush"),m.Tb(),m.Fc(3,Ne,8,6,"ng-template",null,13,m.Gc),m.Tb()}if(2&t){const t=m.uc(4),e=m.fc();m.lc("matTooltipTemplate",t)("ngClass",m.pc(2,Ee,e.colorful))}}function Re(t,e){if(1&t&&(m.Ub(0,"mat-option",20),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t.id),m.Cb(1),m.Kc("",t.id,": ",t.name,"")}}function We(t,e){if(1&t&&(m.Ub(0,"mat-form-field",16),m.Ub(1,"mat-label"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Ub(4,"mat-select",17,18),m.Ub(6,"mat-select-trigger"),m.Hc(7),m.gc(8,"join"),m.Tb(),m.Fc(9,Re,2,3,"mat-option",19),m.Tb(),m.Tb()),2&t){const t=e.$implicit,a=m.uc(5),o=m.fc();m.lc("formGroup",t),m.Cb(2),m.Ic(m.hc(3,4,"routes.task.instruction.wh")),m.Cb(5),m.Ic(m.ic(8,6,a.value,", ")),m.Cb(2),m.lc("ngForOf",o.warehouse)}}let Be=(()=>{class t{constructor(t){this._httpService=t,this._colorful=!0,this.dyeing=t=>!this.colorful||900!=t.state&&2!=t.state?null:"app-background-warn-lighter"}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,function*(){const t=yield this._httpService.get("warehouses");this._warehouse=t.items;const e=t.items.map(t=>t.id);this._defination=[{id:"result",template:this._resultColumn,style:{width:"24px",paddingRight:"24px",lineHeight:1,cursor:"default"}},{id:"direction",header:"routes.task.instruction.dir",filter:{order:2,field:"select",range:[{id:"WCS->WMS",name:"WCS->WMS"},{id:"WMS->WCS",name:"WMS->WCS"}]}},{id:"function",header:"routes.task.instruction.func",filter:{order:3,field:"text"}},{id:"warehouse",header:"routes.task.instruction.wh",filter:{order:1,field:"multi-select",template:this._warehouseControl,default:e},display:null},{id:"device",header:"routes.task.instruction.device",filter:{order:4,field:"text"}},{id:"barcode",header:"routes.task.instruction.barcode",filter:{order:5,field:"text"}},{id:"state",header:"routes.task.instruction.state",filter:{order:8,field:"text"}},{id:"beginTime",header:"routes.task.instruction.begin",template:this._timeColumn,filter:{order:6,field:"date-range"}},{id:"endTime",header:"routes.task.instruction.end",template:this._timeColumn,filter:{order:7,field:"date-range"}},{id:"parameter",header:"routes.task.instruction.param",display:null},{id:"remark",header:"routes.task.instruction.remark"}],this._api="instructions"})}get defination(){return this._defination}get api(){return this._api}get warehouse(){return this._warehouse}get colorful(){return this._colorful}set colorful(t){this._colorful=t}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(d.a))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-instruction"]],viewQuery:function(t,e){if(1&t&&(m.Oc(He,!0),m.Oc($e,!0),m.Oc(xe,!0)),2&t){let t;m.tc(t=m.cc())&&(e._resultColumn=t.first),m.tc(t=m.cc())&&(e._timeColumn=t.first),m.tc(t=m.cc())&&(e._warehouseControl=t.first)}},decls:10,vars:8,consts:[[3,"selectable","addable","editable","deletable","row-class","defination","api","toolbar-icons-template"],["$crud",""],["$result",""],["$time",""],["$dyeing",""],["$warehouse",""],[3,"ngSwitch"],["class","app-foreground-secondary",4,"ngSwitchCase"],[4,"ngSwitchCase"],["class","app-foreground-primary",4,"ngSwitchDefault"],[1,"app-foreground-secondary"],[1,"app-foreground-primary"],["mat-icon-button","",3,"matTooltipTemplate","ngClass","click"],["$tooltip",""],[1,"tooltip-ul"],[1,"app-foreground-warn"],[3,"formGroup"],["formControlName","warehouse","multiple",""],["$wh",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){if(1&t&&(m.Ub(0,"crud-template",0,1),m.Fc(2,Pe,4,3,"ng-template",null,2,m.Gc),m.Fc(4,je,2,4,"ng-template",null,3,m.Gc),m.Fc(6,Ve,5,4,"ng-template",null,4,m.Gc),m.Fc(8,We,10,9,"ng-template",null,5,m.Gc),m.Tb()),2&t){const t=m.uc(7);m.lc("selectable",!1)("addable",!1)("editable",!1)("deletable",!1)("row-class",e.dyeing)("defination",e.defination)("api",e.api)("toolbar-icons-template",t)}},directives:[z.a,g.p,g.q,g.r,D.a,C.a,J.a,g.l,p.b,n.o,n.g,p.e,f.a,n.n,n.f,f.c,g.m,k.o],pipes:[g.e,T.d,Ie.a],styles:[".tooltip-ul[_ngcontent-%COMP%]{margin-top:-8px;margin-bottom:0;padding-left:0;list-style-type:disc;list-style-position:inside}.tooltip-ul[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff}"]}),t})();const Le=["$modelc"],Ae=["$inoutc"],Qe=["$modele"],ze=["$codee"],De=["$inoutf"];function Ke(t,e){1&t&&(m.Hc(0),m.gc(1,"translate")),2&t&&m.Ic(m.hc(1,1,"routes.task.emergency.modelColumn."+e.$implicit.stationModel))}function Je(t,e){1&t&&(m.Hc(0),m.gc(1,"translate")),2&t&&m.Ic(m.hc(1,1,"routes.task.emergency.type."+e.$implicit.inout))}function Xe(t,e){1&t&&(m.Ub(0,"mat-form-field",7),m.Ub(1,"mat-label"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Pb(4,"input",8),m.Tb()),2&t&&(m.lc("formGroup",e.$implicit),m.Cb(2),m.Ic(m.hc(3,2,"routes.task.emergency.stationCode")))}function Ye(t,e){1&t&&(m.Ub(0,"mat-form-field",7),m.Ub(1,"mat-label"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Ub(4,"mat-select",9),m.Ub(5,"mat-option",10),m.Hc(6),m.gc(7,"translate"),m.Tb(),m.Ub(8,"mat-option",11),m.Hc(9),m.gc(10,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.lc("formGroup",e.$implicit),m.Cb(2),m.Ic(m.hc(3,4,"routes.task.emergency.stationModel")),m.Cb(4),m.Ic(m.hc(7,6,"routes.task.emergency.modelEdit.0")),m.Cb(3),m.Ic(m.hc(10,8,"routes.task.emergency.modelEdit.1")))}function Ze(t,e){1&t&&(m.Ub(0,"mat-form-field",7),m.Ub(1,"mat-label"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Ub(4,"mat-select",12),m.Ub(5,"mat-option",11),m.Hc(6),m.gc(7,"translate"),m.Tb(),m.Ub(8,"mat-option",13),m.Hc(9),m.gc(10,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.lc("formGroup",e.$implicit),m.Cb(2),m.Ic(m.hc(3,4,"routes.task.emergency.inout")),m.Cb(4),m.Ic(m.hc(7,6,"routes.task.emergency.type.1")),m.Cb(3),m.Ic(m.hc(10,8,"routes.task.emergency.type.2")))}let ta=(()=>{class t{constructor(t,e,a){this._httpService=t,this._i18nService=e,this._toastService=a,this._pkColumn="stationCode",this.error=t=>{switch(t.status){case 422:return this._toastService.show(this._i18nService.translate("shared.notification.fail")),!1;default:return!0}}}ngAfterViewInit(){return Object(r.a)(this,void 0,void 0,function*(){this._defination=[{id:"stationCode",header:"routes.task.emergency.stationCode",editor:{field:"text",template:this._codeEditor,disabled:"true"},filter:{field:"text"}},{id:"stationModel",header:"routes.task.emergency.stationModel",template:this._modelColumn,editor:{field:"select",template:this._modelEditor},filter:{field:"select",template:this._modelEditor}},{id:"inout",header:"routes.task.emergency.inout",template:this._inoutColumn,filter:{field:"select",template:this._inoutFilter}}],this._api="warehouses/emergency"})}get defination(){return this._defination}get api(){return this._api}get pkColumn(){return this._pkColumn}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(d.a),m.Ob(Q.a),m.Ob(b.a))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-emergency"]],viewQuery:function(t,e){if(1&t&&(m.Oc(Le,!0),m.Oc(Ae,!0),m.Oc(Qe,!0),m.Oc(ze,!0),m.Oc(De,!0)),2&t){let t;m.tc(t=m.cc())&&(e._modelColumn=t.first),m.tc(t=m.cc())&&(e._inoutColumn=t.first),m.tc(t=m.cc())&&(e._modelEditor=t.first),m.tc(t=m.cc())&&(e._codeEditor=t.first),m.tc(t=m.cc())&&(e._inoutFilter=t.first)}},decls:12,vars:8,consts:[[3,"defination","api","error","addable","deletable","selectable","editable","pk"],["$crud",""],["$modelc",""],["$inoutc",""],["$codee",""],["$modele",""],["$inoutf",""],[3,"formGroup"],["matInput","","formControlName","stationCode","disabled",""],["formControlName","stationModel"],["value","0"],["value","1"],["formControlName","inout"],["value","2"]],template:function(t,e){1&t&&(m.Ub(0,"crud-template",0,1),m.Fc(2,Ke,2,3,"ng-template",null,2,m.Gc),m.Fc(4,Je,2,3,"ng-template",null,3,m.Gc),m.Fc(6,Xe,5,4,"ng-template",null,4,m.Gc),m.Fc(8,Ye,11,10,"ng-template",null,5,m.Gc),m.Fc(10,Ze,11,10,"ng-template",null,6,m.Gc),m.Tb()),2&t&&m.lc("defination",e.defination)("api",e.api)("error",e.error)("addable",!1)("deletable",!1)("selectable",!1)("editable",!0)("pk",e.pkColumn)},directives:[z.a,p.b,n.o,n.g,p.e,h.b,n.c,n.n,n.f,f.a,k.o],pipes:[T.d],styles:[""]}),t})();var ea=a("qUOr");function aa(t,e){if(1&t&&(m.Ub(0,"mat-option",16),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t),m.Cb(1),m.Ic(t.name)}}function oa(t,e){if(1&t&&(m.Ub(0,"mat-option",16),m.Hc(1),m.gc(2,"translate"),m.gc(3,"translate"),m.gc(4,"translate"),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t),m.Cb(1),m.Mc("",m.hc(2,7,"routes.task.orderout.goodsCode"),":",t.mrCode," ",m.hc(3,9,"routes.task.orderout.orderNo"),":",t.workOrderNo," ",m.hc(4,11,"routes.task.orderout.restQty"),":",t.restQty,"")}}function ia(t,e){if(1&t&&(m.Ub(0,"mat-option",16),m.Hc(1),m.gc(2,"translate"),m.gc(3,"translate"),m.gc(4,"translate"),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t),m.Cb(1),m.Mc("",m.hc(2,7,"routes.task.orderout.goodsCode"),":",t.mrCode," ",m.hc(3,9,"routes.task.orderout.orderNo"),":",t.workOrderNo," ",m.hc(4,11,"routes.task.orderout.restQty"),":",t.restQty,"")}}const ra=function(){return[2,2,2]},ca=function(t){return{delimiter:"-",blocks:t}},na=[{path:"",component:Qt},{path:"pallet",component:se},{path:"disablement",component:Fe},{path:"instruction",component:Be},{path:"emergency",component:ta},{path:"orderout",component:(()=>{class t{constructor(t,e,a,o){this._formBuilder=t,this._httpService=e,this._i18nService=a,this._toastService=o,this.loading=!1,this.save=()=>Object(r.a)(this,void 0,void 0,function*(){for(var t=[],e=1;e<=this._formGroup.controls.quantity.value;e++){var a=this._materialList.filter(t=>t.code==this._formGroup.controls.orderInfo.value.mrCode);a&&t.push(a[0].id)}this.loading=!0;var o={isAgv:"1",slTarget:this._formGroup.controls.targetNo.value.code,postUser:"",orderInfo:this._formGroup.controls.orderInfo.value,backupOrderInfo:this._formGroup.controls.backupOrderInfo.value};void 0!==(yield this._httpService.post("tasks",{operation:"applyout",task:{transaction:"ApplyOut",warehouse:0,Materials:t,Batchs:[],destination:this._formGroup.controls.targetNo.value.remark,priority:0,manual:!1,qc:"ok",enable:!0,tag:JSON.stringify(o)}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&(this._toastService.show("\u64cd\u4f5c\u6210\u529f"),this.refresh()),this.loading=!1}),this.getOrderInfoList=()=>Object(r.a)(this,void 0,void 0,function*(){this._orderList=null,this._formGroup.controls.orderInfo.setValue(null),this._httpService.get("orders/GetWorkOrderInfo?lineCode="+this._formGroup.controls.targetNo.value.code).then(t=>{this._orderList=t.resultData})}),this.getBackupOrderInfoList=()=>Object(r.a)(this,void 0,void 0,function*(){this._orderList&&(this._backupOrderList=this._orderList.filter(t=>t.mrCode==this._formGroup.controls.orderInfo.value.mrCode&&t.workOrderNo!=this._formGroup.controls.orderInfo.value.workOrderNo))}),this._httpService.join(this._httpService.get("items?name=hiLineCode"),this._httpService.get("materials")).then(t=>{this._items=t[0].items,this._materialList=t[1].items}),this._formGroup=this._formBuilder.group({targetNo:[null,[n.u.required]],orderInfo:[null,[n.u.required]],backupOrderInfo:[null],quantity:["1",[n.u.required]]})}ngOnInit(){}get formGroup(){return this._formGroup}get items(){return this._items}get materialList(){return this._materialList}get orderList(){return this._orderList}get backupOrderList(){return this._backupOrderList}refresh(){}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(n.d),m.Ob(d.a),m.Ob(Q.a),m.Ob(b.a))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-orderout"]],decls:49,vars:35,consts:[[1,"grid"],["autocomplete","off",3,"formGroup"],["form",""],["formControlName","targetNo","required","",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf"],["formControlName","orderInfo","required","",3,"selectionChange"],["formControlName","backupOrderInfo"],["formControlName","quantity","required",""],["value","1"],["value","2"],["value","3"],["value","4"],["value","5"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary",3,"disabled","loading","click"],["mat-button","","mat-dialog-close","",3,"loading"],[3,"value"]],template:function(t,e){1&t&&(m.Ub(0,"div",0),m.Ub(1,"h2"),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Ub(4,"form",1,2),m.Ub(6,"mat-form-field"),m.Ub(7,"mat-label"),m.Hc(8),m.gc(9,"translate"),m.Tb(),m.Ub(10,"mat-select",3),m.bc("selectionChange",function(){return e.getOrderInfoList()}),m.Fc(11,aa,2,2,"mat-option",4),m.Tb(),m.Tb(),m.Ub(12,"mat-form-field"),m.Ub(13,"mat-label"),m.Hc(14),m.gc(15,"translate"),m.gc(16,"translate"),m.Tb(),m.Ub(17,"mat-select",5),m.bc("selectionChange",function(){return e.getBackupOrderInfoList()}),m.Fc(18,oa,5,13,"mat-option",4),m.Tb(),m.Tb(),m.Ub(19,"mat-form-field"),m.Ub(20,"mat-label"),m.Hc(21),m.gc(22,"translate"),m.Tb(),m.Ub(23,"mat-select",6),m.Fc(24,ia,5,13,"mat-option",4),m.Tb(),m.Tb(),m.Ub(25,"mat-form-field"),m.Ub(26,"mat-label"),m.Hc(27),m.gc(28,"translate"),m.Tb(),m.Ub(29,"mat-select",7),m.Ub(30,"mat-option",8),m.Hc(31,"1"),m.Tb(),m.Ub(32,"mat-option",9),m.Hc(33,"2"),m.Tb(),m.Ub(34,"mat-option",10),m.Hc(35,"3"),m.Tb(),m.Ub(36,"mat-option",11),m.Hc(37,"4"),m.Tb(),m.Ub(38,"mat-option",12),m.Hc(39,"5"),m.Tb(),m.Tb(),m.Tb(),m.Tb(),m.Ub(40,"div",13),m.Ub(41,"button",14),m.bc("click",function(){return e.save()}),m.Hc(42),m.gc(43,"uppercase"),m.gc(44,"translate"),m.Tb(),m.Ub(45,"button",15),m.Hc(46),m.gc(47,"uppercase"),m.gc(48,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.Cb(2),m.Ic(m.hc(3,15,"routes.task.orderout.title")),m.Cb(2),m.lc("formGroup",e.formGroup),m.Cb(4),m.Ic(m.hc(9,17,"routes.task.orderout.targetNo")),m.Cb(3),m.lc("ngForOf",e.items),m.Cb(3),m.Kc("",m.hc(15,19,"routes.task.orderout.code"),"--",m.hc(16,21,"routes.task.orderout.orderNo"),""),m.Cb(4),m.lc("ngForOf",e.orderList),m.Cb(3),m.Ic(m.hc(22,23,"routes.task.orderout.backupOrderNo")),m.Cb(3),m.lc("ngForOf",e.backupOrderList),m.Cb(3),m.Ic(m.hc(28,25,"routes.task.orderout.qty")),m.Cb(14),m.lc("disabled",e.formGroup.invalid)("loading",e.loading),m.Cb(1),m.Ic(m.hc(43,27,m.hc(44,29,"shared.dialog.ok"))),m.Cb(3),m.lc("loading",e.loading),m.Cb(1),m.Ic(m.hc(47,31,m.hc(48,33,"shared.dialog.cancel"))))},directives:[n.v,n.o,n.g,p.b,p.e,f.a,n.n,n.f,n.t,g.m,k.o,s.c,C.a,ea.a,s.d],pipes:[T.d,g.v],styles:[".grid[_ngcontent-%COMP%]{margin-top:10px;margin-left:20px;margin-right:20px}.mat-form-field[_ngcontent-%COMP%]{width:100%}.example-section[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center;height:60px}.example-margin[_ngcontent-%COMP%]{margin:0 10px}"]}),t})()},{path:"movetocell",component:(()=>{class t{constructor(t,e,a,o){this._formBuilder=t,this._httpService=e,this._i18nService=a,this._toastService=o,this.save=()=>Object(r.a)(this,void 0,void 0,function*(){let t=yield this._httpService.get("cells?name="+this._form.controls.cell.value);if(t.total){var e=t.items[0];"Enabled"==e.task&&"Empty"==e.store?(t=yield this._httpService.post("tasks",{operation:"transfer",task:{warehouse:e.warehouse,barcode:this._form.controls.barcode.value,destination:"name:"+this._form.controls.cell.value,priority:0}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}),void 0!==t&&(this._toastService.show("\u64cd\u4f5c\u6210\u529f"),this.refresh())):("Enabled"!=e.task&&this._toastService.show("\u8d27\u4f4d\u72b6\u6001\u4e0d\u53ef\u7528\uff0c\u8bf7\u9009\u62e9\u5176\u5b83\u8d27\u4f4d"),"Empty"!=e.store&&this._toastService.show("\u8d27\u4f4d\u5df2\u88ab\u4f7f\u7528\uff0c\u8bf7\u9009\u62e9\u5176\u5b83\u8d27\u4f4d"))}else this._toastService.show("\u8d27\u4f4d\u4e0d\u5b58\u5728\uff0c\u8bf7\u6b63\u786e\u586b\u5199\u8d27\u4f4d\u7f16\u7801")}),this._form=this._formBuilder.group({barcode:[null,[n.u.required]],cell:[null,[n.u.required]]})}get form(){return this._form}refresh(){this._form.controls.barcode.setValue(null),this._form.controls.cell.setValue(null)}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(n.d),m.Ob(d.a),m.Ob(Q.a),m.Ob(b.a))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-move-to-cell"]],decls:24,vars:25,consts:[[1,"grid"],["mat-dialog-title",""],["autocomplete","off",3,"formGroup"],["matInput","","formControlName","barcode"],["matInput","","formControlName","cell",3,"cleave"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""]],template:function(t,e){1&t&&(m.Ub(0,"div",0),m.Ub(1,"h2",1),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Ub(4,"form",2),m.Ub(5,"mat-form-field"),m.Ub(6,"mat-label"),m.Hc(7),m.gc(8,"translate"),m.Tb(),m.Pb(9,"input",3),m.Tb(),m.Ub(10,"mat-form-field"),m.Ub(11,"mat-label"),m.Hc(12),m.gc(13,"translate"),m.Tb(),m.Pb(14,"input",4),m.Tb(),m.Tb(),m.Tb(),m.Ub(15,"div",5),m.Ub(16,"button",6),m.bc("click",function(){return e.save()}),m.Hc(17),m.gc(18,"uppercase"),m.gc(19,"translate"),m.Tb(),m.Ub(20,"button",7),m.Hc(21),m.gc(22,"uppercase"),m.gc(23,"translate"),m.Tb(),m.Tb()),2&t&&(m.Cb(2),m.Ic(m.hc(3,8,"routes.task.movetocell.title")),m.Cb(2),m.lc("formGroup",e.form),m.Cb(3),m.Ic(m.hc(8,10,"routes.task.movetocell.stockBarcode")),m.Cb(5),m.Ic(m.hc(13,12,"routes.task.movetocell.cell")),m.Cb(2),m.lc("cleave",m.pc(23,ca,m.oc(22,ra))),m.Cb(2),m.lc("disabled",e.form.invalid),m.Cb(1),m.Ic(m.hc(18,14,m.hc(19,16,"shared.dialog.ok"))),m.Cb(4),m.Ic(m.hc(22,18,m.hc(23,20,"shared.dialog.cancel"))))},directives:[s.h,n.v,n.o,n.g,p.b,p.e,h.b,n.c,n.n,n.f,v.a,s.c,C.a,s.d],pipes:[T.d,g.v],styles:[".grid[_ngcontent-%COMP%]{margin-top:10px;margin-left:20px;margin-right:20px}.mat-form-field[_ngcontent-%COMP%]{width:100%}.example-section[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center;height:60px}.example-margin[_ngcontent-%COMP%]{margin:0 10px}"]}),t})()},{path:"transfer",component:(()=>{class t{constructor(t,e,a,o){this._formBuilder=t,this._httpService=e,this._i18nService=a,this._toastService=o,this.save=()=>Object(r.a)(this,void 0,void 0,function*(){void 0!==(yield this._httpService.post("tasks",{operation:"transfer",task:{warehouse:1,barcode:this._form.controls.barcode.value,destination:"device:"+this._form.controls.destination.value,priority:0}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&(this._toastService.show("\u64cd\u4f5c\u6210\u529f"),this.refresh())}),this._form=this._formBuilder.group({barcode:[null,[n.u.required]],destination:[null,[n.u.required]]})}get form(){return this._form}refresh(){this._form.controls.barcode.setValue(null),this._form.controls.cell.setValue(null)}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(n.d),m.Ob(d.a),m.Ob(Q.a),m.Ob(b.a))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-transfer"]],decls:26,vars:21,consts:[[1,"grid"],["mat-dialog-title",""],["autocomplete","off",3,"formGroup"],["matInput","","formControlName","barcode"],["formControlName","destination"],["value","29101"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""]],template:function(t,e){1&t&&(m.Ub(0,"div",0),m.Ub(1,"h2",1),m.Hc(2),m.gc(3,"translate"),m.Tb(),m.Ub(4,"form",2),m.Ub(5,"mat-form-field"),m.Ub(6,"mat-label"),m.Hc(7),m.gc(8,"translate"),m.Tb(),m.Pb(9,"input",3),m.Tb(),m.Ub(10,"mat-form-field"),m.Ub(11,"mat-label"),m.Hc(12),m.gc(13,"translate"),m.Tb(),m.Ub(14,"mat-select",4),m.Ub(15,"mat-option",5),m.Hc(16,"\u8f66\u8eab-\u51fa\u5e93\u7ad9\u53f0-29101"),m.Tb(),m.Tb(),m.Tb(),m.Tb(),m.Tb(),m.Ub(17,"div",6),m.Ub(18,"button",7),m.bc("click",function(){return e.save()}),m.Hc(19),m.gc(20,"uppercase"),m.gc(21,"translate"),m.Tb(),m.Ub(22,"button",8),m.Hc(23),m.gc(24,"uppercase"),m.gc(25,"translate"),m.Tb(),m.Tb()),2&t&&(m.Cb(2),m.Ic(m.hc(3,7,"routes.task.transfer")),m.Cb(2),m.lc("formGroup",e.form),m.Cb(3),m.Ic(m.hc(8,9,"routes.task.barcode")),m.Cb(5),m.Ic(m.hc(13,11,"routes.task.destination")),m.Cb(6),m.lc("disabled",e.form.invalid),m.Cb(1),m.Ic(m.hc(20,13,m.hc(21,15,"shared.dialog.ok"))),m.Cb(4),m.Ic(m.hc(24,17,m.hc(25,19,"shared.dialog.cancel"))))},directives:[s.h,n.v,n.o,n.g,p.b,p.e,h.b,n.c,n.n,n.f,f.a,k.o,s.c,C.a,s.d],pipes:[T.d,g.v],styles:[".grid[_ngcontent-%COMP%]{margin-top:10px;margin-left:20px;margin-right:20px}.mat-form-field[_ngcontent-%COMP%]{width:100%}.example-section[_ngcontent-%COMP%]{display:flex;align-content:center;align-items:center;height:60px}.example-margin[_ngcontent-%COMP%]{margin:0 10px}"]}),t})()}];let sa=(()=>{class t{}return t.\u0275mod=m.Mb({type:t}),t.\u0275inj=m.Lb({factory:function(e){return new(e||t)},imports:[[i.h.forChild(na)],i.h]}),t})();var la=a("95ze");let ua=(()=>{class t{}return t.\u0275mod=m.Mb({type:t}),t.\u0275inj=m.Lb({factory:function(e){return new(e||t)},imports:[[o.a,sa,la.a]]}),t})()}}]);