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