11.d137932a.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[11],{"19dd":function(t,e,a){"use strict";a("9c63")},"9c63":function(t,e,a){},d434:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticStyle:{"margin-top":"42px"}},[e("transition",{attrs:{appear:"","enter-active-class":"animated fadeIn"}},[e("q-table",{staticClass:"my-sticky-header-column-table shadow-24",attrs:{data:t.table_list,"row-key":"id",separator:t.separator,loading:t.loading,columns:t.columns,"hide-bottom":"",pagination:t.pagination,"no-data-label":"No data","no-results-label":"No data you want","table-style":{height:t.height},flat:"",bordered:""},on:{"update:pagination":function(e){t.pagination=e}},scopedSlots:t._u([{key:"top",fn:function(){return[e("q-btn-group",{attrs:{push:""}},[e("q-btn",{attrs:{label:t.$t("refresh"),icon:"refresh"},on:{click:function(e){return t.reFresh()}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v(t._s(t.$t("refreshtip")))])],1)],1),e("q-space"),e("div",{staticClass:"flex items-center"},[e("q-btn-group",{staticClass:"q-ml-md",attrs:{push:""}}),e("q-input",{attrs:{outlined:"",rounded:"",dense:"",debounce:"300",color:"primary",placeholder:t.$t("search")},on:{input:function(e){return t.getSearchList()},keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getSearchList()}},scopedSlots:t._u([{key:"append",fn:function(){return[e("q-icon",{attrs:{name:"search"},on:{click:function(e){return t.getSearchList()}}})]},proxy:!0}]),model:{value:t.filter,callback:function(e){t.filter=e},expression:"filter"}})],1)]},proxy:!0},{key:"body",fn:function(a){return[e("q-tr",{attrs:{props:a}},[a.row.id===t.editid||a.row.id!==t.editid?[e("q-td",{key:"detail",attrs:{props:a}},[e("q-btn",{attrs:{round:"",flat:"",push:"",color:"black",icon:"description"},on:{click:function(e){return t.detailData(a.row)}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v(t._s("查看批次详情"))])],1)],1)]:t._e(),a.row.id===t.editid?[e("q-td",{key:"container_code",attrs:{props:a}},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"托盘编码",autofocus:"",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.editFormData.container_code,callback:function(e){t.$set(t.editFormData,"container_code",e)},expression:"editFormData.container_code"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"container_code",attrs:{props:a}},[t._v(t._s(a.row.container_code))])]:t._e(),a.row.id===t.editid?[e("q-td",{key:"current_location",attrs:{props:a}},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"当前位置",rules:[e=>e&&e.length>0||t.error2]},model:{value:t.editFormData.current_location,callback:function(e){t.$set(t.editFormData,"current_location",e)},expression:"editFormData.current_location"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"current_location",attrs:{props:a}},[t._v(t._s(a.row.current_location))])]:t._e(),a.row.id===t.editid?[e("q-td",{key:"status",attrs:{props:a}},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"状态",rules:[e=>e&&e.length>0||t.error2]},model:{value:t.editFormData.status,callback:function(e){t.$set(t.editFormData,"status",e)},expression:"editFormData.status"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"status",attrs:{props:a}},[t._v(t._s(a.row.status))])]:t._e(),a.row.id===t.editid?[e("q-td",{key:"last_operation",attrs:{props:a}},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"最后操作时间",rules:[e=>e&&e.length>0||t.error4]},model:{value:t.editFormData.last_operation,callback:function(e){t.$set(t.editFormData,"last_operation",e)},expression:"editFormData.last_operation"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"last_operation",attrs:{props:a}},[t._v(t._s(a.row.last_operation))])]:t._e()],2)]}}])})],1),[e("div",{directives:[{name:"show",rawName:"v-show",value:0!==t.max,expression:"max !== 0"}],staticClass:"q-pa-lg flex flex-center"},[e("div",[t._v(t._s(t.total)+" ")]),e("q-pagination",{attrs:{color:"black",max:t.max,"max-pages":6,"boundary-links":""},on:{click:function(e){t.getSearchList(t.current),t.paginationIpt=t.current}},model:{value:t.current,callback:function(e){t.current=e},expression:"current"}}),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.paginationIpt,expression:"paginationIpt"}],staticStyle:{width:"60px","text-align":"center"},domProps:{value:t.paginationIpt},on:{blur:t.changePageEnter,keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.changePageEnter.apply(null,arguments)},input:function(e){e.target.composing||(t.paginationIpt=e.target.value)}}})])],1),e("div",{directives:[{name:"show",rawName:"v-show",value:0===t.max,expression:"max === 0"}],staticClass:"q-pa-lg flex flex-center"},[e("q-btn",{attrs:{flat:"",push:"",color:"dark",label:t.$t("no_data")}})],1)],e("q-dialog",{attrs:{"transition-show":"jump-down","transition-hide":"jump-up"},model:{value:t.detailForm,callback:function(e){t.detailForm=e},expression:"detailForm"}},[e("q-card",{staticStyle:{"min-width":"900px"}},[e("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[e("div",[t._v("\n "+t._s("批次信息")+"\n ")]),e("q-space"),e("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[20,20],"content-style":"font-size: 12px"}},[t._v("\n "+t._s(t.$t("index.close")))])],1)],1),e("q-card-section",{staticClass:"q-pt-md"},[e("q-tabs",{model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("q-tab",{attrs:{name:"tab1",label:"入库信息"}})],1)],1),e("q-tab-panels",{attrs:{animated:""},model:{value:t.activeTab,callback:function(e){t.activeTab=e},expression:"activeTab"}},[e("q-tab-panel",{staticStyle:{height:"70px"},attrs:{name:"tab1"}},[e("div",{staticClass:"row q-gutter-x-md"},[e("div",{staticClass:"col column q-gutter-y-md"},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"单据时间",readonly:!0},model:{value:t.table_detail.bound_date,callback:function(e){t.$set(t.table_detail,"bound_date",e)},expression:"table_detail.bound_date"}})],1),e("div",{staticClass:"col column q-gutter-y-md"},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:"单据编码",readonly:!0},model:{value:t.table_detail.bound_code,callback:function(e){t.$set(t.table_detail,"bound_code",e)},expression:"table_detail.bound_code"}})],1)])])],1),e("div",{staticStyle:{float:"right",padding:"15px 15px 50px 15px","min-width":"100%"},attrs:{flow:"row wrap"}},[e("q-card",{staticClass:"q-mb-md",attrs:{bordered:""}},[e("q-card-actions",{staticClass:"q-px-none",staticStyle:{position:"absolute",right:"20px",top:"10px","z-index":"100"}},[t.onlyread?t._e():e("q-btn",{attrs:{icon:"add",flat:"",dense:"",color:"primary",label:t.$t("stock.add")},on:{click:function(e){return t.addbatch(t.table_detail.id)}}})],1),e("q-card-section",[[e("div",{staticClass:"text-h6 q-mb-md"},[t._v(t._s("批次信息"))]),t.batch_detail.length>0?t._l(t.batch_detail,(function(a,n){return e("div",{key:n,staticClass:"row q-col-gutter-md q-mb-sm"},[e("div",{staticClass:"col",staticStyle:{"min-width":"150px"}},[e("q-input",{attrs:{label:"批次",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.bound_batch.bound_number,callback:function(e){t.$set(a.bound_batch,"bound_number",e)},expression:"item.bound_batch.bound_number"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"货物",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.bound_batch.goods_desc,callback:function(e){t.$set(a.bound_batch,"goods_desc",e)},expression:"item.bound_batch.goods_desc"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"单重",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.bound_batch.goods_weight,callback:function(e){t.$set(a.bound_batch,"goods_weight",e)},expression:"item.bound_batch.goods_weight"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"数量",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.bound_batch.goods_qty,callback:function(e){t.$set(a.bound_batch,"goods_qty",e)},expression:"item.bound_batch.goods_qty"}})],1),e("div",{staticClass:"col",staticStyle:{"max-width":"50px"}},[t.onlyread?t._e():e("q-btn",{staticStyle:{"margin-top":"1px"},attrs:{icon:"delete",flat:"",dense:"",color:"primary"},on:{click:function(e){return t.addbatch(t.table_detail.id)}}})],1)])})):t._e()]],2)],1)],1)],1)],1)],2)},i=[],o=(a("ddb0"),a("9861"),a("a79d"),a("3004")),s=(a("bd4c"),a("a357"),a("18d6")),l={name:"Pageflowlist",data(){return{goods_code:"",goods_desc:"",openid:"",login_name:"",authin:"0",searchUrl:"",pathname:"container/list/",pathname_previous:"",pathname_next:"",separator:"cell",loading:!1,height:"",table_list:[],columns:[{name:"detail",label:"详情",field:"detail",align:"center"},{name:"container_code",required:!0,label:"托盘编码",align:"center",field:"container_code"},{name:"current_location",label:"当前位置",field:"current_location",align:"center"},{name:"status",label:"托盘状态",field:"status",align:"center"},{name:"last_operation",label:"上次操作时间",field:"last_operation",align:"center"}],filter:"",pagination:{page:1,rowsPerPage:11},editid:0,editFormData:{},detailForm:!1,activeTab:"tab1",table_detail:{},batch_detail:[],error1:this.$t("goods.view_goodslist.error1"),current:1,max:0,total:0,paginationIpt:1}},methods:{getList(t={}){var e=this;e.loading=!0;const a={page:e.current,page_size:e.pagination.rowsPerPage},n=new URLSearchParams({...a,...t});console.log(n),Array.from(n.entries()).forEach((([t,e])=>{""!==e&&null!==e&&void 0!==e||n.delete(t)})),Object(o["f"])(`${e.pathname}?${n}`).then((t=>{e.table_list=t.results,e.total=t.count,e.max=Math.ceil(t.count/e.pagination.rowsPerPage)||0,e.pathname_previous=t.previous,e.pathname_next=t.next})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})).finally((()=>{e.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(t=1){this.current=t,this.paginationIpt=t,this.getList({container_code__icontains:this.filter})},getListPrevious(){var t=this;s["a"].has("auth")&&Object(o["f"])(t.pathname_previous,{}).then((e=>{t.table_list=e.results,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},getListNext(){var t=this;s["a"].has("auth")&&Object(o["f"])(t.pathname_next,{}).then((e=>{t.table_list=e.results,t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},reFresh(){var t=this;t.getSearchList()},detailData(t){var e=this;e.detailForm=!0,e.detailid=t.id,console.log("detail查询的id是:",e.detailid),Object(o["f"])(e.pathname+e.detailid+"/").then((t=>{e.table_detail=t})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),console.log("detail查询的结果是:",e.table_detail),Object(o["f"])("bound/detail/?bound_list="+e.detailid).then((t=>{e.batch_detail=t.results})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),console.log("batch查询的结果是:",e.batch_detail),console.log("batch长度查询的结果是:",e.batch_detail.length)}},created(){var t=this;s["a"].has("openid")?t.openid=s["a"].getItem("openid"):(t.openid="",s["a"].set("openid","")),s["a"].has("login_name")?t.login_name=s["a"].getItem("login_name"):(t.login_name="",s["a"].set("login_name","")),s["a"].has("auth")?(t.authin="1",t.getList()):t.authin="0"},mounted(){var t=this;t.$q.platform.is.electron?t.height=String(t.$q.screen.height-290)+"px":t.height=t.$q.screen.height-290+"px"},updated(){},destroyed(){},watch:{}},r=l,d=(a("19dd"),a("42e1")),c=a("eaac"),u=a("e7a9"),p=a("9c40"),b=a("05c0"),h=a("2c91"),m=a("27f9"),g=a("0016"),_=a("bd08"),f=a("db86"),v=a("3b16"),x=a("24e8"),q=a("f09f"),y=a("d847"),w=a("a370"),k=a("429b"),$=a("7460"),C=a("adad"),S=a("823b"),F=a("4b7e"),Q=a("52ee"),D=a("7f67"),I=a("eebe"),P=a.n(I),T=Object(d["a"])(r,n,i,!1,null,"9c5341a8",null);e["default"]=T.exports;P()(T,"components",{QTable:c["a"],QBtnGroup:u["a"],QBtn:p["a"],QTooltip:b["a"],QSpace:h["a"],QInput:m["a"],QIcon:g["a"],QTr:_["a"],QTd:f["a"],QPagination:v["a"],QDialog:x["a"],QCard:q["a"],QBar:y["a"],QCardSection:w["a"],QTabs:k["a"],QTab:$["a"],QTabPanels:C["a"],QTabPanel:S["a"],QCardActions:F["a"],QDate:Q["a"]}),P()(T,"directives",{ClosePopup:D["a"]})}}]);