16.ed4c9435.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{6233:function(t,e,a){"use strict";a("eaa6")},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:"组盘信息"}}),e("q-tab",{attrs:{name:"tab2",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[0].container.container_code,callback:function(e){t.$set(t.table_detail[0].container,"container_code",e)},expression:"table_detail[0].container.container_code"}})],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[0].container.current_location,callback:function(e){t.$set(t.table_detail[0].container,"current_location",e)},expression:"table_detail[0].container.current_location"}})],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-section",[[e("div",{staticClass:"text-h6 q-mb-md"},[t._v(t._s("托盘物料"))]),t.table_detail.length>0?t._l(t.table_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.batch.bound_number,callback:function(e){t.$set(a.batch,"bound_number",e)},expression:"item.batch.bound_number"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"货物",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.batch.goods_desc,callback:function(e){t.$set(a.batch,"goods_desc",e)},expression:"item.batch.goods_desc"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"单重",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.batch.goods_weight,callback:function(e){t.$set(a.batch,"goods_weight",e)},expression:"item.batch.goods_weight"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"数量",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.goods_qty,callback:function(e){t.$set(a,"goods_qty",e)},expression:"item.goods_qty"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"组盘",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.batch.creater,callback:function(e){t.$set(a.batch,"creater",e)},expression:"item.batch.creater"}})],1)])})):t._e()]],2)],1)],1)]),e("q-tab-panel",{staticStyle:{height:"70px"},attrs:{name:"tab2"}},[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[0].container.container_code,callback:function(e){t.$set(t.table_detail[0].container,"container_code",e)},expression:"table_detail[0].container.container_code"}})],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[0].container.current_location,callback:function(e){t.$set(t.table_detail[0].container,"current_location",e)},expression:"table_detail[0].container.current_location"}})],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-section",[[e("div",{staticClass:"text-h6 q-mb-md",staticStyle:{display:"flex","justify-content":"space-between"}},[t._v("\n "+t._s("操作记录")+"\n "),e("q-btn",{staticClass:"q-ml-sm",attrs:{color:"primary",icon:"event"},on:{click:t.sortoperatedetail}},[t._v("近一个月操作记录")])],1),t.listSize>0?[e("q-list",{staticClass:"rounded-borders",attrs:{bordered:""}},t._l(t.nodeList,(function(a,n){return e("q-expansion-item",{key:n,attrs:{group:"op-group",caption:`操作类型: ${t.formatType(a.value[0].operation_type)} ----- 操作时间:${a.value[0].timestamp}`}},[e("q-card",[e("q-card-section",t._l(a.value,(function(a,n){return e("div",{key:n,staticClass:"row q-col-gutter-md q-mb-sm",staticStyle:{display:"flex","justify-content":"space-between"}},[e("div",{staticClass:"col",staticStyle:{"min-width":"150px"}},[e("q-input",{attrs:{label:"批次",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.batch.bound_number,callback:function(e){t.$set(a.batch,"bound_number",e)},expression:"item.batch.bound_number"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"货物",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.batch.goods_desc,callback:function(e){t.$set(a.batch,"goods_desc",e)},expression:"item.batch.goods_desc"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"单重",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.batch.goods_weight,callback:function(e){t.$set(a.batch,"goods_weight",e)},expression:"item.batch.goods_weight"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"数量",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.goods_qty,callback:function(e){t.$set(a,"goods_qty",e)},expression:"item.goods_qty"}})],1),e("div",{staticClass:"col"},[e("q-input",{attrs:{label:"经手人",readonly:t.onlyread,dense:"",outlined:""},model:{value:a.operator,callback:function(e){t.$set(a,"operator",e)},expression:"item.operator"}})],1),e("div",{staticClass:"col"},[e("q-input",{staticStyle:{"min-width":"100px","max-width":"600px"},attrs:{label:"备注",readonly:t.onlyread,dense:"",outlined:"",type:"textarea","input-style":{whiteSpace:"pre-wrap",overflowY:"auto",minHeight:"40px"}},model:{value:a.memo,callback:function(e){t.$set(a,"memo",e)},expression:"item.memo"}})],1)])})),0)],1)],1)})),1)]:e("div",{staticClass:"text-grey-8"},[t._v("\n 暂无操作记录\n ")])]],2)],1)],1)])],1)],1)],1)],2)},i=[],o=(a("ddb0"),a("9861"),a("a79d"),a("3004")),s=(a("af87"),a("bd4c"),a("a357"),a("18d6"));class r{constructor(t){this.value=t,this.next=null}}class l{constructor(){this.head=null,this.size=0}append(t){const e=new r(t);if(this.head){let t=this.head;while(t.next)t=t.next;t.next=e}else this.head=e;this.size++}delete(t){if(!this.head)return;if(this.head.value===t)return this.head=this.head.next,void this.size--;let e=this.head;while(e.next){if(e.next.value===t)return e.next=e.next.next,void this.size--;e=e.next}}toArray(){const t=[];let e=this.head;while(e)t.push({value:e.value}),e=e.next;return t}clear(){this.head=null,this.size=0}}var c={name:"PageContainerlist",data(){return{goods_code:"",goods_desc:"",openid:"",login_name:"",authin:"0",searchUrl:"",pathname:"container/list/",detailpathname:"container/detail/",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:[{container:{container_code:"",current_location:""},batch:{bound_number:"",goods_desc:"",goods_weight:"",goods_qty:"",creater:""}}],operate_detail:[],linkedList:new l,newValue:"",error1:this.$t("goods.view_goodslist.error1"),current:1,max:0,total:0,paginationIpt:1,onlyread:!0}},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["e"])(`${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["e"])(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["e"])(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["e"])(e.detailpathname+"?container="+e.detailid).then((t=>{e.table_detail=t.results})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})})),e.getOperationRecord(t)},getOperationRecord(t){var e=this;e.operate_detail=[];var a=[];e.linkedList.clear(),Object(o["e"])("container/operate/?status=1&container="+t.id).then((t=>{if(e.operate_detail=t.results,0!=e.operate_detail.length)if(1!=e.operate_detail.length){a.push(e.operate_detail[0]);for(let t=0;t<e.operate_detail.length;t++)e.operate_detail[t].operation_type==e.operate_detail[t+1].operation_type||(e.linkedList.append(a),a=[]),a.push(e.operate_detail[t+1]),e.linkedList.append(a),a=[]}else e.linkedList.append(e.operate_detail);else e.linkedList.clear()})).catch((t=>{e.$q.notify({message:t.detail,icon:"close",color:"negative"})}))},formatType(t){switch(t){case"container":return"组盘";case"2":return"出库";case"3":return"盘点";case"4":return"移库";case"5":return"调拨";case"6":return"其他";default:return"未知"}},sortoperatedetail(){var t=this;console.log("近一个月操作记录",t.nodeList)}},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(){},computed:{nodeList(){return this.linkedList.toArray()},listSize(){return this.linkedList.size}}},d=c,u=(a("6233"),a("42e1")),p=a("eaac"),h=a("e7a9"),b=a("9c40"),m=a("05c0"),_=a("2c91"),g=a("27f9"),v=a("0016"),f=a("bd08"),y=a("db86"),x=a("3b16"),q=a("24e8"),w=a("f09f"),k=a("d847"),C=a("a370"),$=a("429b"),S=a("7460"),L=a("adad"),Q=a("823b"),F=a("1c1c"),I=a("3b73"),D=a("52ee"),P=a("7f67"),T=a("eebe"),z=a.n(T),j=Object(u["a"])(d,n,i,!1,null,"016cb5de",null);e["default"]=j.exports;z()(j,"components",{QTable:p["a"],QBtnGroup:h["a"],QBtn:b["a"],QTooltip:m["a"],QSpace:_["a"],QInput:g["a"],QIcon:v["a"],QTr:f["a"],QTd:y["a"],QPagination:x["a"],QDialog:q["a"],QCard:w["a"],QBar:k["a"],QCardSection:C["a"],QTabs:$["a"],QTab:S["a"],QTabPanels:L["a"],QTabPanel:Q["a"],QList:F["a"],QExpansionItem:I["a"],QDate:D["a"]}),z()(j,"directives",{ClosePopup:P["a"]})},eaa6:function(t,e,a){}}]);