1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[34],{b226:function(e,t,a){"use strict";var n=a("c34b"),o=a.n(n);t["default"]=o.a},c34b:function(e,t){},e257:function(e,t,a){"use strict";a.r(t);a("caad");var n=function(){var e=this,t=e._self._c;return t("div",[t("transition",{attrs:{appear:"","enter-active-class":"animated fadeIn"}},[t("q-table",{staticClass:"my-sticky-header-column-table shadow-24",attrs:{data:e.table_list,"row-key":"id",separator:e.separator,loading:e.loading,columns:e.columns,"hide-bottom":"",pagination:e.pagination,"no-data-label":"No data","no-results-label":"No data you want","table-style":{height:e.height},flat:"",bordered:""},on:{"update:pagination":function(t){e.pagination=t}},scopedSlots:e._u([{key:"header-cell",fn:function(a){return[t("q-th",{attrs:{props:a},on:{dblclick:function(t){return e.handleHeaderDblClick(a.col)}}},[["log_type"].includes(a.col.name)?[t("q-select",{staticStyle:{"min-width":"120px"},attrs:{dense:"",outlined:"",options:e.getFilterOptions(a.col.name),"option-label":"label","option-value":"value","emit-value":"","map-options":"",clearable:""},on:{input:e.handleFilterChange},scopedSlots:e._u([{key:"prepend",fn:function(){return[t("span",{staticClass:"text-caption"},[e._v(e._s(a.col.label))])]},proxy:!0}],null,!0),model:{value:e.filterModels[a.col.name],callback:function(t){e.$set(e.filterModels,a.col.name,t)},expression:"filterModels[props.col.name]"}})]:[e._v("\n "+e._s(a.col.label)+"\n ")]],2)]}},{key:"top",fn:function(){return[t("q-btn-group",{attrs:{push:""}},[t("q-btn",{attrs:{label:e.$t("refresh"),icon:"refresh"},on:{click:function(t){return e.reFresh()}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("refreshtip")))])],1),t("q-btn",{attrs:{label:e.$t("refresh"),icon:"add"},on:{click:function(t){return e.searchParamslog()}}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[e._v(e._s(e.$t("refreshtip")))])],1)],1)]},proxy:!0},{key:"body",fn:function(a){return[t("q-tr",{attrs:{props:a}},e._l(e.columns,(function(n){return t("q-td",{key:n.name,attrs:{props:a}},[e._v("\n "+e._s(n.format?n.format(a.row[n.name]):a.row[n.name])+"\n ")])})),1)]}}])})],1),[t("div",{directives:[{name:"show",rawName:"v-show",value:0!==e.max,expression:"max !== 0"}],staticClass:"q-pa-lg flex flex-center"},[t("div",[e._v(e._s(e.total))]),t("q-pagination",{attrs:{color:"black",max:e.max,"max-pages":6,"boundary-links":""},on:{click:function(t){e.getSearchList(e.current),e.paginationIpt=e.current}},model:{value:e.current,callback:function(t){e.current=t},expression:"current"}}),t("div",[t("input",{directives:[{name:"model",rawName:"v-model",value:e.paginationIpt,expression:"paginationIpt"}],staticStyle:{width:"60px","text-align":"center"},domProps:{value:e.paginationIpt},on:{blur:e.changePageEnter,keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.changePageEnter.apply(null,arguments)},input:function(t){t.target.composing||(e.paginationIpt=t.target.value)}}})])],1),t("div",{directives:[{name:"show",rawName:"v-show",value:0===e.max,expression:"max === 0"}],staticClass:"q-pa-lg flex flex-center"},[t("q-btn",{attrs:{flat:"",push:"",color:"dark",label:e.$t("no_data")}})],1)]],2)},o=[],l=(a("ddb0"),a("9861"),a("a79d"),a("3004")),s=a("bd4c"),i=a("18d6"),r={name:"detaillog",data(){return{date_range:"",proxyDate:"",date:"",openid:"",login_name:"",authin:"0",warehouse_code:"",warehouse_name:"",pathname:"container/detaillog/",pathname_previous:"",pathname_next:"",separator:"cell",loading:!1,height:"",table_list:[],bound_code_type_list:[],bound_code_type_map:[],bound_bs_type_list:[],bound_bs_type_map:[],bound_desc_list:[],bound_desc_map:[],bound_department_list:[],bound_department_map:[],bound_status_list:[],bound_status_map:[],product_list:[],product_map:[],columns:[{name:"create_time",label:"操作时间",field:"create_time",align:"center"},{name:"batch",label:"批次",field:"batch",align:"center"},{name:"container_code",label:"托盘编码",field:"container_code",align:"center"},{name:"container_detail",label:"详情编码",field:"container_detail",align:"center"},{name:"goods_code",label:"货品编码",field:"goods_code",align:"center"},{name:"goods_desc",label:"货品描述",field:"goods_desc",align:"center"},{name:"batch_goods_in_qty",label:"入库数量",field:"batch_goods_in_qty",align:"center"},{name:"batch_goods_out_qty",label:"出库数量",field:"batch_goods_out_qty",align:"center"},{name:"batch_goods_in_location_qty",label:"在库数量",field:"batch_goods_in_location_qty",align:"center"},{name:"log_type",label:"日志类型",field:"log_type",align:"center",format:e=>this.log_type_map[e]||e},{name:"goods_qty",label:"新进数量",field:"goods_qty",align:"center"},{name:"goods_out_qty",label:"新出数量",field:"goods_out_qty",align:"center"}],filter:"",pagination:{page:1,rowsPerPage:11},editMode:!1,error1:this.$t("goods.view_goodslist.error1"),max:0,total:0,paginationIpt:1,current:1,onlyread:!0,bound_batch_list:[],filterModels:{bound_department:null},filterdata:{},activeSearchField:"",activeSearchLabel:""}},computed:{log_type_map(){return{out:"物料出库",update:"更新物料",delete:"删除物料",create:"组盘入库",status_change:"状态变更",cancel_out:"取消出库"}}},methods:{handleFilterChange(){this.pagination.page=1,this.getSearchList(1)},getFilterOptions(e){switch(e){case"log_type":return[{label:"物料出库",value:"out"},{label:"更新物料",value:"update"},{label:"删除物料",value:"delete"},{label:"组盘入库",value:"create"},{label:"状态变更",value:"status_change"},{label:"取消出库",value:"cancel_out"}];case"type":return[{label:"生产入库",value:1},{label:"采购入库",value:2},{label:"其他入库",value:3},{label:"调拨入库",value:4}];case"bound_status":return[{label:"待审核",value:0},{label:"确认无误",value:1}];case"bound_department":return this.bound_department_list;default:return[]}},handleHeaderDblClick(e){["detail","action"].includes(e.name)||(this.activeSearchField=e.field,this.activeSearchLabel=e.label,this.$q.dialog({title:`搜索${e.label}`,message:`请输入${e.label}的搜索条件`,prompt:{model:"",type:"text"},cancel:!0,persistent:!0}).onOk((t=>{this.executeColumnSearch(e.field,t)})).onCancel((()=>{this.activeSearchField="",this.activeSearchLabel=""})))},executeColumnSearch(e,t){if("container_code"===e||"audit_status"===e||"save_status"===e||"bound_status"===e){const a={[e]:t};this.filter="",this.date_range="",this.getList({...a,page:1}),this.filterdata=a,this.$q.notify({message:`已搜索 ${this.activeSearchLabel} 含有 "${t}" 的结果`,icon:"search",color:"positive"}),this.activeSearchField="",this.activeSearchLabel=""}else{const a={[e+"__icontains"]:t};this.filter="",this.date_range="",this.getList({...a,page:1}),this.filterdata=a,this.$q.notify({message:`已搜索 ${this.activeSearchLabel} 含有 "${t}" 的结果`,icon:"search",color:"positive"}),this.activeSearchField="",this.activeSearchLabel=""}},getList(e={}){var t=this;t.loading=!0;const a={page:t.current,page_size:t.pagination.rowsPerPage},n=new URLSearchParams({...a,...e});console.log(n),Array.from(n.entries()).forEach((([e,t])=>{""!==t&&null!==t&&void 0!==t||n.delete(e)})),Object(l["e"])(`${t.pathname}?${n}`).then((e=>{t.table_list=e.results,t.total=e.count,t.max=Math.ceil(e.count/t.pagination.rowsPerPage)||0,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})})).finally((()=>{t.loading=!1}))},changePageEnter(){Number(this.paginationIpt)<1?(this.current=1,this.paginationIpt=1):Number(this.paginationIpt)>this.max?(this.current=this.max,this.paginationIpt=this.max):this.current=Number(this.paginationIpt),this.getSearchList(this.current)},getSearchList(e=1){this.current=e,this.paginationIpt=e;const t={};for(const[a,n]of Object.entries(this.filterModels))null!==n&&""!==n&&(t[a]=n);this.getList({number__icontains:this.filter,document_date__range:this.date_range,...t,...this.filterdata})},getListPrevious(){var e=this;i["a"].has("auth")&&Object(l["e"])(e.pathname_previous,{}).then((t=>{e.table_list=t.results,e.pathname_previous=t.previous,e.pathname_next=t.next})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},getListNext(){var e=this;i["a"].has("auth")&&Object(l["e"])(e.pathname_next,{}).then((t=>{e.table_list=t.results,e.pathname_previous=t.previous,e.pathname_next=t.next})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},reFresh(){var e=this;this.filterdata={},this.filterModels={bound_department:null},e.getSearchList()},searchParamslog(){console.log(this.filterdata)}},created(){var e=this;if(i["a"].has("openid")?e.openid=i["a"].getItem("openid"):(e.openid="",i["a"].set("openid","")),i["a"].has("warehouse_code")&&(e.warehouse_code=i["a"].getItem("warehouse_code")),i["a"].has("warehouse_name")&&(e.warehouse_name=i["a"].getItem("warehouse_name")),i["a"].has("login_name")?e.login_name=i["a"].getItem("login_name"):(e.login_name="",i["a"].set("login_name","")),i["a"].has("auth")){const t=Date.now(),a=s["b"].formatDate(t,"YYYY/MM/DD");e.date=a,console.log(e.date),e.authin="1",e.getList()}else e.authin="0";Object(l["e"])("warehouse/boundcodetype/",{}).then((t=>{e.bound_code_type_list=t.results.map((e=>({label:e.bound_code_type_name,value:e.bound_code_type_code}))),e.bound_code_type_map=t.results.reduce(((e,t)=>(e[t.bound_code_type_code]=t.bound_code_type_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),Object(l["e"])("warehouse/boundtype/",{}).then((t=>{e.bound_desc_list=t.results.map((e=>({label:e.bound_type_name,value:e.bound_type_code}))),e.bound_desc_map=t.results.reduce(((e,t)=>(e[t.bound_type_code]=t.bound_type_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),Object(l["e"])("warehouse/department/?max_page=1000",{}).then((t=>{e.bound_department_list=t.results.map((e=>({label:e.department_name,value:e.department_code}))),e.bound_department_map=t.results.reduce(((e,t)=>(e[t.department_code]=t.department_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),Object(l["e"])("warehouse/boundbusiness/",{}).then((t=>{e.bound_bs_type_list=t.results.map((e=>({label:e.bound_bs_name,value:e.bound_bs_code}))),e.bound_bs_type_map=t.results.reduce(((e,t)=>(e[t.bound_bs_code]=t.bound_bs_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),Object(l["e"])("warehouse/status/",{}).then((t=>{e.bound_status_list=t.results.map((e=>({label:e.bound_status_name,value:e.bound_status_code}))),e.bound_status_map=t.results.reduce(((e,t)=>(e[t.bound_status_code]=t.bound_status_name,e)),{})})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},mounted(){var e=this;e.$q.platform.is.electron?e.height=String(e.$q.screen.height-290)+"px":e.height=e.$q.screen.height-290+"px",e.newFormData.creater=e.login_name},updated(){},destroyed(){}},c=r,d=a("42e1"),u=a("b226"),_=a("eaac"),p=a("357e"),h=a("ddd8"),b=a("e7a9"),m=a("9c40"),g=a("05c0"),f=a("bd08"),v=a("db86"),y=a("3b16"),x=a("eebe"),w=a.n(x),q=Object(d["a"])(c,n,o,!1,null,null,null);"function"===typeof u["default"]&&Object(u["default"])(q);t["default"]=q.exports;w()(q,"components",{QTable:_["a"],QTh:p["a"],QSelect:h["a"],QBtnGroup:b["a"],QBtn:m["a"],QTooltip:g["a"],QTr:f["a"],QTd:v["a"],QPagination:y["a"]})}}]);
|