山东雷驰
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
76 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{QfSI:function(t,e,r){"use strict";r.r(e),r.d(e,"QueryModule",function(){return ia});var a=r("PCNd"),o=r("tyNb"),i=r("mrSG"),c=r("pHS2"),n=r("wd/R"),l=r("fXoL"),s=r("S+vS"),d=r("bUwk"),u=r("Xi3o"),m=r("TmDA"),p=r("d3UM"),f=r("3Pt+"),b=r("ofXK"),h=r("FKr1"),g=r("bTqV"),_=r("++hd"),y=r("NFeN"),v=r("kmnG"),C=r("0IaG"),T=r("bv9b"),w=r("sYmb");const S=["$crud"],$=["$barcode"],F=["$qs"],q=["$qsSelect"],O=["$enabled"],U=["$supplier"],k=["$time"],I=["$area"],H=["$category"],G=["$download"];function x(t,e){if(1&t&&l.Hc(0),2&t){const t=e.$implicit;l.Ic(t.barcode.startsWith("#@")?"":t.barcode)}}function M(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.material.enum.qs."+e.$implicit.qualityState))}function P(t,e){if(1&t&&(l.Ub(0,"mat-option",15),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.lc("value",t.code),l.Cb(1),l.Ic(t.name)}}function j(t,e){if(1&t&&(l.Ub(0,"mat-select",13),l.bc("ngModelChange",function(t){return e.$implicit.qualityState=t}),l.Fc(1,P,2,2,"mat-option",14),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("ngModel",t.qualityState)("disabled",!0),l.Cb(1),l.lc("ngForOf",r.qualityState)}}function L(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.material.enum.enabled."+e.$implicit.enabled))}function A(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.material.enum.supplier."+e.$implicit.supplier))}function D(t,e){1&t&&(l.Hc(0),l.gc(1,"date")),2&t&&l.Ic(l.ic(1,1,e.$implicit[e.field.id],"yyyy-MM-dd HH:mm:ss"))}function N(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",16),l.bc("click",function(){return l.wc(t),l.fc().export()}),l.Hc(1),l.gc(2,"uppercase"),l.gc(3,"translate"),l.Tb()}2&t&&(l.Cb(1),l.Ic(l.hc(2,1,l.hc(3,3,"routes.query.stock.export"))))}function V(t,e){1&t&&(l.Ub(0,"p"),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"ul",19),l.Ub(4,"li",20),l.Ub(5,"span"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Ub(8,"li",21),l.Ub(9,"span"),l.Hc(10),l.gc(11,"translate"),l.Tb(),l.Tb(),l.Ub(12,"li",22),l.Ub(13,"span"),l.Hc(14),l.gc(15,"translate"),l.Tb(),l.Tb(),l.Ub(16,"li",23),l.Ub(17,"span"),l.Hc(18),l.gc(19,"translate"),l.Tb(),l.Tb(),l.Ub(20,"li",24),l.Ub(21,"span"),l.Hc(22),l.gc(23,"translate"),l.Tb(),l.Tb(),l.Ub(24,"li",25),l.Ub(25,"span"),l.Hc(26),l.gc(27,"translate"),l.Tb(),l.Tb(),l.Tb()),2&t&&(l.Cb(1),l.Ic(l.hc(2,7,"shared.operation.dyeing")),l.Cb(5),l.Ic(l.hc(7,9,"routes.material.enum.materialAge.ng")),l.Cb(4),l.Ic(l.hc(11,11,"routes.material.enum.materialAge.freeze")),l.Cb(4),l.Ic(l.hc(15,13,"routes.material.enum.materialAge.normal")),l.Cb(4),l.Ic(l.hc(19,15,"routes.material.enum.materialAge.over3")),l.Cb(4),l.Ic(l.hc(23,17,"routes.material.enum.materialAge.over5")),l.Cb(4),l.Ic(l.hc(27,19,"routes.material.enum.materialAge.over7")))}const E=function(t){return{"app-foreground-primary":t}};function B(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",17),l.bc("click",function(){l.wc(t);const e=l.fc();return e.colorful=!e.colorful}),l.Ub(1,"mat-icon"),l.Hc(2,"brush"),l.Tb(),l.Fc(3,V,28,21,"ng-template",null,18,l.Gc),l.Tb()}if(2&t){const t=l.uc(4),e=l.fc();l.lc("matTooltipTemplate",t)("ngClass",l.pc(2,E,e.colorful))}}function Y(t,e){if(1&t&&(l.Ub(0,"mat-option",15),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.lc("value",t.id),l.Cb(1),l.Ic(t.name)}}function R(t,e){if(1&t&&(l.Ub(0,"mat-optgroup",29),l.Fc(1,Y,2,2,"mat-option",14),l.Tb()),2&t){const t=e.$implicit;l.lc("label",t.name),l.Cb(1),l.lc("ngForOf",t.area)}}function W(t,e){if(1&t&&(l.Ub(0,"mat-form-field",26),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Ub(4,"mat-select",27),l.Fc(5,R,2,2,"mat-optgroup",28),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(3,3,"routes.task.area")),l.Cb(3),l.lc("ngForOf",r.area)}}function J(t,e){if(1&t&&(l.Ub(0,"mat-option",15),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.Cc("padding-left",16*t.level+"px"),l.lc("value",t.data.id),l.Cb(1),l.Ic(t.data.name)}}function z(t,e){if(1&t&&(l.Ub(0,"mat-form-field",26),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Ub(4,"mat-select",30),l.Pb(5,"mat-option"),l.Fc(6,J,2,4,"mat-option",31),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(3,3,"routes.material.cat")),l.Cb(4),l.lc("ngForOf",r.category.items)}}function Q(t,e){1&t&&(l.Ub(0,"div",36),l.Ub(1,"button",37),l.Hc(2),l.gc(3,"uppercase"),l.gc(4,"translate"),l.Tb(),l.Tb()),2&t&&(l.Cb(2),l.Ic(l.hc(3,1,l.hc(4,3,"shared.dialog.ok"))))}function K(t,e){if(1&t&&(l.Ub(0,"h2",32),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"div",33),l.Pb(4,"mat-progress-bar",34),l.Ub(5,"p"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Fc(8,Q,5,5,"div",35)),2&t){const t=l.fc();l.Cb(1),l.Ic(l.hc(2,6,"shared.dialog.title")),l.Cb(3),l.lc("mode",t.download.loaded||t.download.error?"determinate":"indeterminate")("color",t.download.error?"warn":"primary")("value",t.download.error?100:100*t.download.loaded/t.download.total),l.Cb(2),l.Ic(l.hc(7,8,t.download.error?"shared.notification.fail":"routes.query.stock.exporting")),l.Cb(2),l.lc("ngIf",t.download.error)}}let X=(()=>{class t{constructor(t,e,r){this._dialogService=t,this._httpService=e,this._i18nService=r,this._colorful=!0,this._dfs=t=>{var e;const r=[];if(null==t?void 0:t.length){const a=[...t.reverse()];for(;a.length;){const t=a.pop();r.push(t),(null===(e=t.children)||void 0===e?void 0:e.length)&&a.push(...t.children.reverse())}}return r},this.convertor=t=>(t.items.forEach(t=>{t&&null==t.enabled&&null!=t.id&&(t.enabled=!(null!=t.qualityState&&"ok"!=t.qualityState||t.overdueTimeSpan>0||t.minimumStockTimeSpan>0||t.maximumStockTimeSpan>0))}),t),this.dyeing=t=>{if(this.colorful){if("ng"==t.qualityState)return"app-background-ng-lighter";if(0==t.enabled)return"app-background-freeze-lighter";if(t.materialAge>=7)return"app-background-warn-lighter";if(t.materialAge>=5)return"app-background-over5-lighter";if(t.materialAge>=3)return"app-background-accent-lighter";if(t.materialAge&&t.materialAge<3)return"app-background-primary-lighter"}return null},this.export=()=>{this._download={loaded:0,total:0,error:!1};const t=this._dialogService.show(this._downloadDialog);this._httpService.download("stocks/excel?"+this._template.query,"WMS STOCK "+n().format("YYYYMMDDHHmmss"),"GET",{onProgress:e=>{switch(e.type){case 3:this._download.loaded=e.loaded,this._download.total=e.total;break;case 4:t.close()}}}).catch(()=>this._download.error=!0)}}ngAfterViewInit(){return Object(i.a)(this,void 0,void 0,function*(){const t=yield this._httpService.join(this._httpService.get("warehouses"),this._httpService.get("areas"),this._httpService.get("materials/categories"),this._httpService.get("items?name=qualityState"));let e=Object(c.a)(t[1].items.filter(t=>null!=t.remark),"warehouse");this._area=t[0].items.filter(t=>t.area=e[t.id]),e=t[1].items.map(t=>t.id),this._category={map:{},items:[]},this._dfs(t[2].children).forEach(t=>{this.category.map[t.data.id]=t,this.category.items.push(t)}),this._qualityState=t[3].items,this._defination=[{id:"barcode",header:"routes.query.stock.barcode",template:this._barcodeColumn,filter:{order:2,field:"text"}},{id:"code",header:"routes.material.code",filter:{order:3,field:"text"}},{id:"name",header:"routes.material.name",filter:{order:4,field:"text"}},{id:"warehouse",header:"routes.query.stock.warehouse"},{id:"area",header:"routes.query.stock.area",filter:{order:1,field:"multi-select",template:this._areaControl,default:e},display:null},{id:"cell",header:"routes.query.stock.cell",filter:{order:8,field:"text"}},{id:"quantity",header:"routes.material.qty"},{id:"bill",header:"routes.material.bill",filter:{order:5,field:"text"}},{id:"enabled",header:"routes.material.enabled",template:this._enabledColumn,filter:{order:7,field:"select",range:[{id:"true",name:this._i18nService.translate("routes.material.enum.enabled.true")},{id:"false",name:this._i18nService.translate("routes.material.enum.enabled.false")}]}},{id:"materialAge",header:"routes.material.materialAge"},{id:"inboundTime",header:"routes.query.stock.create",template:this._timeColumn,filter:{order:10,field:"datetime-range"}},{id:"inventoryTime",header:"routes.query.stock.update",template:this._timeColumn,display:null},{id:"category",header:"routes.material.cat",display:null,filter:{order:2,field:"select",template:this._categoryControl,convertor:t=>t?this._dfs([this.category.map[t]]).map(t=>`category=${t.data.id}&`).join(""):""}},{id:"remark",header:"routes.material.remark"},{id:"isWms",header:"routes.material.isWms",display:null},{id:"isLocal",header:"routes.material.isLocal",display:null}],this._api="stocks"})}get defination(){return this._defination}get api(){return this._api}get area(){return this._area}get qualityState(){return this._qualityState}get category(){return this._category}get colorful(){return this._colorful}get download(){return this._download}set colorful(t){this._colorful=t}}return t.\u0275fac=function(e){return new(e||t)(l.Ob(s.a),l.Ob(d.a),l.Ob(u.a))},t.\u0275cmp=l.Ib({type:t,selectors:[["app-query-stock"]],viewQuery:function(t,e){if(1&t&&(l.Oc(S,!0),l.Oc($,!0),l.Oc(F,!0),l.Oc(q,!0),l.Oc(O,!0),l.Oc(U,!0),l.Oc(k,!0),l.Oc(I,!0),l.Oc(H,!0),l.Oc(G,!0)),2&t){let t;l.tc(t=l.cc())&&(e._template=t.first),l.tc(t=l.cc())&&(e._barcodeColumn=t.first),l.tc(t=l.cc())&&(e._qsColumn=t.first),l.tc(t=l.cc())&&(e._qsSelectColumn=t.first),l.tc(t=l.cc())&&(e._enabledColumn=t.first),l.tc(t=l.cc())&&(e._supplierColumn=t.first),l.tc(t=l.cc())&&(e._timeColumn=t.first),l.tc(t=l.cc())&&(e._areaControl=t.first),l.tc(t=l.cc())&&(e._categoryControl=t.first),l.tc(t=l.cc())&&(e._downloadDialog=t.first)}},decls:24,vars:11,consts:[[3,"selectable","addable","editable","deletable","row-class","defination","api","query","convertor","toolbar-buttons-template","toolbar-icons-template"],["$crud",""],["$barcode",""],["$qs",""],["$qsSelect",""],["$enabled",""],["$supplier",""],["$time",""],["$export",""],["$dyeing",""],["$area",""],["$category",""],["$download",""],[2,"width","100px",3,"ngModel","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["mat-button","","color","primary",3,"click"],["mat-icon-button","",3,"matTooltipTemplate","ngClass","click"],["$tooltip",""],[1,"tooltip-ul"],[1,"app-foreground-ng"],[1,"app-foreground-freeze"],[1,"app-foreground-primary"],[1,"app-foreground-accent"],[1,"app-foreground-over5"],[1,"app-foreground-warn"],[3,"formGroup"],["formControlName","area","multiple",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],["formControlName","category"],[3,"value","paddingLeft",4,"ngFor","ngForOf"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"mode","color","value"],["mat-dialog-actions","","align","end",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary","mat-dialog-close",""]],template:function(t,e){if(1&t&&(l.Ub(0,"crud-template",0,1),l.Fc(2,x,1,1,"ng-template",null,2,l.Gc),l.Fc(4,M,2,3,"ng-template",null,3,l.Gc),l.Fc(6,j,2,3,"ng-template",null,4,l.Gc),l.Fc(8,L,2,3,"ng-template",null,5,l.Gc),l.Fc(10,A,2,3,"ng-template",null,6,l.Gc),l.Fc(12,D,2,4,"ng-template",null,7,l.Gc),l.Fc(14,N,4,5,"ng-template",null,8,l.Gc),l.Fc(16,B,5,4,"ng-template",null,9,l.Gc),l.Fc(18,W,6,5,"ng-template",null,10,l.Gc),l.Fc(20,z,7,5,"ng-template",null,11,l.Gc),l.Fc(22,K,9,10,"ng-template",null,12,l.Gc),l.Tb()),2&t){const t=l.uc(15),r=l.uc(17);l.lc("selectable",!1)("addable",!1)("editable",!1)("deletable",!1)("row-class",e.dyeing)("defination",e.defination)("api",e.api)("query","bQty=true")("convertor",e.convertor)("toolbar-buttons-template",t)("toolbar-icons-template",r)}},directives:[m.a,p.a,f.n,f.q,b.m,h.o,g.a,_.a,b.l,y.a,v.b,f.o,f.g,v.e,f.f,h.n,C.h,C.e,T.a,b.n,C.c,C.d],pipes:[w.d,b.e,b.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}.mat-dialog-content[_ngcontent-%COMP%] .mat-progress-bar[_ngcontent-%COMP%] + p[_ngcontent-%COMP%]{margin-top:12px}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}"]}),t})();var Z=r("qFsG");const tt=["$crud"],et=["$trans"],rt=["$barcode"],at=["$qty"],ot=["$qs"],it=["$qsSelect"],ct=["$time"],nt=["$area"],lt=["$cell"],st=["$ends"],dt=["$download"],ut=["$laxian"];function mt(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.query.record."+e.$implicit.transaction))}function pt(t,e){if(1&t&&l.Hc(0),2&t){const t=e.$implicit;l.Ic(t.barcode.startsWith("#@")?"":t.barcode)}}function ft(t,e){if(1&t&&l.Hc(0),2&t){const t=e.$implicit;l.Ic("inbound"==t.transaction?"+"+t.quantity:t.quantity)}}function bt(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.material.enum.qs."+e.$implicit.qualityState))}function ht(t,e){if(1&t&&(l.Ub(0,"mat-option",16),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.lc("value",t.code),l.Cb(1),l.Ic(t.name)}}function gt(t,e){if(1&t&&(l.Ub(0,"mat-select",14),l.bc("ngModelChange",function(t){return e.$implicit.qualityState=t}),l.Fc(1,ht,2,2,"mat-option",15),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("ngModel",t.qualityState)("disabled",!0),l.Cb(1),l.lc("ngForOf",r.qualityState)}}function _t(t,e){1&t&&(l.Hc(0),l.gc(1,"date")),2&t&&l.Ic(l.ic(1,1,e.$implicit[e.field.id],"yyyy-MM-dd HH:mm:ss"))}function yt(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",17),l.bc("click",function(){return l.wc(t),l.fc().export()}),l.Hc(1),l.gc(2,"uppercase"),l.gc(3,"translate"),l.Tb()}2&t&&(l.Cb(1),l.Ic(l.hc(2,1,l.hc(3,3,"routes.query.record.export"))))}function vt(t,e){if(1&t&&(l.Ub(0,"mat-option",16),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.lc("value",t.id),l.Cb(1),l.Ic(t.name)}}function Ct(t,e){if(1&t&&(l.Ub(0,"mat-optgroup",21),l.Fc(1,vt,2,2,"mat-option",15),l.Tb()),2&t){const t=e.$implicit;l.lc("label",t.name),l.Cb(1),l.lc("ngForOf",t.area)}}function Tt(t,e){if(1&t&&(l.Ub(0,"mat-form-field",18),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Ub(4,"mat-select",19),l.Fc(5,Ct,2,2,"mat-optgroup",20),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(3,3,"routes.task.area")),l.Cb(3),l.lc("ngForOf",r.area)}}function wt(t,e){if(1&t){const t=l.Vb();l.Ub(0,"mat-form-field",18),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Pb(4,"input",22),l.Ub(5,"button",23),l.bc("click",function(){return l.wc(t),l.fc().expand()}),l.Ub(6,"mat-icon"),l.Hc(7,"more_horiz"),l.Tb(),l.Tb(),l.Tb()}2&t&&(l.lc("formGroup",e.$implicit),l.Cb(2),l.Ic(l.hc(3,2,"routes.query.record.cell")))}function St(t,e){if(1&t&&(l.Ub(0,"mat-option",16),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.lc("value",t.code),l.Cb(1),l.Ic(t.code)}}function $t(t,e){if(1&t&&(l.Ub(0,"mat-form-field",18),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Ub(4,"mat-select",24),l.Fc(5,St,2,2,"mat-option",15),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(3,3,"routes.query.record.slTarget")),l.Cb(3),l.lc("ngForOf",r.hiLaxianItems)}}function Ft(t,e){if(1&t&&(l.Ub(0,"div",25),l.Ub(1,"mat-form-field",18),l.Ub(2,"mat-label"),l.Hc(3),l.gc(4,"translate"),l.Tb(),l.Pb(5,"input",26),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=e.field,a=l.fc();l.lc("hidden",!a.filter.cellExpand),l.Cb(1),l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(4,4,r.label)),l.Cb(2),l.lc("formControlName",r.id)}}function qt(t,e){1&t&&(l.Ub(0,"div",31),l.Ub(1,"button",32),l.Hc(2),l.gc(3,"uppercase"),l.gc(4,"translate"),l.Tb(),l.Tb()),2&t&&(l.Cb(2),l.Ic(l.hc(3,1,l.hc(4,3,"shared.dialog.ok"))))}function Ot(t,e){if(1&t&&(l.Ub(0,"h2",27),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"div",28),l.Pb(4,"mat-progress-bar",29),l.Ub(5,"p"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Fc(8,qt,5,5,"div",30)),2&t){const t=l.fc();l.Cb(1),l.Ic(l.hc(2,6,"shared.dialog.title")),l.Cb(3),l.lc("mode",t.download.loaded||t.download.error?"determinate":"indeterminate")("color",t.download.error?"warn":"primary")("value",t.download.error?100:100*t.download.loaded/t.download.total),l.Cb(2),l.Ic(l.hc(7,8,t.download.error?"shared.notification.fail":"routes.query.record.exporting")),l.Cb(2),l.lc("ngIf",t.download.error)}}const Ut=(new Date).getDate(),kt=(new Date).getMonth(),It=(new Date).getFullYear();let Ht=(()=>{class t{constructor(t,e,r){this._dialogService=t,this._httpService=e,this._i18nService=r,this.refresh=t=>{switch(t){case"search":this.filter.cellBackup=this._template.filter.form.controls.cell.value,this.filter.originalBackup=this._template.filter.form.controls.original.value,this.filter.destinationBackup=this._template.filter.form.controls.destination.value;break;case"reset":this.filter.cellBackup=null,this.filter.originalBackup=null,this.filter.destinationBackup=null}},this.expand=()=>{this._filter.cellExpand=!this._filter.cellExpand,this._filter.cellExpand?(this._template.filter.form.controls.cell.disable(),this._template.filter.form.controls.cell.setValue(null),this._template.filter.form.controls.original.setValue(this._filter.originalBackup),this._template.filter.form.controls.destination.setValue(this._filter.destinationBackup)):(this._template.filter.form.controls.cell.enable(),this._template.filter.form.controls.cell.setValue(this._filter.cellBackup),this._template.filter.form.controls.original.setValue(null),this._template.filter.form.controls.destination.setValue(null))},this.convertor=t=>(t.items.forEach(t=>{t.transaction=t.transaction.toLowerCase(),t.remark&&(t.remark=t.remark.message)}),t),this.dyeing=t=>{if(this.colorful)switch(t.transaction){case"inbound":return"app-background-primary-lighter";case"outbound":return"app-background-accent-lighter"}return null},this.export=()=>{this._download={loaded:0,total:0,error:!1};const t=this._dialogService.show(this._downloadDialog);this._httpService.download("records/excel?"+this._template.query,"WMS RECORD "+n().format("YYYYMMDDHHmmss"),"GET",{onProgress:e=>{switch(e.type){case 3:this._download.loaded=e.loaded,this._download.total=e.total;break;case 4:t.close()}}}).catch(()=>this._download.error=!0)}}ngAfterViewInit(){return Object(i.a)(this,void 0,void 0,function*(){const t=yield this._httpService.join(this._httpService.get("warehouses"),this._httpService.get("areas"),this._httpService.get("items?name=hiLineCode"),this._httpService.get("items?name=qualityState"));let e=Object(c.a)(t[1].items,"warehouse");this._area=t[0].items.filter(t=>t.area=e[t.id]),e=t[1].items.map(t=>t.id),this._qualityState=t[3].items,this._defination=[{id:"transaction",header:"routes.query.record.trans",template:this._transColumn,filter:{order:1,field:"multi-select",range:[{id:"ScanInbound",name:this._i18nService.translate("routes.query.record.scaninbound")},{id:"PalletIn",name:this._i18nService.translate("routes.query.record.palletin")},{id:"Infeed",name:this._i18nService.translate("routes.query.record.infeed")},{id:"ApplyOut",name:this._i18nService.translate("routes.query.record.applyout")},{id:"PalletOut",name:this._i18nService.translate("routes.query.record.palletout")},{id:"Outbound",name:this._i18nService.translate("routes.query.record.outbound")},{id:"Transfer",name:this._i18nService.translate("routes.query.record.transfer")},{id:"Outfeed",name:this._i18nService.translate("routes.query.record.outfeed")},{id:"freeze",name:this._i18nService.translate("routes.query.record.freeze")},{id:"thaw",name:this._i18nService.translate("routes.query.record.thaw")},{id:"Cancel",name:this._i18nService.translate("routes.query.record.cancel")},{id:"Bypass",name:this._i18nService.translate("routes.query.record.bypass")}],default:["ScanInbound","PalletIn","Infeed","ApplyOut","PalletOut","Outbound","Transfer","Outfeed","freeze","thaw","Cancel","Bypass"]}},{id:"barcode",header:"routes.query.stock.barcode",template:this._barcodeColumn,filter:{order:3,field:"text"}},{id:"warehouse",header:"routes.query.record.warehouse"},{id:"area",header:"routes.query.record.area",filter:{order:2,field:"multi-select",template:this._areaControl,default:e},display:null},{id:"cell",header:"routes.query.record.cell",filter:{order:4,field:"text",template:this._cellControl},display:null},{id:"original",header:"routes.query.record.original",filter:{order:5,field:"text",template:this._endsControl}},{id:"destination",header:"routes.query.record.destination",filter:{order:6,field:"text",template:this._endsControl}},{id:"code",header:"routes.material.code",filter:{order:7,field:"text"}},{id:"name",header:"routes.material.name",filter:{order:8,field:"text"}},{id:"quantity",header:"routes.material.qty"},{id:"bill",header:"routes.material.bill",filter:{order:10,field:"text"}},{id:"beginTime",header:"routes.query.record.begin",template:this._timeColumn,filter:{order:11,field:"datetime-range",default:[n(new Date(It,kt-1,Ut,0,0,0)),n(new Date(It,kt,Ut,23,59,59))]}},{id:"endTime",header:"routes.query.record.end",template:this._timeColumn,filter:{order:12,field:"datetime-range"}},{id:"operator",header:"routes.query.record.operator"},{id:"remark",header:"routes.query.record.remark"},{id:"tag",header:"routes.query.record.tag"}],this._api="records",this._hiLaxianItems=t[2].items})}get defination(){return this._defination}get api(){return this._api}get filter(){var t;return null!==(t=this._filter)&&void 0!==t?t:this._filter={cellExpand:!1,cellBackup:null,originalBackup:null,destinationBackup:null}}get area(){return this._area}get qualityState(){return this._qualityState}get expanded(){return this._expanded}get colorful(){return this._colorful}get download(){return this._download}get hiLaxianItems(){return this._hiLaxianItems}set colorful(t){this._colorful=t}}return t.\u0275fac=function(e){return new(e||t)(l.Ob(s.a),l.Ob(d.a),l.Ob(u.a))},t.\u0275cmp=l.Ib({type:t,selectors:[["app-query-record"]],viewQuery:function(t,e){if(1&t&&(l.Oc(tt,!0),l.Oc(et,!0),l.Oc(rt,!0),l.Oc(at,!0),l.Oc(ot,!0),l.Oc(it,!0),l.Oc(ct,!0),l.Oc(nt,!0),l.Oc(lt,!0),l.Oc(st,!0),l.Oc(dt,!0),l.Oc(ut,!0)),2&t){let t;l.tc(t=l.cc())&&(e._template=t.first),l.tc(t=l.cc())&&(e._transColumn=t.first),l.tc(t=l.cc())&&(e._barcodeColumn=t.first),l.tc(t=l.cc())&&(e._qtyColumn=t.first),l.tc(t=l.cc())&&(e._qsColumn=t.first),l.tc(t=l.cc())&&(e._qsSelectColumn=t.first),l.tc(t=l.cc())&&(e._timeColumn=t.first),l.tc(t=l.cc())&&(e._areaControl=t.first),l.tc(t=l.cc())&&(e._cellControl=t.first),l.tc(t=l.cc())&&(e._endsControl=t.first),l.tc(t=l.cc())&&(e._downloadDialog=t.first),l.tc(t=l.cc())&&(e._laxianColumn=t.first)}},decls:26,vars:10,consts:[[3,"selectable","addable","editable","deletable","row-class","defination","api","query","convertor","toolbar-buttons-template","refresh"],["$crud",""],["$trans",""],["$barcode",""],["$qty",""],["$qs",""],["$qsSelect",""],["$time",""],["$export",""],["$area",""],["$cell",""],["$laxian",""],["$ends",""],["$download",""],[2,"width","100px",3,"ngModel","disabled","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["mat-button","","color","primary",3,"click"],[3,"formGroup"],["formControlName","area","multiple",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],["matInput","","formControlName","cell"],["matSuffix","","mat-icon-button","",3,"click"],["formControlName","slTarget"],[1,"indent",3,"hidden"],["matInput","",3,"formControlName"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"mode","color","value"],["mat-dialog-actions","","align","end",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary","mat-dialog-close",""]],template:function(t,e){if(1&t&&(l.Ub(0,"crud-template",0,1),l.bc("refresh",function(t){return e.refresh(t)}),l.Fc(2,mt,2,3,"ng-template",null,2,l.Gc),l.Fc(4,pt,1,1,"ng-template",null,3,l.Gc),l.Fc(6,ft,1,1,"ng-template",null,4,l.Gc),l.Fc(8,bt,2,3,"ng-template",null,5,l.Gc),l.Fc(10,gt,2,3,"ng-template",null,6,l.Gc),l.Fc(12,_t,2,4,"ng-template",null,7,l.Gc),l.Fc(14,yt,4,5,"ng-template",null,8,l.Gc),l.Fc(16,Tt,6,5,"ng-template",null,9,l.Gc),l.Fc(18,wt,8,4,"ng-template",null,10,l.Gc),l.Fc(20,$t,6,5,"ng-template",null,11,l.Gc),l.Fc(22,Ft,6,6,"ng-template",null,12,l.Gc),l.Fc(24,Ot,9,10,"ng-template",null,13,l.Gc),l.Tb()),2&t){const t=l.uc(15);l.lc("selectable",!1)("addable",!1)("editable",!1)("deletable",!1)("row-class",e.dyeing)("defination",e.defination)("api",e.api)("query","pallet=false")("convertor",e.convertor)("toolbar-buttons-template",t)}},directives:[m.a,p.a,f.n,f.q,b.m,h.o,g.a,v.b,f.o,f.g,v.e,f.f,h.n,Z.b,f.c,v.f,y.a,C.h,C.e,T.a,b.n,C.c,C.d],pipes:[w.d,b.e,b.v],styles:[".indent[_ngcontent-%COMP%]{padding-left:16px}.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}.mat-dialog-content[_ngcontent-%COMP%] .mat-progress-bar[_ngcontent-%COMP%] + p[_ngcontent-%COMP%]{margin-top:12px}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}"]}),t})();var Gt=r("BeL+"),xt=r("Olgc"),Mt=r("iadO");function Pt(t,e){if(1&t&&(l.Ub(0,"mat-option",23),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.lc("value",t),l.Cb(1),l.Ic(t.name)}}function jt(t,e){if(1&t&&(l.Ub(0,"mat-optgroup",22),l.Fc(1,Pt,2,2,"mat-option",7),l.Tb()),2&t){const t=e.$implicit;l.lc("label",t.data.name),l.Cb(1),l.lc("ngForOf",t.material)}}function Lt(t,e){if(1&t&&(l.Ub(0,"mat-option",23),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.lc("value",t),l.Cb(1),l.Ic(t.name)}}let At=(()=>{class t{constructor(t,e,r,a){this._formBuilder=t,this._httpService=e,this._toastService=r,this._dialogRef=a,this._dfs=t=>{var e;const r=[];if(null==t?void 0:t.length){const a=[...t.reverse()];for(;a.length;){const t=a.pop();r.push(t),(null===(e=t.children)||void 0===e?void 0:e.length)&&a.push(...t.children.reverse())}}return r},this.reCheckBatch=()=>Object(i.a)(this,void 0,void 0,function*(){this._batchList=null,this._formGroup.controls.batch.setValue(null),this._httpService.get("stocks/batch?material="+this._formGroup.controls.code.value.id).then(t=>{this._batchList=t.items})}),this.save=()=>Object(i.a)(this,void 0,void 0,function*(){if(!this._formGroup.controls.supplier.value||""==this._formGroup.controls.supplier.value.trim())return void this._toastService.show("\u8bf7\u586b\u5199\u51bb\u7ed3\u539f\u56e0");let t=yield this._httpService.post("stocks/setQcStatus",{operation:"freeze",code:null==this._formGroup.controls.code.value?null:this._formGroup.controls.code.value.id,batch:null==this._formGroup.controls.batch.value?null:this._formGroup.controls.batch.value.code,mfgFrom:this._formGroup.controls.mfgFrom.value,mfgTo:this._formGroup.controls.mfgTo.value,inboundTimeFrom:this._formGroup.controls.inboundTimeFrom.value,inboundTimeTo:this._formGroup.controls.inboundTimeTo.value,barcode:this._formGroup.controls.barcode.value,supplier:this._formGroup.controls.supplier.value}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef"),this._dialogRef.close({success:!1})});void 0!==t&&(this._toastService.show("\u64cd\u4f5c\u6210\u529f \u51bb\u7ed3\u6258\u76d8\u6570\u91cf:"+t),this._dialogRef.close({success:!0}))}),this._formGroup=this._formBuilder.group({code:[null],batch:[null],mfgFrom:[null],mfgTo:[null],inboundTimeFrom:[null],inboundTimeTo:[null],barcode:[null],supplier:[null]}),this._httpService.join(this._httpService.get("materials/categories"),this._httpService.get("materials")).then(t=>{const e=Object(c.a)(t[1].items.filter(t=>1==t.group),"category");this._material=this._dfs(t[0].children).filter(t=>!!e[t.data.id]&&(t.material=e[t.data.id],!0))})}get formGroup(){return this._formGroup}get material(){return this._material}get batchList(){return this._batchList}ngOnInit(){}}return t.\u0275fac=function(e){return new(e||t)(l.Ob(f.d),l.Ob(d.a),l.Ob(xt.a),l.Ob(C.g))},t.\u0275cmp=l.Ib({type:t,selectors:[["app-freeze"]],decls:58,vars:39,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["autocomplete","off",3,"formGroup"],["form",""],["formControlName","code",3,"selectionChange"],[3,"label",4,"ngFor","ngForOf"],["formControlName","batch"],[3,"value",4,"ngFor","ngForOf"],[3,"rangePicker"],["matStartDate","","formControlName","mfgFrom",3,"click"],["matEndDate","","formControlName","mfgTo",3,"click"],["matSuffix","",3,"for"],["$mfgpicker",""],["matStartDate","","formControlName","inboundTimeFrom",3,"click"],["matEndDate","","formControlName","inboundTimeTo",3,"click"],["$inboundpicker",""],["matInput","","formControlName","barcode"],["barcodeInput",""],["matInput","","formControlName","supplier","required",""],["mat-dialog-actions","","align","end"],["mat-button","","color","primary",3,"disabled","click"],["mat-button","","mat-dialog-close",""],[3,"label"],[3,"value"]],template:function(t,e){if(1&t){const t=l.Vb();l.Ub(0,"h2",0),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"div",1),l.Ub(4,"form",2,3),l.Ub(6,"mat-form-field"),l.Ub(7,"mat-label"),l.Hc(8),l.gc(9,"translate"),l.Tb(),l.Ub(10,"mat-select",4),l.bc("selectionChange",function(){return e.reCheckBatch()}),l.Fc(11,jt,2,2,"mat-optgroup",5),l.Tb(),l.Tb(),l.Ub(12,"mat-form-field"),l.Ub(13,"mat-label"),l.Hc(14),l.gc(15,"translate"),l.Tb(),l.Ub(16,"mat-select",6),l.Fc(17,Lt,2,2,"mat-option",7),l.Tb(),l.Tb(),l.Ub(18,"mat-form-field"),l.Ub(19,"mat-label"),l.Hc(20),l.gc(21,"translate"),l.Tb(),l.Ub(22,"mat-date-range-input",8),l.Ub(23,"input",9),l.bc("click",function(){return l.wc(t),l.uc(27).open()}),l.Tb(),l.Ub(24,"input",10),l.bc("click",function(){return l.wc(t),l.uc(27).open()}),l.Tb(),l.Tb(),l.Pb(25,"mat-datepicker-toggle",11),l.Pb(26,"mat-date-range-picker",null,12),l.Tb(),l.Ub(28,"mat-form-field"),l.Ub(29,"mat-label"),l.Hc(30),l.gc(31,"translate"),l.Tb(),l.Ub(32,"mat-date-range-input",8),l.Ub(33,"input",13),l.bc("click",function(){return l.wc(t),l.uc(37).open()}),l.Tb(),l.Ub(34,"input",14),l.bc("click",function(){return l.wc(t),l.uc(37).open()}),l.Tb(),l.Tb(),l.Pb(35,"mat-datepicker-toggle",11),l.Pb(36,"mat-date-range-picker",null,15),l.Tb(),l.Ub(38,"mat-form-field"),l.Ub(39,"mat-label"),l.Hc(40),l.gc(41,"translate"),l.Tb(),l.Pb(42,"input",16,17),l.Tb(),l.Ub(44,"mat-form-field"),l.Ub(45,"mat-label"),l.Hc(46),l.gc(47,"translate"),l.Tb(),l.Pb(48,"input",18),l.Tb(),l.Tb(),l.Tb(),l.Ub(49,"div",19),l.Ub(50,"button",20),l.bc("click",function(){return e.save()}),l.Hc(51),l.gc(52,"uppercase"),l.gc(53,"translate"),l.Tb(),l.Ub(54,"button",21),l.Hc(55),l.gc(56,"uppercase"),l.gc(57,"translate"),l.Tb(),l.Tb()}if(2&t){const t=l.uc(27),r=l.uc(37);l.Cb(1),l.Ic(l.hc(2,17,"routes.query.blocking.freeze")),l.Cb(3),l.lc("formGroup",e.formGroup),l.Cb(4),l.Ic(l.hc(9,19,"routes.material.code")),l.Cb(3),l.lc("ngForOf",e.material),l.Cb(3),l.Ic(l.hc(15,21,"routes.material.batch")),l.Cb(3),l.lc("ngForOf",e.batchList),l.Cb(3),l.Ic(l.hc(21,23,"routes.material.mfg")),l.Cb(2),l.lc("rangePicker",t),l.Cb(3),l.lc("for",t),l.Cb(5),l.Ic(l.hc(31,25,"routes.material.inboundTime")),l.Cb(2),l.lc("rangePicker",r),l.Cb(3),l.lc("for",r),l.Cb(5),l.Ic(l.hc(41,27,"routes.query.blocking.barcode")),l.Cb(6),l.Ic(l.hc(47,29,"routes.query.blocking.supplier")),l.Cb(4),l.lc("disabled",e.formGroup.invalid),l.Cb(1),l.Ic(l.hc(52,31,l.hc(53,33,"shared.dialog.ok"))),l.Cb(4),l.Ic(l.hc(56,35,l.hc(57,37,"shared.dialog.cancel")))}},directives:[C.h,C.e,f.v,f.o,f.g,v.b,v.e,p.a,f.n,f.f,b.m,Mt.d,Mt.l,f.c,Mt.k,Mt.j,v.f,Mt.e,Z.b,f.t,C.c,g.a,C.d,h.n,h.o],pipes:[w.d,b.v],styles:[".mat-form-field[_ngcontent-%COMP%]{width:100%}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}"]}),t})();var Dt=r("Qu3c");const Nt=["$crud"],Vt=["$mode"],Et=["$qs"],Bt=["$overflow"],Yt=["$barcode"],Rt=["$time"],Wt=["$area"],Jt=["$category"],zt=["$download"],Qt=["$enabled"];function Kt(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.query.blocking."+e.$implicit.mode))}function Xt(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.material.enum.qs."+e.$implicit.qualityState))}function Zt(t,e){if(1&t&&(l.Ub(0,"span"),l.Hc(1),l.Tb()),2&t){const t=l.fc(),e=t.$implicit,r=t.field.id;l.Cb(1),l.Ic(e[r])}}function te(t,e){1&t&&l.Fc(0,Zt,2,1,"span",14),2&t&&l.lc("ngIf",e.$implicit[e.field.id]>0)}function ee(t,e){if(1&t&&l.Hc(0),2&t){const t=e.$implicit;l.Ic(t.barcode.startsWith("#@")?"":t.barcode)}}function re(t,e){1&t&&(l.Hc(0),l.gc(1,"date")),2&t&&l.Ic(l.ic(1,1,e.$implicit[e.field.id],"yyyy-MM-dd HH:mm:ss"))}function ae(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",15),l.bc("click",function(){return l.wc(t),l.fc().freeze()}),l.Hc(1),l.gc(2,"uppercase"),l.gc(3,"translate"),l.Tb(),l.Ub(4,"button",15),l.bc("click",function(){return l.wc(t),l.fc().export()}),l.Hc(5),l.gc(6,"uppercase"),l.gc(7,"translate"),l.Tb()}2&t&&(l.Cb(1),l.Ic(l.hc(2,2,l.hc(3,4,"routes.query.blocking.freeze"))),l.Cb(4),l.Ic(l.hc(6,6,l.hc(7,8,"routes.query.blocking.export"))))}function oe(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",16),l.bc("click",function(){return l.wc(t),l.fc().thaw()}),l.gc(1,"translate"),l.Ub(2,"mat-icon"),l.Hc(3,"brightness_high"),l.Tb(),l.Tb()}2&t&&l.mc("matTooltip",l.hc(1,1,"routes.query.blocking.thaw"))}function ie(t,e){1&t&&(l.Ub(0,"p"),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"ul",19),l.Ub(4,"li",20),l.Ub(5,"span"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Ub(8,"li",21),l.Ub(9,"span"),l.Hc(10),l.gc(11,"translate"),l.Tb(),l.Tb(),l.Ub(12,"li",22),l.Ub(13,"span"),l.Hc(14),l.gc(15,"translate"),l.Tb(),l.Tb(),l.Ub(16,"li",23),l.Ub(17,"span"),l.Hc(18),l.gc(19,"translate"),l.Tb(),l.Tb(),l.Tb()),2&t&&(l.Cb(1),l.Ic(l.hc(2,5,"shared.operation.dyeing")),l.Cb(5),l.Ic(l.hc(7,7,"routes.material.enum.materialAge.normal")),l.Cb(4),l.Ic(l.hc(11,9,"routes.material.enum.materialAge.over3")),l.Cb(4),l.Ic(l.hc(15,11,"routes.material.enum.materialAge.over5")),l.Cb(4),l.Ic(l.hc(19,13,"routes.material.enum.materialAge.over7")))}const ce=function(t){return{"app-foreground-primary":t}};function ne(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",17),l.bc("click",function(){l.wc(t);const e=l.fc();return e.colorful=!e.colorful}),l.Ub(1,"mat-icon"),l.Hc(2,"brush"),l.Tb(),l.Fc(3,ie,20,15,"ng-template",null,18,l.Gc),l.Tb()}if(2&t){const t=l.uc(4),e=l.fc();l.lc("matTooltipTemplate",t)("ngClass",l.pc(2,ce,e.colorful))}}function le(t,e){if(1&t&&(l.Ub(0,"mat-option",29),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.lc("value",t.id),l.Cb(1),l.Ic(t.name)}}function se(t,e){if(1&t&&(l.Ub(0,"mat-optgroup",27),l.Fc(1,le,2,2,"mat-option",28),l.Tb()),2&t){const t=e.$implicit;l.lc("label",t.name),l.Cb(1),l.lc("ngForOf",t.area)}}function de(t,e){if(1&t&&(l.Ub(0,"mat-form-field",24),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Ub(4,"mat-select",25),l.Fc(5,se,2,2,"mat-optgroup",26),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(3,3,"routes.task.area")),l.Cb(3),l.lc("ngForOf",r.area)}}function ue(t,e){if(1&t&&(l.Ub(0,"mat-option",29),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.Cc("padding-left",16*t.level+"px"),l.lc("value",t.data.id),l.Cb(1),l.Ic(t.data.name)}}function me(t,e){if(1&t&&(l.Ub(0,"mat-form-field",24),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Ub(4,"mat-select",30),l.Pb(5,"mat-option"),l.Fc(6,ue,2,4,"mat-option",31),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(3,3,"routes.material.cat")),l.Cb(4),l.lc("ngForOf",r.category.items)}}function pe(t,e){1&t&&(l.Ub(0,"div",36),l.Ub(1,"button",37),l.Hc(2),l.gc(3,"uppercase"),l.gc(4,"translate"),l.Tb(),l.Tb()),2&t&&(l.Cb(2),l.Ic(l.hc(3,1,l.hc(4,3,"shared.dialog.ok"))))}function fe(t,e){if(1&t&&(l.Ub(0,"h2",32),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"div",33),l.Pb(4,"mat-progress-bar",34),l.Ub(5,"p"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Fc(8,pe,5,5,"div",35)),2&t){const t=l.fc();l.Cb(1),l.Ic(l.hc(2,6,"shared.dialog.title")),l.Cb(3),l.lc("mode",t.download.loaded||t.download.error?"determinate":"indeterminate")("color",t.download.error?"warn":"primary")("value",t.download.error?100:100*t.download.loaded/t.download.total),l.Cb(2),l.Ic(l.hc(7,8,t.download.error?"shared.notification.fail":"routes.query.blocking.exporting")),l.Cb(2),l.lc("ngIf",t.download.error)}}function be(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.material.enum.enabled."+e.$implicit.enabled))}let he=(()=>{class t{constructor(t,e,r,a){this._dialogService=t,this._httpService=e,this._toastService=r,this._i18nService=a,this._colorful=!0,this._dfs=t=>{var e;const r=[];if(null==t?void 0:t.length){const a=[...t.reverse()];for(;a.length;){const t=a.pop();r.push(t),(null===(e=t.children)||void 0===e?void 0:e.length)&&a.push(...t.children.reverse())}}return r},this.convertor=t=>(t.items.forEach(t=>t.mode=null!=(null==t?void 0:t.enabled)?"force":"auto"),t),this.dyeing=t=>this.colorful?t.materialAge>=7?"app-background-warn-lighter":t.materialAge>=3?"app-background-accent-lighter":"app-background-primary-lighter":null,this.export=()=>{this._download={loaded:0,total:0,error:!1};const t=this._dialogService.show(this._downloadDialog);this._httpService.download("stocks/excel?"+this._template.query,"WMS BLOCKING "+n().format("YYYYMMDDHHmmss"),"GET",{onProgress:e=>{switch(e.type){case 3:this._download.loaded=e.loaded,this._download.total=e.total;break;case 4:t.close()}}}).catch(()=>this._download.error=!0)},this.freeze=()=>Object(i.a)(this,void 0,void 0,function*(){(yield this._dialogService.open(At,{data:null}))&&this._template.refresh()}),this.thaw=()=>Object(i.a)(this,void 0,void 0,function*(){if(yield this._dialogService.confirm(this._i18nService.translate("shared.notification.confirm"))){let t=yield this._httpService.post("stocks/setQcStatus",{operation:"thaw",barcodes:Object(Gt.a)(this._template.selection.selected.map(t=>t.barcode))}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.errorMessage)||"\u672a\u77e5\u9519\u8bef")});void 0!==t&&(this._toastService.show("\u64cd\u4f5c\u6210\u529f \u51bb\u7ed3\u6258\u76d8\u6570\u91cf:"+t),this._template.refresh())}})}ngAfterViewInit(){return Object(i.a)(this,void 0,void 0,function*(){const t=yield this._httpService.join(this._httpService.get("warehouses"),this._httpService.get("areas"),this._httpService.get("materials/categories"));let e=Object(c.a)(t[1].items,"warehouse");this._area=t[0].items.filter(t=>t.area=e[t.id]),e=t[1].items.map(t=>t.id),this._category={map:{},items:[]},this._dfs(t[2].children).forEach(t=>{this.category.map[t.data.id]=t,this.category.items.push(t)}),this._defination=[{id:"barcode",header:"routes.query.stock.barcode",template:this._barcodeColumn,filter:{order:6,field:"text"}},{id:"code",header:"routes.material.code",filter:{order:1,field:"text"}},{id:"name",header:"routes.material.name",filter:{order:2,field:"text"}},{id:"warehouse",header:"routes.query.stock.warehouse"},{id:"area",header:"routes.query.stock.area",display:null},{id:"cell",header:"routes.query.stock.cell"},{id:"batch",header:"routes.material.batch",display:null,filter:{order:3,field:"text"}},{id:"bill",header:"routes.material.bill"},{id:"qualityState",header:"routes.material.qs",template:this._qsColumn},{id:"enabled",header:"routes.material.enabled",template:this._enabledColumn},{id:"manufacturingDate",header:"routes.material.mfg",template:this._timeColumn,filter:{order:4,field:"date-range"}},{id:"materialAge",header:"routes.material.materialAge"},{id:"materialAgeStatus",header:"routes.material.materialAge",display:null,filter:{order:8,field:"select",range:[{id:"over7",name:this._i18nService.translate("routes.material.enum.materialAge.over7")},{id:"over5",name:this._i18nService.translate("routes.material.enum.materialAge.over5")},{id:"over3",name:this._i18nService.translate("routes.material.enum.materialAge.over3")},{id:"normal",name:this._i18nService.translate("routes.material.enum.materialAge.normal")}]}},{id:"inboundTime",header:"routes.query.stock.create",template:this._timeColumn,filter:{order:5,field:"date-range"}},{id:"inventoryTime",header:"routes.query.stock.update",template:this._timeColumn,display:null},{id:"category",header:"routes.material.cat",display:null},{id:"transQty",header:"routes.material.qualifiedNum"},{id:"transUnit",header:"routes.material.mesUnit"},{id:"remark",header:"routes.material.remark",filter:{order:7,field:"text"}},{id:"isWms",header:"routes.material.isWms",display:null},{id:"isLocal",header:"routes.material.isLocal",display:null}],this._api="stocks"})}get defination(){return this._defination}get api(){return this._api}get area(){return this._area}get category(){return this._category}get colorful(){return this._colorful}get download(){return this._download}set colorful(t){this._colorful=t}}return t.\u0275fac=function(e){return new(e||t)(l.Ob(s.a),l.Ob(d.a),l.Ob(xt.a),l.Ob(u.a))},t.\u0275cmp=l.Ib({type:t,selectors:[["app-query-blocking"]],viewQuery:function(t,e){if(1&t&&(l.Oc(Nt,!0),l.Oc(Vt,!0),l.Oc(Et,!0),l.Oc(Bt,!0),l.Oc(Yt,!0),l.Oc(Rt,!0),l.Oc(Wt,!0),l.Oc(Jt,!0),l.Oc(zt,!0),l.Oc(Qt,!0)),2&t){let t;l.tc(t=l.cc())&&(e._template=t.first),l.tc(t=l.cc())&&(e._modeColumn=t.first),l.tc(t=l.cc())&&(e._qsColumn=t.first),l.tc(t=l.cc())&&(e._overflowColumn=t.first),l.tc(t=l.cc())&&(e._barcodeColumn=t.first),l.tc(t=l.cc())&&(e._timeColumn=t.first),l.tc(t=l.cc())&&(e._areaControl=t.first),l.tc(t=l.cc())&&(e._categoryControl=t.first),l.tc(t=l.cc())&&(e._downloadDialog=t.first),l.tc(t=l.cc())&&(e._enabledColumn=t.first)}},decls:26,vars:12,consts:[[3,"selectable","addable","editable","deletable","row-class","defination","api","query","convertor","toolbar-buttons-template","toolbar-selection-template","toolbar-icons-template"],["$crud",""],["$mode",""],["$qs",""],["$overflow",""],["$barcode",""],["$time",""],["$freeze",""],["$thaw",""],["$dyeing",""],["$area",""],["$category",""],["$download",""],["$enabled",""],[4,"ngIf"],["mat-button","","color","primary",3,"click"],["mat-icon-button","",3,"matTooltip","click"],["mat-icon-button","",3,"matTooltipTemplate","ngClass","click"],["$tooltip",""],[1,"tooltip-ul"],[1,"app-foreground-primary"],[1,"app-foreground-accent"],[1,"app-foreground-over5"],[1,"app-foreground-warn"],[3,"formGroup"],["formControlName","area","multiple",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["formControlName","category"],[3,"value","paddingLeft",4,"ngFor","ngForOf"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"mode","color","value"],["mat-dialog-actions","","align","end",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary","mat-dialog-close",""]],template:function(t,e){if(1&t&&(l.Ub(0,"crud-template",0,1),l.Fc(2,Kt,2,3,"ng-template",null,2,l.Gc),l.Fc(4,Xt,2,3,"ng-template",null,3,l.Gc),l.Fc(6,te,1,1,"ng-template",null,4,l.Gc),l.Fc(8,ee,1,1,"ng-template",null,5,l.Gc),l.Fc(10,re,2,4,"ng-template",null,6,l.Gc),l.Fc(12,ae,8,10,"ng-template",null,7,l.Gc),l.Fc(14,oe,4,3,"ng-template",null,8,l.Gc),l.Fc(16,ne,5,4,"ng-template",null,9,l.Gc),l.Fc(18,de,6,5,"ng-template",null,10,l.Gc),l.Fc(20,me,7,5,"ng-template",null,11,l.Gc),l.Fc(22,fe,9,10,"ng-template",null,12,l.Gc),l.Fc(24,be,2,3,"ng-template",null,13,l.Gc),l.Tb()),2&t){const t=l.uc(13),r=l.uc(15),a=l.uc(17);l.lc("selectable","multiple")("addable",!1)("editable",!1)("deletable",!1)("row-class",e.dyeing)("defination",e.defination)("api",e.api)("query","pallet=false&enabled=false")("convertor",e.convertor)("toolbar-buttons-template",t)("toolbar-selection-template",r)("toolbar-icons-template",a)}},directives:[m.a,b.n,g.a,Dt.c,y.a,_.a,b.l,v.b,f.o,f.g,v.e,p.a,f.n,f.f,b.m,h.n,h.o,C.h,C.e,T.a,C.c,C.d],pipes:[w.d,b.e,b.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}.mat-dialog-content[_ngcontent-%COMP%] .mat-progress-bar[_ngcontent-%COMP%] + p[_ngcontent-%COMP%]{margin-top:12px}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}"]}),t})();const ge=["$crud"],_e=["$barcode"],ye=["$timespan"],ve=["$qs"],Ce=["$time"],Te=["$area"],we=["$category"],Se=["$download"];function $e(t,e){if(1&t&&l.Hc(0),2&t){const t=e.$implicit;l.Ic(t.barcode.startsWith("#@")?"":t.barcode)}}function Fe(t,e){if(1&t&&l.Hc(0),2&t){const t=e.$implicit,r=e.field.id;l.Ic(t[r]>0?t[r]:null)}}function qe(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.material.enum.qs."+e.$implicit.qualityState))}function Oe(t,e){1&t&&(l.Hc(0),l.gc(1,"date")),2&t&&l.Ic(l.ic(1,1,e.$implicit[e.field.id],"yyyy-MM-dd HH:mm:ss"))}function Ue(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",10),l.bc("click",function(){return l.wc(t),l.fc().export()}),l.Hc(1),l.gc(2,"uppercase"),l.gc(3,"translate"),l.Tb()}2&t&&(l.Cb(1),l.Ic(l.hc(2,1,l.hc(3,3,"routes.query.overdue.export"))))}function ke(t,e){if(1&t&&(l.Ub(0,"mat-option",16),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.lc("value",t.id),l.Cb(1),l.Ic(t.name)}}function Ie(t,e){if(1&t&&(l.Ub(0,"mat-optgroup",14),l.Fc(1,ke,2,2,"mat-option",15),l.Tb()),2&t){const t=e.$implicit;l.lc("label",t.name),l.Cb(1),l.lc("ngForOf",t.area)}}function He(t,e){if(1&t&&(l.Ub(0,"mat-form-field",11),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Ub(4,"mat-select",12),l.Fc(5,Ie,2,2,"mat-optgroup",13),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(3,3,"routes.task.area")),l.Cb(3),l.lc("ngForOf",r.area)}}function Ge(t,e){if(1&t&&(l.Ub(0,"mat-option",16),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.Cc("padding-left",16*t.level+"px"),l.lc("value",t.data.id),l.Cb(1),l.Ic(t.data.name)}}function xe(t,e){if(1&t&&(l.Ub(0,"mat-form-field",11),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Ub(4,"mat-select",17),l.Pb(5,"mat-option"),l.Fc(6,Ge,2,4,"mat-option",18),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(3,3,"routes.material.cat")),l.Cb(4),l.lc("ngForOf",r.category.items)}}function Me(t,e){1&t&&(l.Ub(0,"div",23),l.Ub(1,"button",24),l.Hc(2),l.gc(3,"uppercase"),l.gc(4,"translate"),l.Tb(),l.Tb()),2&t&&(l.Cb(2),l.Ic(l.hc(3,1,l.hc(4,3,"shared.dialog.ok"))))}function Pe(t,e){if(1&t&&(l.Ub(0,"h2",19),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"div",20),l.Pb(4,"mat-progress-bar",21),l.Ub(5,"p"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Fc(8,Me,5,5,"div",22)),2&t){const t=l.fc();l.Cb(1),l.Ic(l.hc(2,6,"shared.dialog.title")),l.Cb(3),l.lc("mode",t.download.loaded||t.download.error?"determinate":"indeterminate")("color",t.download.error?"warn":"primary")("value",t.download.error?100:100*t.download.loaded/t.download.total),l.Cb(2),l.Ic(l.hc(7,8,t.download.error?"shared.notification.fail":"routes.query.overdue.exporting")),l.Cb(2),l.lc("ngIf",t.download.error)}}let je=(()=>{class t{constructor(t,e,r){this._dialogService=t,this._httpService=e,this._i18nService=r,this._dfs=t=>{var e;const r=[];if(null==t?void 0:t.length){const a=[...t.reverse()];for(;a.length;){const t=a.pop();r.push(t),(null===(e=t.children)||void 0===e?void 0:e.length)&&a.push(...t.children.reverse())}}return r},this.export=()=>{this._download={loaded:0,total:0,error:!1};const t=this._dialogService.show(this._downloadDialog);this._httpService.download("stocks/excel?"+this._template.query,"WMS OVERDUE STOCK "+n().format("YYYYMMDDHHmmss"),"GET",{onProgress:e=>{switch(e.type){case 3:this._download.loaded=e.loaded,this._download.total=e.total;break;case 4:t.close()}}}).catch(()=>this._download.error=!0)}}ngAfterViewInit(){return Object(i.a)(this,void 0,void 0,function*(){const t=yield this._httpService.join(this._httpService.get("warehouses"),this._httpService.get("areas"),this._httpService.get("materials/categories"));let e=Object(c.a)(t[1].items,"warehouse");this._area=t[0].items.filter(t=>t.area=e[t.id]),e=t[1].items.map(t=>t.id),this._category={map:{},items:[]},this._dfs(t[2].children).forEach(t=>{this.category.map[t.data.id]=t,this.category.items.push(t)}),this._defination=[{id:"code",header:"routes.material.code",filter:{order:3,field:"text"}},{id:"name",header:"routes.material.name",filter:{order:4,field:"text"}},{id:"model",header:"routes.material.model"},{id:"quantity",header:"routes.material.qty"},{id:"unit",header:"routes.material.unit"},{id:"overdueTimeSpan",header:"routes.query.overdue.overdue",template:this._timespanColumn},{id:"minimumStockTimeSpan",header:"routes.query.overdue.less",template:this._timespanColumn},{id:"maximumStockTimeSpan",header:"routes.query.overdue.more",template:this._timespanColumn},{id:"barcode",header:"routes.query.overdue.barcode",template:this._barcodeColumn,filter:{order:6,field:"text"}},{id:"warehouse",header:"routes.query.overdue.warehouse"},{id:"area",header:"routes.query.overdue.area",filter:{order:1,field:"multi-select",template:this._areaControl,default:e},display:null},{id:"cell",header:"routes.query.overdue.cell",filter:{order:7,field:"text"}},{id:"batch",header:"routes.material.batch",filter:{order:5,field:"text"}},{id:"bill",header:"routes.material.bill"},{id:"supplier",header:"routes.material.supplier"},{id:"brand",header:"routes.material.brand"},{id:"qualityState",header:"routes.material.qs",template:this._qsColumn},{id:"inboundTime",header:"routes.query.overdue.create",template:this._timeColumn,filter:{order:8,field:"date-range"}},{id:"inventoryTime",header:"routes.query.overdue.update",template:this._timeColumn,filter:{order:9,field:"date-range"}},{id:"category",header:"routes.material.cat",filter:{order:2,field:"select",template:this._categoryControl,convertor:t=>t?this._dfs([this.category.map[t]]).map(t=>`category=${t.data.id}&`).join(""):""}}],this._api="stocks"})}get defination(){return this._defination}get api(){return this._api}get area(){return this._area}get category(){return this._category}get download(){return this._download}}return t.\u0275fac=function(e){return new(e||t)(l.Ob(s.a),l.Ob(d.a),l.Ob(u.a))},t.\u0275cmp=l.Ib({type:t,selectors:[["app-query-overdue"]],viewQuery:function(t,e){if(1&t&&(l.Oc(ge,!0),l.Oc(_e,!0),l.Oc(ye,!0),l.Oc(ve,!0),l.Oc(Ce,!0),l.Oc(Te,!0),l.Oc(we,!0),l.Oc(Se,!0)),2&t){let t;l.tc(t=l.cc())&&(e._template=t.first),l.tc(t=l.cc())&&(e._barcodeColumn=t.first),l.tc(t=l.cc())&&(e._timespanColumn=t.first),l.tc(t=l.cc())&&(e._qsColumn=t.first),l.tc(t=l.cc())&&(e._timeColumn=t.first),l.tc(t=l.cc())&&(e._areaControl=t.first),l.tc(t=l.cc())&&(e._categoryControl=t.first),l.tc(t=l.cc())&&(e._downloadDialog=t.first)}},decls:18,vars:8,consts:[[3,"selectable","addable","editable","deletable","defination","api","query","toolbar-buttons-template"],["$crud",""],["$barcode",""],["$timespan",""],["$qs",""],["$time",""],["$export",""],["$area",""],["$category",""],["$download",""],["mat-button","","color","primary",3,"click"],[3,"formGroup"],["formControlName","area","multiple",""],[3,"label",4,"ngFor","ngForOf"],[3,"label"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["formControlName","category"],[3,"value","paddingLeft",4,"ngFor","ngForOf"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"mode","color","value"],["mat-dialog-actions","","align","end",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary","mat-dialog-close",""]],template:function(t,e){if(1&t&&(l.Ub(0,"crud-template",0,1),l.Fc(2,$e,1,1,"ng-template",null,2,l.Gc),l.Fc(4,Fe,1,1,"ng-template",null,3,l.Gc),l.Fc(6,qe,2,3,"ng-template",null,4,l.Gc),l.Fc(8,Oe,2,4,"ng-template",null,5,l.Gc),l.Fc(10,Ue,4,5,"ng-template",null,6,l.Gc),l.Fc(12,He,6,5,"ng-template",null,7,l.Gc),l.Fc(14,xe,7,5,"ng-template",null,8,l.Gc),l.Fc(16,Pe,9,10,"ng-template",null,9,l.Gc),l.Tb()),2&t){const t=l.uc(11);l.lc("selectable",!1)("addable",!1)("editable",!1)("deletable",!1)("defination",e.defination)("api",e.api)("query","pallet=false&overdue=true")("toolbar-buttons-template",t)}},directives:[m.a,g.a,v.b,f.o,f.g,v.e,p.a,f.n,f.f,b.m,h.n,h.o,C.h,C.e,T.a,b.n,C.c,C.d],pipes:[w.d,b.e,b.v],styles:[".mat-dialog-content[_ngcontent-%COMP%] .mat-progress-bar[_ngcontent-%COMP%] + p[_ngcontent-%COMP%]{margin-top:12px}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}"]}),t})();const Le=["$crud"],Ae=["$range"],De=["$cat"],Ne=["$category"],Ve=["$download"];function Ee(t,e){if(1&t&&l.Hc(0),2&t){const t=e.$implicit;l.Lc("",t.lowerLimit||0," ~ ",t.upperLimit||"+\u221e"," \uff08 ",t.warehouse," \uff09")}}function Be(t,e){if(1&t&&l.Hc(0),2&t){const t=e.$implicit,r=l.fc();l.Ic(null==r.category.map[t.category]?null:r.category.map[t.category].data.name)}}function Ye(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",7),l.bc("click",function(){return l.wc(t),l.fc().export()}),l.Hc(1),l.gc(2,"uppercase"),l.gc(3,"translate"),l.Tb()}2&t&&(l.Cb(1),l.Ic(l.hc(2,1,l.hc(3,3,"routes.query.safety.export"))))}function Re(t,e){if(1&t&&(l.Ub(0,"mat-option",11),l.Hc(1),l.Tb()),2&t){const t=e.$implicit;l.Cc("padding-left",16*t.level+"px"),l.lc("value",t.data.id),l.Cb(1),l.Ic(t.data.name)}}function We(t,e){if(1&t&&(l.Ub(0,"mat-form-field",8),l.Ub(1,"mat-label"),l.Hc(2),l.gc(3,"translate"),l.Tb(),l.Ub(4,"mat-select",9),l.Pb(5,"mat-option"),l.Fc(6,Re,2,4,"mat-option",10),l.Tb(),l.Tb()),2&t){const t=e.$implicit,r=l.fc();l.lc("formGroup",t),l.Cb(2),l.Ic(l.hc(3,3,"routes.material.cat")),l.Cb(4),l.lc("ngForOf",r.category.items)}}function Je(t,e){1&t&&(l.Ub(0,"div",16),l.Ub(1,"button",17),l.Hc(2),l.gc(3,"uppercase"),l.gc(4,"translate"),l.Tb(),l.Tb()),2&t&&(l.Cb(2),l.Ic(l.hc(3,1,l.hc(4,3,"shared.dialog.ok"))))}function ze(t,e){if(1&t&&(l.Ub(0,"h2",12),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"div",13),l.Pb(4,"mat-progress-bar",14),l.Ub(5,"p"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Fc(8,Je,5,5,"div",15)),2&t){const t=l.fc();l.Cb(1),l.Ic(l.hc(2,6,"shared.dialog.title")),l.Cb(3),l.lc("mode",t.download.loaded||t.download.error?"determinate":"indeterminate")("color",t.download.error?"warn":"primary")("value",t.download.error?100:100*t.download.loaded/t.download.total),l.Cb(2),l.Ic(l.hc(7,8,t.download.error?"shared.notification.fail":"routes.query.safety.exporting")),l.Cb(2),l.lc("ngIf",t.download.error)}}let Qe=(()=>{class t{constructor(t,e,r){this._dialogService=t,this._httpService=e,this._i18nService=r,this._dfs=t=>{var e;const r=[];if(null==t?void 0:t.length){const a=[...t.reverse()];for(;a.length;){const t=a.pop();r.push(t),(null===(e=t.children)||void 0===e?void 0:e.length)&&a.push(...t.children.reverse())}}return r},this.convertor=t=>(t.items.forEach(t=>t.warehouse=t.warehouse.split(",").map(t=>{var e;return null===(e=this._warehouse[t])||void 0===e?void 0:e.name}).join(" + ")),t),this.export=()=>{this._download={loaded:0,total:0,error:!1};const t=this._dialogService.show(this._downloadDialog);this._httpService.download("stocks/safeties/excel?"+this._template.query,"WMS WARNING STOCK "+n().format("YYYYMMDDHHmmss"),"GET",{onProgress:e=>{switch(e.type){case 3:this._download.loaded=e.loaded,this._download.total=e.total;break;case 4:t.close()}}}).catch(()=>this._download.error=!0)}}ngAfterViewInit(){return Object(i.a)(this,void 0,void 0,function*(){const t=yield this._httpService.join(this._httpService.get("warehouses"),this._httpService.get("materials/categories"));this._warehouse=t[0].items.reduce((t,e)=>(t[e.id]=e,t),{}),this._category={map:{},items:[]},this._dfs(t[1].children).forEach(t=>{this.category.map[t.data.id]=t,this.category.items.push(t)}),this._defination=[{id:"code",header:"routes.material.code",filter:{order:2,field:"text"}},{id:"name",header:"routes.material.name",filter:{order:3,field:"text"}},{id:"model",header:"routes.material.model"},{id:"quantity",header:"routes.material.qty"},{id:"unit",header:"routes.material.unit"},{id:"lowerLimit",header:"routes.query.safety.range",template:this._rangeColumn},{id:"category",header:"routes.material.cat",template:this._categoryColumn,filter:{order:2,field:"select",template:this._categoryControl,convertor:t=>t?this._dfs([this.category.map[t]]).map(t=>`category=${t.data.id}&`).join(""):""}},{id:"type",header:"routes.query.safety.type",filter:{order:5,field:"select",range:[{},{id:"shortage",name:this._i18nService.translate("routes.query.safety.shortage")},{id:"excess",name:this._i18nService.translate("routes.query.safety.excess")}],convertor:t=>`type=${t||"warning"}&`},display:null},{id:"warehouse",header:"routes.query.safety.warehouse",filter:{order:1,field:"multi-select",range:t[0].items,default:t[0].items.map(t=>t.id)},display:null}],this._api="stocks/safeties"})}get defination(){return this._defination}get api(){return this._api}get category(){return this._category}get download(){return this._download}}return t.\u0275fac=function(e){return new(e||t)(l.Ob(s.a),l.Ob(d.a),l.Ob(u.a))},t.\u0275cmp=l.Ib({type:t,selectors:[["app-query-safety"]],viewQuery:function(t,e){if(1&t&&(l.Oc(Le,!0),l.Oc(Ae,!0),l.Oc(De,!0),l.Oc(Ne,!0),l.Oc(Ve,!0)),2&t){let t;l.tc(t=l.cc())&&(e._template=t.first),l.tc(t=l.cc())&&(e._rangeColumn=t.first),l.tc(t=l.cc())&&(e._categoryColumn=t.first),l.tc(t=l.cc())&&(e._categoryControl=t.first),l.tc(t=l.cc())&&(e._downloadDialog=t.first)}},decls:12,vars:8,consts:[[3,"selectable","addable","editable","deletable","defination","api","convertor","toolbar-buttons-template"],["$crud",""],["$range",""],["$cat",""],["$export",""],["$category",""],["$download",""],["mat-button","","color","primary",3,"click"],[3,"formGroup"],["formControlName","category"],[3,"value","paddingLeft",4,"ngFor","ngForOf"],[3,"value"],["mat-dialog-title",""],["mat-dialog-content",""],[3,"mode","color","value"],["mat-dialog-actions","","align","end",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","","color","primary","mat-dialog-close",""]],template:function(t,e){if(1&t&&(l.Ub(0,"crud-template",0,1),l.Fc(2,Ee,1,3,"ng-template",null,2,l.Gc),l.Fc(4,Be,1,1,"ng-template",null,3,l.Gc),l.Fc(6,Ye,4,5,"ng-template",null,4,l.Gc),l.Fc(8,We,7,5,"ng-template",null,5,l.Gc),l.Fc(10,ze,9,10,"ng-template",null,6,l.Gc),l.Tb()),2&t){const t=l.uc(7);l.lc("selectable",!1)("addable",!1)("editable",!1)("deletable",!1)("defination",e.defination)("api",e.api)("convertor",e.convertor)("toolbar-buttons-template",t)}},directives:[m.a,g.a,v.b,f.o,f.g,v.e,p.a,f.n,f.f,h.o,b.m,C.h,C.e,T.a,b.n,C.c,C.d],pipes:[b.v,w.d],styles:[".mat-dialog-content[_ngcontent-%COMP%] .mat-progress-bar[_ngcontent-%COMP%] + p[_ngcontent-%COMP%]{margin-top:12px}.mat-dialog-actions[_ngcontent-%COMP%]{margin-right:-8px}"]}),t})();var Ke=r("EDME");const Xe=["$crud"],Ze=["$result"],tr=["$method"],er=["$param"],rr=["$time"];function ar(t,e){1&t&&(l.Ub(0,"mat-icon",11),l.gc(1,"translate"),l.Hc(2,"remove_circle"),l.Tb()),2&t&&l.mc("matTooltip",l.hc(1,1,"routes.query.interfacerecord.resultList.error"))}function or(t,e){1&t&&(l.Ub(0,"mat-icon",12),l.gc(1,"translate"),l.Hc(2,"check_circle"),l.Tb()),2&t&&l.mc("matTooltip",l.hc(1,1,"routes.query.interfacerecord.resultList.ok"))}function ir(t,e){1&t&&(l.Sb(0,8),l.Fc(1,ar,3,3,"mat-icon",9),l.Fc(2,or,3,3,"mat-icon",10),l.Rb()),2&t&&(l.lc("ngSwitch",e.$implicit.result),l.Cb(1),l.lc("ngSwitchCase","1"))}function cr(t,e){1&t&&(l.Hc(0),l.gc(1,"date")),2&t&&l.Ic(l.ic(1,1,e.$implicit[e.field.id],"yyyy-MM-dd HH:mm:ss.SSS"))}function nr(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.query.interfacerecord.methodList."+e.$implicit.method))}function lr(t,e){if(1&t&&(l.Ub(0,"pre"),l.Hc(1),l.Tb()),2&t){const t=l.fc(),e=t.$implicit,r=t.field.id;l.Cb(1),l.Ic(e[r])}}function sr(t,e){if(1&t&&(l.Ub(0,"span"),l.Hc(1),l.Tb()),2&t){const t=l.fc(),e=t.$implicit,r=t.field.id;l.Cb(1),l.Ic(e[r])}}function dr(t,e){if(1&t&&(l.Sb(0,8),l.Fc(1,lr,2,1,"pre",13),l.Fc(2,sr,2,1,"span",13),l.Rb()),2&t){const t=l.fc();l.lc("ngSwitch",t.jsonFormat),l.Cb(1),l.lc("ngSwitchCase",!0),l.Cb(1),l.lc("ngSwitchCase",!1)}}function ur(t,e){1&t&&(l.Ub(0,"p"),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"ul",18),l.Ub(4,"li",19),l.Ub(5,"span"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Tb()),2&t&&(l.Cb(1),l.Ic(l.hc(2,2,"shared.operation.dyeing")),l.Cb(5),l.Ic(l.hc(7,4,"routes.query.interfacerecord.abnormal")))}const mr=function(t){return{"app-foreground-primary":t}};function pr(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",14),l.bc("click",function(){l.wc(t);const e=l.fc();return e.formatLine(e.jsonFormat=!e.jsonFormat)}),l.Ub(1,"mat-icon",15),l.gc(2,"translate"),l.Hc(3,"format_shapes"),l.Tb(),l.Tb(),l.Ub(4,"button",16),l.bc("click",function(){l.wc(t);const e=l.fc();return e.colorful=!e.colorful}),l.Ub(5,"mat-icon"),l.Hc(6,"brush"),l.Tb(),l.Fc(7,ur,8,6,"ng-template",null,17,l.Gc),l.Tb()}if(2&t){const t=l.uc(8),e=l.fc();l.lc("ngClass",l.pc(6,mr,e.jsonFormat)),l.Cb(1),l.mc("matTooltip",l.hc(2,4,"routes.query.interfacerecord.formatLine")),l.Cb(3),l.lc("matTooltipTemplate",t)("ngClass",l.pc(8,mr,e.colorful))}}function fr(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",21),l.bc("click",function(){l.wc(t);const e=l.fc().$implicit;return l.fc().reupload(e)}),l.gc(1,"translate"),l.Ub(2,"mat-icon"),l.Hc(3,"replay"),l.Tb(),l.Tb()}2&t&&l.mc("matTooltip",l.hc(1,1,"routes.task.main.operation.reupload"))}function br(t,e){if(1&t&&(l.Sb(0,8),l.Fc(1,fr,4,3,"button",20),l.Rb()),2&t){const t=e.$implicit;l.lc("ngSwitch",t.direction+t.result),l.Cb(1),l.lc("ngSwitchCase","ASRS->\u6d77\u8fb0WMS1")}}let hr=(()=>{class t{constructor(t,e,r,a){this._httpService=t,this._dialogService=e,this._toastService=r,this._i18nService=a,this._colorful=!0,this._jsonFormat=!1,this._bFormatJson="1",this.dyeing=t=>this.colorful&&"1"==t.result?"app-background-warn-lighter":null,this.reupload=t=>Object(i.a)(this,void 0,void 0,function*(){var e=this._i18nService.translate("routes.task.main.operation.reupload");(yield this._dialogService.open(Ke.a,{data:e}))&&(this._template.loading=!0,void 0!==(yield this._httpService.post("hithum/refeedback",{function:t.method,paramIn:t.paramIn,barcode:t.barcode,requestNo:t.requestNo}).catch(t=>{var e;this._toastService.show((null===(e=t.error)||void 0===e?void 0:e.message)||"\u672a\u77e5\u9519\u8bef")}))&&this._toastService.show("\u64cd\u4f5c\u6210\u529f"),yield this._template.refresh(),this._template.loading=!1)})}ngAfterViewInit(){return Object(i.a)(this,void 0,void 0,function*(){this._defination=[{id:"result",template:this._resultColumn,style:{width:"24px",paddingRight:"24px",lineHeight:1,cursor:"default"}},{id:"direction",header:"routes.query.interfacerecord.direction",filter:{order:2,field:"select",range:[{id:"ASRS->\u6d77\u8fb0WMS",name:"ASRS->\u6d77\u8fb0WMS"},{id:"\u6d77\u8fb0WMS->ASRS",name:"\u6d77\u8fb0WMS->ASRS"}]}},{id:"method",header:"routes.query.interfacerecord.method",template:this._methodColumn,filter:{order:3,field:"select",range:[{id:"ApplyIn",name:"\u7533\u8bf7\u5165\u5e93"},{id:"ApplyOut",name:"\u7533\u8bf7\u51fa\u5e93"},{id:"INVENTORY",name:"\u5165\u5e93\u53cd\u9988"},{id:"OUTBOUND",name:"\u51fa\u5e93\u53cd\u9988"},{id:"Freeze",name:"\u6279\u6b21\u5c5e\u6027\u8c03\u6574"}]}},{id:"barcode",header:"routes.query.interfacerecord.barcode",filter:{order:4,field:"text"}},{id:"requestNo",header:"routes.query.interfacerecord.requestNo",filter:{order:5,field:"text"}},{id:"startTime",header:"routes.query.interfacerecord.startTime",template:this._timeColumn,filter:{order:6,field:"date-range"}},{id:"paramIn",header:"routes.query.interfacerecord.paramIn",template:this._paramColumn},{id:"endTime",header:"routes.query.interfacerecord.endTime",template:this._timeColumn},{id:"paramOut",header:"routes.query.interfacerecord.paramOut",template:this._paramColumn}],this._api="records/interface"})}get defination(){return this._defination}get api(){return this._api}get colorful(){return this._colorful}get jsonFormat(){return this._jsonFormat}set colorful(t){this._colorful=t}set jsonFormat(t){this._jsonFormat=t}get bFormatJson(){return this._bFormatJson}set bFormatJsonrful(t){this._bFormatJson=t}formatLine(t){this.jsonFormat=t}}return t.\u0275fac=function(e){return new(e||t)(l.Ob(d.a),l.Ob(s.a),l.Ob(xt.a),l.Ob(u.a))},t.\u0275cmp=l.Ib({type:t,selectors:[["app-interfacerecord"]],viewQuery:function(t,e){if(1&t&&(l.Oc(Xe,!0),l.Oc(Ze,!0),l.Oc(tr,!0),l.Oc(er,!0),l.Oc(rr,!0)),2&t){let t;l.tc(t=l.cc())&&(e._template=t.first),l.tc(t=l.cc())&&(e._resultColumn=t.first),l.tc(t=l.cc())&&(e._methodColumn=t.first),l.tc(t=l.cc())&&(e._paramColumn=t.first),l.tc(t=l.cc())&&(e._timeColumn=t.first)}},decls:14,vars:8,consts:[[3,"selectable","addable","editable","deletable","row-class","defination","api","toolbar-icons-template"],["$crud",""],["$result",""],["$time",""],["$method",""],["$param",""],["$dyeing",""],["$operation",""],[3,"ngSwitch"],["class","app-foreground-secondary",3,"matTooltip",4,"ngSwitchCase"],["class","app-foreground-primary",3,"matTooltip",4,"ngSwitchDefault"],[1,"app-foreground-secondary",3,"matTooltip"],[1,"app-foreground-primary",3,"matTooltip"],[4,"ngSwitchCase"],["mat-icon-button","",3,"ngClass","click"],[3,"matTooltip"],["mat-icon-button","",3,"matTooltipTemplate","ngClass","click"],["$tooltip",""],[1,"tooltip-ul"],[1,"app-foreground-warn"],["mat-icon-button","",3,"matTooltip","click",4,"ngSwitchCase"],["mat-icon-button","",3,"matTooltip","click"]],template:function(t,e){if(1&t&&(l.Ub(0,"crud-template",0,1),l.Fc(2,ir,3,2,"ng-template",null,2,l.Gc),l.Fc(4,cr,2,4,"ng-template",null,3,l.Gc),l.Fc(6,nr,2,3,"ng-template",null,4,l.Gc),l.Fc(8,dr,3,3,"ng-template",null,5,l.Gc),l.Fc(10,pr,9,10,"ng-template",null,6,l.Gc),l.Fc(12,br,2,2,"ng-template",null,7,l.Gc),l.Tb()),2&t){const t=l.uc(11);l.lc("selectable",!1)("addable",!1)("editable",!1)("deletable",!1)("row-class",e.dyeing)("defination",e.defination)("api",e.api)("toolbar-icons-template",t)}},directives:[m.a,b.p,b.q,b.r,y.a,Dt.c,g.a,b.l,_.a],pipes:[w.d,b.e],styles:[".tooltip-ul[_ngcontent-%COMP%]{margin-top:-8px;margin-bottom:0;padding-left:0;list-style-type:disc;list-style-position:inside}.tooltip-ul[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff}"]}),t})();const gr=["$result"],_r=["$method"],yr=["$param"],vr=["$time"];function Cr(t,e){1&t&&(l.Ub(0,"mat-icon",10),l.gc(1,"translate"),l.Hc(2,"remove_circle"),l.Tb()),2&t&&l.mc("matTooltip",l.hc(1,1,"routes.query.interfacerecord.resultList.error"))}function Tr(t,e){1&t&&(l.Ub(0,"mat-icon",11),l.gc(1,"translate"),l.Hc(2,"check_circle"),l.Tb()),2&t&&l.mc("matTooltip",l.hc(1,1,"routes.query.interfacerecord.resultList.ok"))}function wr(t,e){1&t&&(l.Sb(0,7),l.Fc(1,Cr,3,3,"mat-icon",8),l.Fc(2,Tr,3,3,"mat-icon",9),l.Rb()),2&t&&(l.lc("ngSwitch",e.$implicit.result),l.Cb(1),l.lc("ngSwitchCase","1"))}function Sr(t,e){1&t&&(l.Hc(0),l.gc(1,"date")),2&t&&l.Ic(l.ic(1,1,e.$implicit[e.field.id],"yyyy-MM-dd HH:mm:ss"))}function $r(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.query.interfacerecord.methodList."+e.$implicit.method))}function Fr(t,e){if(1&t&&(l.Ub(0,"pre"),l.Hc(1),l.Tb()),2&t){const t=l.fc(),e=t.$implicit,r=t.field.id;l.Cb(1),l.Ic(e[r])}}function qr(t,e){if(1&t&&(l.Ub(0,"span"),l.Hc(1),l.Tb()),2&t){const t=l.fc(),e=t.$implicit,r=t.field.id;l.Cb(1),l.Ic(e[r])}}function Or(t,e){if(1&t&&(l.Sb(0,7),l.Fc(1,Fr,2,1,"pre",12),l.Fc(2,qr,2,1,"span",12),l.Rb()),2&t){const t=l.fc();l.lc("ngSwitch",t.jsonFormat),l.Cb(1),l.lc("ngSwitchCase",!0),l.Cb(1),l.lc("ngSwitchCase",!1)}}function Ur(t,e){1&t&&(l.Ub(0,"p"),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"ul",17),l.Ub(4,"li",18),l.Ub(5,"span"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Tb()),2&t&&(l.Cb(1),l.Ic(l.hc(2,2,"shared.operation.dyeing")),l.Cb(5),l.Ic(l.hc(7,4,"routes.query.interfacerecord.abnormal")))}const kr=function(t){return{"app-foreground-primary":t}};function Ir(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",13),l.bc("click",function(){l.wc(t);const e=l.fc();return e.formatLine(e.jsonFormat=!e.jsonFormat)}),l.Ub(1,"mat-icon",14),l.gc(2,"translate"),l.Hc(3,"format_shapes"),l.Tb(),l.Tb(),l.Ub(4,"button",15),l.bc("click",function(){l.wc(t);const e=l.fc();return e.colorful=!e.colorful}),l.Ub(5,"mat-icon"),l.Hc(6,"brush"),l.Tb(),l.Fc(7,Ur,8,6,"ng-template",null,16,l.Gc),l.Tb()}if(2&t){const t=l.uc(8),e=l.fc();l.lc("ngClass",l.pc(6,kr,e.jsonFormat)),l.Cb(1),l.mc("matTooltip",l.hc(2,4,"routes.query.interfacerecord.formatLine")),l.Cb(3),l.lc("matTooltipTemplate",t)("ngClass",l.pc(8,kr,e.colorful))}}let Hr=(()=>{class t{constructor(t){this._httpService=t,this._colorful=!0,this._jsonFormat=!1,this._bFormatJson="1",this.dyeing=t=>this.colorful&&"1"==t.result?"app-background-warn-lighter":null}ngAfterViewInit(){return Object(i.a)(this,void 0,void 0,function*(){this._defination=[{id:"userName",header:"routes.query.apirecord.userName",filter:{order:1,field:"text"}},{id:"method",header:"routes.query.apirecord.method"},{id:"controllerName",header:"routes.query.apirecord.controllerName",filter:{order:2,field:"text"}},{id:"requestTime",header:"routes.query.apirecord.requestTime",template:this._timeColumn,filter:{order:3,field:"date-range"}},{id:"responseTime",header:"routes.query.apirecord.responseTime",template:this._timeColumn},{id:"statusCode",header:"routes.query.apirecord.statusCode"},{id:"responseBody",header:"routes.query.apirecord.responseBody"},{id:"requestBody",header:"routes.query.apirecord.requestBody"}],this._api="records/apirecord"})}get defination(){return this._defination}get api(){return this._api}get colorful(){return this._colorful}get jsonFormat(){return this._jsonFormat}set colorful(t){this._colorful=t}set jsonFormat(t){this._jsonFormat=t}get bFormatJson(){return this._bFormatJson}set bFormatJsonrful(t){this._bFormatJson=t}formatLine(t){this.jsonFormat=t}}return t.\u0275fac=function(e){return new(e||t)(l.Ob(d.a))},t.\u0275cmp=l.Ib({type:t,selectors:[["app-apirecord"]],viewQuery:function(t,e){if(1&t&&(l.Oc(gr,!0),l.Oc(_r,!0),l.Oc(yr,!0),l.Oc(vr,!0)),2&t){let t;l.tc(t=l.cc())&&(e._resultColumn=t.first),l.tc(t=l.cc())&&(e._methodColumn=t.first),l.tc(t=l.cc())&&(e._paramColumn=t.first),l.tc(t=l.cc())&&(e._timeColumn=t.first)}},decls:12,vars:6,consts:[[3,"selectable","addable","editable","deletable","defination","api"],["$crud",""],["$result",""],["$time",""],["$method",""],["$param",""],["$dyeing",""],[3,"ngSwitch"],["class","app-foreground-secondary",3,"matTooltip",4,"ngSwitchCase"],["class","app-foreground-primary",3,"matTooltip",4,"ngSwitchDefault"],[1,"app-foreground-secondary",3,"matTooltip"],[1,"app-foreground-primary",3,"matTooltip"],[4,"ngSwitchCase"],["mat-icon-button","",3,"ngClass","click"],[3,"matTooltip"],["mat-icon-button","",3,"matTooltipTemplate","ngClass","click"],["$tooltip",""],[1,"tooltip-ul"],[1,"app-foreground-warn"]],template:function(t,e){1&t&&(l.Ub(0,"crud-template",0,1),l.Fc(2,wr,3,2,"ng-template",null,2,l.Gc),l.Fc(4,Sr,2,4,"ng-template",null,3,l.Gc),l.Fc(6,$r,2,3,"ng-template",null,4,l.Gc),l.Fc(8,Or,3,3,"ng-template",null,5,l.Gc),l.Fc(10,Ir,9,10,"ng-template",null,6,l.Gc),l.Tb()),2&t&&l.lc("selectable",!1)("addable",!1)("editable",!1)("deletable",!1)("defination",e.defination)("api",e.api)},directives:[m.a,b.p,b.q,b.r,y.a,Dt.c,g.a,b.l,_.a],pipes:[w.d,b.e],styles:[".tooltip-ul[_ngcontent-%COMP%]{margin-top:-8px;margin-bottom:0;padding-left:0;list-style-type:disc;list-style-position:inside}.tooltip-ul[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff}"]}),t})();const Gr=["$crud"],xr=["$resultText"],Mr=["$method"],Pr=["$feedbackStatus"],jr=["$param"],Lr=["$time"];function Ar(t,e){1&t&&(l.Ub(0,"mat-icon",13),l.gc(1,"translate"),l.Hc(2,"remove_circle"),l.Tb()),2&t&&l.mc("matTooltip",l.hc(1,1,"routes.query.errfeedback.resultList.error"))}function Dr(t,e){1&t&&(l.Ub(0,"mat-icon",14),l.gc(1,"translate"),l.Hc(2,"check_circle"),l.Tb()),2&t&&l.mc("matTooltip",l.hc(1,1,"routes.query.errfeedback.resultList.ok"))}function Nr(t,e){1&t&&(l.Sb(0,10),l.Fc(1,Ar,3,3,"mat-icon",11),l.Fc(2,Dr,3,3,"mat-icon",12),l.Rb()),2&t&&(l.lc("ngSwitch",e.$implicit.result),l.Cb(1),l.lc("ngSwitchCase","1"))}function Vr(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.query.errfeedback.resultList."+e.$implicit.result))}function Er(t,e){1&t&&(l.Hc(0),l.gc(1,"date")),2&t&&l.Ic(l.ic(1,1,e.$implicit[e.field.id],"yyyy-MM-dd HH:mm:ss"))}function Br(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.query.errfeedback.methodList."+e.$implicit.method))}function Yr(t,e){1&t&&(l.Hc(0),l.gc(1,"translate")),2&t&&l.Ic(l.hc(1,1,"routes.query.errfeedback.feedbackStatusList."+e.$implicit.feedbackStatus))}function Rr(t,e){if(1&t&&(l.Ub(0,"pre"),l.Hc(1),l.Tb()),2&t){const t=l.fc(),e=t.$implicit,r=t.field.id;l.Cb(1),l.Ic(e[r])}}function Wr(t,e){if(1&t&&(l.Ub(0,"span"),l.Hc(1),l.Tb()),2&t){const t=l.fc(),e=t.$implicit,r=t.field.id;l.Cb(1),l.Ic(e[r])}}function Jr(t,e){if(1&t&&(l.Sb(0,10),l.Fc(1,Rr,2,1,"pre",15),l.Fc(2,Wr,2,1,"span",15),l.Rb()),2&t){const t=l.fc();l.lc("ngSwitch",t.jsonFormat),l.Cb(1),l.lc("ngSwitchCase",!0),l.Cb(1),l.lc("ngSwitchCase",!1)}}function zr(t,e){1&t&&(l.Ub(0,"p"),l.Hc(1),l.gc(2,"translate"),l.Tb(),l.Ub(3,"ul",20),l.Ub(4,"li",21),l.Ub(5,"span"),l.Hc(6),l.gc(7,"translate"),l.Tb(),l.Tb(),l.Tb()),2&t&&(l.Cb(1),l.Ic(l.hc(2,2,"shared.operation.dyeing")),l.Cb(5),l.Ic(l.hc(7,4,"routes.query.interfacerecord.abnormal")))}const Qr=function(t){return{"app-foreground-primary":t}};function Kr(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",16),l.bc("click",function(){l.wc(t);const e=l.fc();return e.formatLine(e.jsonFormat=!e.jsonFormat)}),l.Ub(1,"mat-icon",17),l.gc(2,"translate"),l.Hc(3,"format_shapes"),l.Tb(),l.Tb(),l.Ub(4,"button",18),l.bc("click",function(){l.wc(t);const e=l.fc();return e.colorful=!e.colorful}),l.Ub(5,"mat-icon"),l.Hc(6,"brush"),l.Tb(),l.Fc(7,zr,8,6,"ng-template",null,19,l.Gc),l.Tb()}if(2&t){const t=l.uc(8),e=l.fc();l.lc("ngClass",l.pc(6,Qr,e.jsonFormat)),l.Cb(1),l.mc("matTooltip",l.hc(2,4,"routes.query.interfacerecord.formatLine")),l.Cb(3),l.lc("matTooltipTemplate",t)("ngClass",l.pc(8,Qr,e.colorful))}}function Xr(t,e){if(1&t){const t=l.Vb();l.Ub(0,"button",22),l.bc("click",function(){return l.wc(t),l.fc().refeedback()}),l.gc(1,"translate"),l.Ub(2,"mat-icon"),l.Hc(3,"replay"),l.Tb(),l.Tb()}2&t&&l.mc("matTooltip",l.hc(1,1,"routes.query.errfeedback.reFeedback"))}const Zr=(new Date).getDate(),ta=(new Date).getMonth(),ea=(new Date).getFullYear(),ra=[{path:"stock",component:X},{path:"record",component:Ht},{path:"blocking",component:he},{path:"overdue",component:je},{path:"safety",component:Qe},{path:"interfacerecord",component:hr},{path:"apirecord",component:Hr},{path:"errfeedback",component:(()=>{class t{constructor(t,e,r,a){this._httpService=t,this._dialogService=e,this._toastService=r,this._i18nService=a,this._colorful=!0,this._jsonFormat=!1,this._bFormatJson="1",this.dyeing=t=>this.colorful&&"1"==t.result?"app-background-warn-lighter":null,this.refeedback=()=>Object(i.a)(this,void 0,void 0,function*(){(yield this._dialogService.confirm(this._i18nService.translate("shared.notification.confirm")))&&void 0!==(yield this._httpService.post("records/reFeedback",{id:this._template.selection.selected.map(t=>t.id)}))&&(this._toastService.show(this._i18nService.translate("shared.notification.success")),this._template.refresh())})}ngAfterViewInit(){return Object(i.a)(this,void 0,void 0,function*(){this._defination=[{id:"result",header:"routes.query.errfeedback.result",template:this._resultColumn,filter:{order:1,field:"multi-select",range:[{id:"0",name:"\u6210\u529f"},{id:"1",name:"\u5931\u8d25"}],default:["1"]}},{id:"method",header:"routes.query.errfeedback.method",template:this._methodColumn,filter:{order:3,field:"select",range:[{id:"INVENTORY",name:"\u5165\u5e93\u53cd\u9988"},{id:"OUTBOUND",name:"\u51fa\u5e93\u53cd\u9988"}]}},{id:"requestNo",header:"routes.query.errfeedback.requestNo",filter:{order:4,field:"text"}},{id:"barcode",header:"routes.query.errfeedback.barcode",filter:{order:5,field:"text"}},{id:"feedbackStatus",template:this._feedbackStatusColumn,header:"routes.query.errfeedback.feedbackStatus"},{id:"startTime",header:"routes.query.errfeedback.startTime",template:this._timeColumn,filter:{order:6,field:"datetime-range",default:[n(new Date(ea,ta-1,Zr,0,0,0)),n(new Date(ea,ta,Zr,23,59,59))]}},{id:"lastEndTime",header:"routes.query.errfeedback.lastEndTime",template:this._timeColumn},{id:"paramIn",header:"routes.query.errfeedback.paramIn",template:this._paramColumn},{id:"lastParamOut",header:"routes.query.errfeedback.lastParamOut",template:this._paramColumn}],this._api="records/errfeedback"})}get defination(){return this._defination}get api(){return this._api}get colorful(){return this._colorful}get jsonFormat(){return this._jsonFormat}set colorful(t){this._colorful=t}set jsonFormat(t){this._jsonFormat=t}get bFormatJson(){return this._bFormatJson}set bFormatJsonrful(t){this._bFormatJson=t}formatLine(t){this.jsonFormat=t}}return t.\u0275fac=function(e){return new(e||t)(l.Ob(d.a),l.Ob(s.a),l.Ob(xt.a),l.Ob(u.a))},t.\u0275cmp=l.Ib({type:t,selectors:[["app-errfeedback"]],viewQuery:function(t,e){if(1&t&&(l.Oc(Gr,!0),l.Oc(xr,!0),l.Oc(Mr,!0),l.Oc(Pr,!0),l.Oc(jr,!0),l.Oc(Lr,!0)),2&t){let t;l.tc(t=l.cc())&&(e._template=t.first),l.tc(t=l.cc())&&(e._resultColumn=t.first),l.tc(t=l.cc())&&(e._methodColumn=t.first),l.tc(t=l.cc())&&(e._feedbackStatusColumn=t.first),l.tc(t=l.cc())&&(e._paramColumn=t.first),l.tc(t=l.cc())&&(e._timeColumn=t.first)}},decls:18,vars:7,consts:[[3,"addable","editable","deletable","defination","toolbar-selection-template","row-class","api"],["$crud",""],["$result",""],["$resultText",""],["$time",""],["$method",""],["$feedbackStatus",""],["$param",""],["$dyeing",""],["$reFeedback",""],[3,"ngSwitch"],["class","app-foreground-secondary",3,"matTooltip",4,"ngSwitchCase"],["class","app-foreground-primary",3,"matTooltip",4,"ngSwitchDefault"],[1,"app-foreground-secondary",3,"matTooltip"],[1,"app-foreground-primary",3,"matTooltip"],[4,"ngSwitchCase"],["mat-icon-button","",3,"ngClass","click"],[3,"matTooltip"],["mat-icon-button","",3,"matTooltipTemplate","ngClass","click"],["$tooltip",""],[1,"tooltip-ul"],[1,"app-foreground-warn"],["mat-icon-button","",3,"matTooltip","click"]],template:function(t,e){if(1&t&&(l.Ub(0,"crud-template",0,1),l.Fc(2,Nr,3,2,"ng-template",null,2,l.Gc),l.Fc(4,Vr,2,3,"ng-template",null,3,l.Gc),l.Fc(6,Er,2,4,"ng-template",null,4,l.Gc),l.Fc(8,Br,2,3,"ng-template",null,5,l.Gc),l.Fc(10,Yr,2,3,"ng-template",null,6,l.Gc),l.Fc(12,Jr,3,3,"ng-template",null,7,l.Gc),l.Fc(14,Kr,9,10,"ng-template",null,8,l.Gc),l.Fc(16,Xr,4,3,"ng-template",null,9,l.Gc),l.Tb()),2&t){const t=l.uc(17);l.lc("addable",!1)("editable",!1)("deletable",!1)("defination",e.defination)("toolbar-selection-template",t)("row-class",e.dyeing)("api",e.api)}},directives:[m.a,b.p,b.q,b.r,y.a,Dt.c,g.a,b.l,_.a],pipes:[w.d,b.e],styles:[""]}),t})()}];let aa=(()=>{class t{}return t.\u0275mod=l.Mb({type:t}),t.\u0275inj=l.Lb({factory:function(e){return new(e||t)},imports:[[o.h.forChild(ra)],o.h]}),t})();var oa=r("95ze");let ia=(()=>{class t{}return t.\u0275mod=l.Mb({type:t}),t.\u0275inj=l.Lb({factory:function(e){return new(e||t)},imports:[[a.a,aa,oa.a]]}),t})()}}]);