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 line
78 KiB
1 line
78 KiB
3 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{nEup:function(t,e,a){"use strict";a.r(e),a.d(e,"TaskModule",function(){return ua});var o=a("PCNd"),i=a("tyNb"),r=a("mrSG"),c=a("pHS2"),n=a("3Pt+"),s=a("0IaG"),l=a("weu1"),u=a("zmn3"),m=a("fXoL"),d=a("bUwk"),b=a("Olgc"),p=a("kmnG"),h=a("qFsG"),f=a("d3UM"),g=a("ofXK"),v=a("7OFo"),_=a("1jcm"),C=a("bTqV"),k=a("FKr1"),T=a("sYmb");function U(t,e){if(1&t&&(m.Ub(0,"span"),m.Hc(1),m.Tb()),2&t){const t=m.fc().$implicit;m.Cb(1),m.Ic(t.warehouse.name)}}function O(t,e){if(1&t&&(m.Ub(0,"mat-option",15),m.Hc(1),m.Tb()),2&t){const t=e.$implicit;m.lc("value",t),m.Cb(1),m.Ic(t.name)}}function w(t,e){if(1&t&&(m.Ub(0,"mat-optgroup",12),m.Fc(1,U,2,1,"span",13),m.Ub(2,"span"),m.Hc(3),m.Tb(),m.Fc(4,O,2,2,"mat-option",14),m.Tb()),2&t){const t=e.$implicit;m.Cb(1),m.lc("ngIf",!t.index),m.Cb(2),m.Ic(t.name),m.Cb(1),m.lc("ngForOf",t.cell)}}const y=function(){return[2,2,2]},S=function(t){return{delimiter:"-",blocks:t}};let F=(()=>{class t{constructor(t,e,a,o,i){if(this._data=t,this._formBuilder=e,this._httpService=a,this._toastService=o,this._dialogRef=i,this.save=()=>Object(r.a)(this,void 0,void 0,function*(){void 0!==(yield this._httpService.post("tasks",{operation:"infeed",task:{warehouse:this._form.controls.original.value.warehouse,barcode:this._form.controls.barcode.value,original:this._form.controls.original.value.id,destination:this._form.controls.destination.value?"name:"+this._form.controls.destination.value:null,priority:0,manual:this._form.controls.manual.value}}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")}))&&(this._toastService.show("\u64cd\u4f5c\u6210\u529f"),this._dialogRef.close(!0))}),this._form=this._formBuilder.group({barcode:["",[n.u.required]],original:["",[n.u.required]],destination:[""],manual:[!1]}),this._data.length){const t=[];this._data.forEach(e=>e.area.forEach((a,o)=>t.push({id:a.id,name:a.name,warehouse:{id:e.id,name:e.name},index:o}))),this._httpService.get(`cells?${Object(l.a)(Object(u.a)(t,t=>`area=${t.id}&`),"")}type=Station&in=true`).then(e=>{const a=Object(c.a)(e.items,"area");this._station=t.filter(t=>!!a[t.id]&&(a[t.id].forEach(e=>e.warehouse=t.warehouse.id),t.cell=a[t.id],!0)),1==this._station.length&&1==e.items.length&&this._form.controls.original.setValue(e.items[0])})}}get form(){return this._form}get station(){return this._station}}return t.\u0275fac=function(e){return new(e||t)(m.Ob(s.a),m.Ob(n.d),m.Ob(d.a),m.Ob(b.a),m.Ob(s.g))},t.\u0275cmp=m.Ib({type:t,selectors:[["app-task-main-infeed"]],decls:34,vars:32,consts:[["mat-dialog-title",""],["autocomplete","off",3,"formGroup"],["mat-dialog-content",""],["matInput","","formControlName","barcode","required",""],["formControlName","original","required",""],["class","mat-optgroup-lv2",4,"ngFor","ngForOf"],["matInput","","formControlName","destination",3,"cleave"],["mat-dialog-actions","","align","end"],["formControlName","manual","color","primary"],[1,"spacer"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""],[1,"mat-optgroup-lv2"],[4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(t,e){1&t&&(m.Ub(0,"h2",0),m.Hc(1),m.gc(2,"translate"),m.Tb(),m.Ub(3,"form",1),m.Ub(4,"div",2),m.Ub(5,"mat-form-field"),m.Ub(6,"mat-label"),m.Hc(7),m.gc(8,"translate"),m.Tb(),m.Pb(9,"input",3),m.Tb(),m.Ub(10,"mat-form-field"),m.Ub(11,"mat-label"),m.Hc(12),m.gc(13,"translate"),m.Tb(),m.Ub(14,"mat-select",4),m.Fc(15,w,5,3,"mat-optgroup",5),m.Tb(),m.Tb(),m.Ub(16,"mat-form-field"),m.Ub(17,"mat-label"),m.Hc(18),m.gc(19,"translate"),m.Tb(),m.Pb(20,"input",6),m.Tb(),m.Tb(),m.Ub(21,"div",7),m.Ub(22,"mat-slide-toggle",8),m.Hc(23),m.gc(24,"translate"),m.Tb(),m.Pb(25,"span",9),m.Ub(26,"button",10),m.bc("click",function(){return e.save()}),m.Hc(27),m.gc(28,"uppercase"),m.gc(29,"translate"),m.Tb(),m.Ub(30,"button",11),m.Hc(31),m.gc(32,"uppercase"),m.gc(33,"translate"),m.Tb(),m.Tb(),m.Tb()),2&t&&(m.Cb(1),m.Ic(m.hc(2,11,"routes.task.infeed")),m.Cb(2),m.lc("formGroup",e.form),m.Cb(4),m.Ic(m.hc(8
|