1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[3],{"7c1d":function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e._self._c;return t("div",[t("q-toolbar",{staticClass:"row items-center"},[t("q-btn-group",{staticClass:"btn-group",attrs:{push:""}},[t("q-btn-dropdown",{attrs:{label:e.$t("stock.management_setting"),icon:"img:statics/warehouse/binset.png"}},[t("div",{staticClass:"row no-wrap q-pa-md"},[t("div",{staticClass:"column",staticStyle:{width:"120px"}},[t("q-input",{staticClass:"full-width",attrs:{flat:"",rounded:"",align:"left",label:e.$t("stock.shelf_layer")},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.updateLayer.apply(null,arguments)}},model:{value:e.shelf.layer_input,callback:function(t){e.$set(e.shelf,"layer_input",t)},expression:"shelf.layer_input"}}),t("q-input",{staticClass:"full-width",attrs:{flat:"",rounded:"",align:"left",label:e.$t("stock.shelf_row")},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.updateRow.apply(null,arguments)}},model:{value:e.shelf.row_input,callback:function(t){e.$set(e.shelf,"row_input",t)},expression:"shelf.row_input"}}),t("q-input",{staticClass:"full-width",attrs:{flat:"",rounded:"",align:"left",label:e.$t("stock.shelf_col")},on:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.updateCol.apply(null,arguments)}},model:{value:e.shelf.col_input,callback:function(t){e.$set(e.shelf,"col_input",t)},expression:"shelf.col_input"}})],1)])]),t("q-btn",{attrs:{label:e.$t("stock.shelf.shelf_up"),icon:"upload"},on:{click:function(t){return e.handleShelfUp()}}}),t("div",{staticClass:"self-center text-center q-px-sm"},[e._v("\n "+e._s(e.$t("stock.layertip"))+"\n ")]),t("q-input",{staticStyle:{width:"50px"},attrs:{dense:"",color:"primary"},model:{value:e.shelf.layer_now,callback:function(t){e.$set(e.shelf,"layer_now",t)},expression:"shelf.layer_now"}}),t("q-btn",{attrs:{label:e.$t("stock.shelf.shelf_down"),icon:"download"},on:{click:function(t){return e.handleShelfDown()}}}),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("\n "+e._s(e.$t("refreshtip"))+"\n ")])],1),t("q-separator"),t("q-btn",{attrs:{label:e.$t("stock.edit"),icon:"edit"},on:{click:function(t){return e.handle_edit()}}})],1)],1),t("q-page",{staticClass:"q-pa-md"},[t("div",{staticClass:"grid-system"},[t("div",{staticClass:"axis y-axis"},[t("div",{staticClass:"axis-numbers"},e._l(e.shelf.rows,(function(o){return t("div",{key:"y"+o},[e._v("\n "+e._s(o)+"\n ")])})),0),t("div",{staticClass:"axis-arrow"})]),t("div",{staticClass:"axis x-axis"},[t("div",{staticClass:"axis-arrow"}),t("div",{staticClass:"axis-numbers"},[e._l(e.shelf.cols,(function(o){return t("div",{key:"x"+o,staticClass:"axis-label"},[e._v("\n "+e._s(o)+"\n ")])})),t("div",{staticClass:"axis-label"})],2)]),t("div",{staticClass:"grid-container"},[t("div",{staticClass:"grid-content"},e._l(e.shelf.rows,(function(o,s){return t("div",{key:o,staticClass:"grid-row"},e._l(e.shelf.cols,(function(o){return t("div",{key:o,staticClass:"grid-item"},[t("goodscard",{attrs:{"row-index":e.shelf.rows-s,"col-index":o}}),t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[20,20],"content-style":"font-size: 10px"}},[e._v("\n "+e._s(e.$t("stock.rowtip"))+" "+e._s(e.shelf.rows-s)+"\n "+e._s(e.$t("stock.coltip"))+" "+e._s(o)+"\n ")])],1)})),0)})),0)])])])],1)},l=[],a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"goodscard",style:{backgroundColor:e.bgColor}},[t("q-btn",{staticClass:"full-height full-width",staticStyle:{height:"100%",width:"100%",padding:"0",margin:"0"},attrs:{dense:"",flat:""},on:{click:function(t){return e.handleclick()}}}),t("q-dialog",{attrs:{"transition-show":"jump-down","transition-hide":"jump-up"},model:{value:e.clickedinput,callback:function(t){e.clickedinput=t},expression:"clickedinput"}},[t("q-card",{staticStyle:{"min-width":"350px"}},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v("\n "+e._s(e.$t("stock.bin_setting"))+"\n ")]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[20,20],"content-style":"font-size: 12px"}},[e._v("\n "+e._s(e.$t("index.close")))])],1)],1),t("q-card-section",{staticClass:"flex flex-center"},[t("q-select",{ref:"select",staticClass:"q-my-md text-center",staticStyle:{width:"90%"},attrs:{options:e.options,label:"库位定义:",outlined:"","stack-label":"",dense:"","option-label":"label","option-value":"value","input-class":"text-center"},scopedSlots:e._u([{key:"option",fn:function(o){return[t("q-item",e._b({staticClass:"text-center",on:{click:function(t){return e.handleSelect(o)}}},"q-item",o.itemProps,!1),[t("q-item-section",[e._v(e._s(o.opt.label))])],1)]}}]),model:{value:e.selected.label,callback:function(t){e.$set(e.selected,"label",t)},expression:"selected.label"}})],1),t("div",{staticClass:"row justify-end q-pa-md q-gutter-x-md"},[t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],staticClass:"q-px-lg",staticStyle:{"margin-right":"25px"},attrs:{color:"primary","text-color":"white"}},[e._v("\n "+e._s(e.$t("cancel")))]),t("q-btn",{staticClass:"q-px-lg",staticStyle:{"margin-right":"25px"},attrs:{color:"primary","text-color":"white"},on:{click:function(t){return e.submit()}}},[e._v("\n "+e._s(e.$t("submit")))])],1)],1)],1),t("q-dialog",{attrs:{"transition-show":"jump-down","transition-hide":"jump-up"},on:{show:function(t){return e.prepareDialog()}},model:{value:e.storage_dialog,callback:function(t){e.storage_dialog=t},expression:"storage_dialog"}},[t("q-card",{staticStyle:{"min-width":"600px"}},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v("\n "+e._s(e.$t("stock.shelf.shelf_details"))+"\n ")]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[20,20],"content-style":"font-size: 12px"}},[e._v("\n "+e._s(e.$t("index.close")))])],1)],1),t("q-card-section",{staticClass:"q-pt-md"},[t("q-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("q-tab",{attrs:{name:"tab1",label:"货架属性"}}),t("q-tab",{attrs:{name:"tab2",label:"货物信息"}}),t("q-tab",{attrs:{name:"tab3",label:"库存明细"}})],1)],1),t("q-tab-panels",{attrs:{animated:""},model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[t("q-tab-panel",{staticStyle:{height:"300px"},attrs:{name:"tab1"}},[t("div",{staticClass:"row q-gutter-x-md"},[t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.shelf_warehouse"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.shelf_warehouse,callback:function(t){e.$set(e.storage_form,"shelf_warehouse",t)},expression:"storage_form.shelf_warehouse"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.shelf_name"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.shelf_name,callback:function(t){e.$set(e.storage_form,"shelf_name",t)},expression:"storage_form.shelf_name"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_code"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.goods_code,callback:function(t){e.$set(e.storage_form,"goods_code",t)},expression:"storage_form.goods_code"}})],1),t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.shelf_department"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.shelf_department,callback:function(t){e.$set(e.storage_form,"shelf_department",t)},expression:"storage_form.shelf_department"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.shelf_status"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.shelf_status,callback:function(t){e.$set(e.storage_form,"shelf_status",t)},expression:"storage_form.shelf_status"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_name"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.goods_name,callback:function(t){e.$set(e.storage_form,"goods_name",t)},expression:"storage_form.goods_name"}})],1)])]),t("q-tab-panel",{staticStyle:{height:"300px"},attrs:{name:"tab2"}},[t("div",{staticClass:"row q-gutter-x-md"},[t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_code"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.goods_code,callback:function(t){e.$set(e.storage_form,"goods_code",t)},expression:"storage_form.goods_code"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_batch"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.goods_batch,callback:function(t){e.$set(e.storage_form,"goods_batch",t)},expression:"storage_form.goods_batch"}}),t("q-input",{staticClass:"col",attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_qty"),readonly:e.onlyread,rules:[t=>t>=0||e.error1]},model:{value:e.storage_form.goods_qty,callback:function(t){e.$set(e.storage_form,"goods_qty",t)},expression:"storage_form.goods_qty"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_desc"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.goods_desc,callback:function(t){e.$set(e.storage_form,"goods_desc",t)},expression:"storage_form.goods_desc"}})],1),t("div",{staticClass:"col column q-gutter-y-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_name"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.goods_name,callback:function(t){e.$set(e.storage_form,"goods_name",t)},expression:"storage_form.goods_name"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_std"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.goods_std,callback:function(t){e.$set(e.storage_form,"goods_std",t)},expression:"storage_form.goods_std"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_unit"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.goods_unit,callback:function(t){e.$set(e.storage_form,"goods_unit",t)},expression:"storage_form.goods_unit"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.shelf.goods_notes"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.storage_form.goods_notes,callback:function(t){e.$set(e.storage_form,"goods_notes",t)},expression:"storage_form.goods_notes"}})],1)])]),t("q-tab-panel",{staticStyle:{height:"300px"},attrs:{name:"tab3"}},[t("div",{staticClass:"row q-gutter-x-md"},[t("div",{staticClass:"col column q-gutter-y-md"}),t("div",{staticClass:"col column q-gutter-y-md"})])])],1),t("div",{staticStyle:{position:"absolute",right:"20px",bottom:"12px","z-index":"100"}},[t("q-btn-group",{attrs:{push:""}},[t("q-btn",{attrs:{color:"white","text-color":"black"},on:{click:function(t){e.shelfLocal="undefined",e.handleclick()}}},[e._v("\n "+e._s(e.$t("stock.return"))+"\n ")]),t("q-btn",{attrs:{color:"white","text-color":"black"},on:{click:function(t){e.showInventoryDetails=!e.showInventoryDetails}}},[e._v("\n "+e._s(e.$t("stock.details"))+"\n ")]),t("q-btn",{attrs:{color:"primary","text-color":"white"},on:{click:function(t){return e.handleEdit()}}},[e._v("\n "+e._s(e.onlyread?e.$t("stock.shelf.shelf_edit"):e.$t("stock.shelf.shelf_confirm"))+"\n ")])],1)],1),t("div",{staticStyle:{float:"right",padding:"15px 15px 50px 15px","min-width":"100%"},attrs:{flow:"row wrap"}},[e.showInventoryDetails?t("q-card",{staticClass:"q-mb-md",attrs:{bordered:""}},[t("q-card-actions",{staticClass:"q-px-none",staticStyle:{position:"absolute",right:"20px",top:"10px","z-index":"100"}},[e.onlyread?e._e():t("q-btn",{attrs:{icon:"add",flat:"",dense:"",color:"primary",label:e.$t("stock.add")},on:{click:function(t){return e.addInventoryDetail()}}}),e.onlyread?e._e():t("q-btn",{attrs:{icon:"delete",flat:"",dense:"",color:"primary",label:e.$t("stock.delete")},on:{click:function(t){return e.deleteInventoryDetail()}}})],1),t("q-card-section",[t("div",{staticClass:"text-h6 q-mb-md"},[e._v(e._s(e.$t("stock.inventory_details")))]),e._l(e.inventoryDetails,(function(o,s){return t("div",{key:s,staticClass:"row q-col-gutter-md q-mb-sm"},[t("div",{staticClass:"col"},[t("q-input",{attrs:{label:e.$t("stock.batch"),readonly:e.onlyread,dense:"",outlined:""},model:{value:o.id,callback:function(t){e.$set(o,"id",t)},expression:"detail.id"}})],1),t("div",{staticClass:"col"},[t("q-input",{attrs:{label:e.$t("stock.quantity"),readonly:e.onlyread,type:"number",dense:"",outlined:""},model:{value:o.quantity,callback:function(t){e.$set(o,"quantity",t)},expression:"detail.quantity"}})],1),t("div",{staticClass:"col"},[t("q-input",{attrs:{label:e.$t("stock.location"),readonly:e.onlyread,dense:"",standout:"",outlined:""},model:{value:o.location,callback:function(t){e.$set(o,"location",t)},expression:"detail.location"}})],1)])}))],2)],1):e._e()],1)],1)],1),t("q-dialog",{attrs:{"transition-show":"jump-down","transition-hide":"jump-up"},on:{show:function(t){return e.prepareDialog()}},model:{value:e.elevator_dialog,callback:function(t){e.elevator_dialog=t},expression:"elevator_dialog"}},[t("q-card",{staticStyle:{"min-width":"350px"}},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v("\n "+e._s(e.$t("stock.elevator.elevator"))+"\n ")]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[20,20],"content-style":"font-size: 12px"}},[e._v("\n "+e._s(e.$t("index.close")))])],1)],1),t("q-card-section",{staticClass:"q-pt-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.elevator.ip"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.elevator_form.ip,callback:function(t){e.$set(e.elevator_form,"ip",t)},expression:"elevator_form.ip"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.elevator.password"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.elevator_form.password,callback:function(t){e.$set(e.elevator_form,"password",t)},expression:"elevator_form.password"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.elevator.port"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.elevator_form.port,callback:function(t){e.$set(e.elevator_form,"port",t)},expression:"elevator_form.port"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.elevator.username"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.elevator_form.username,callback:function(t){e.$set(e.elevator_form,"username",t)},expression:"elevator_form.username"}})],1),t("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[t("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(t){e.shelfLocal="undefined",e.handleclick()}}},[e._v("\n "+e._s(e.$t("stock.return")))]),t("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"primary","text-color":"white"},on:{click:function(t){return e.handleEdit()}}},[e._v("\n "+e._s(e.onlyread?e.$t("stock.shelf.shelf_edit"):e.$t("stock.shelf.shelf_confirm")))])],1)],1)],1),t("q-dialog",{attrs:{"transition-show":"jump-down","transition-hide":"jump-up"},on:{show:function(t){return e.prepareDialog()}},model:{value:e.conveyor_dialog,callback:function(t){e.conveyor_dialog=t},expression:"conveyor_dialog"}},[t("q-card",{staticStyle:{"min-width":"350px"}},[t("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[t("div",[e._v("\n "+e._s(e.$t("stock.conveyor.conveyor"))+"\n ")]),t("q-space"),t("q-btn",{directives:[{name:"close-popup",rawName:"v-close-popup"}],attrs:{dense:"",flat:"",icon:"close"}},[t("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[20,20],"content-style":"font-size: 12px"}},[e._v("\n "+e._s(e.$t("index.close")))])],1)],1),t("q-card-section",{staticClass:"q-pt-md"},[t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.conveyor.ip"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.conveyor_form.ip,callback:function(t){e.$set(e.conveyor_form,"ip",t)},expression:"conveyor_form.ip"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.conveyor.destination"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.conveyor_form.destination,callback:function(t){e.$set(e.conveyor_form,"destination",t)},expression:"conveyor_form.destination"}}),t("q-input",{attrs:{dense:"",outlined:"",square:"",label:e.$t("stock.conveyor.status"),readonly:e.onlyread,rules:[t=>(null===t||void 0===t?void 0:t.length)>0||e.error1]},model:{value:e.conveyor_form.status,callback:function(t){e.$set(e.conveyor_form,"status",t)},expression:"conveyor_form.status"}})],1),t("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[t("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(t){e.shelfLocal="undefined",e.handleclick()}}},[e._v("\n "+e._s(e.$t("stock.return")))]),t("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"primary","text-color":"white"},on:{click:function(t){return e.handleEdit()}}},[e._v("\n "+e._s(e.onlyread?e.$t("stock.shelf.shelf_edit"):e.$t("stock.shelf.shelf_confirm")))])],1)],1)],1)],1)},n=[],i=o("18d6"),r={props:{rowIndex:Number,colIndex:Number,layerIndex:Number,shelf_id:{type:String,default:"undefined"}},data(){return{storage_form:{shelf_name:"货架名称",shelf_department:"货架部门",shelf_warehouse:"仓库",shelf_status:"未满",goods_code:"A010203",goods_name:"存货货物",goods_std:"规格型号",goods_desc:"存货描述",goods_qty:"123456",goods_unit:"kg",goods_price:"123456",goods_batch:"存货批号",goods_notes:"备注",goods_in:"123456",goods_out:"123456"},elevator_form:{ip:"192.168.1.100",port:"8080",username:"admin",password:"123456",status:"未连接"},conveyor_form:{ip:"192.168.1.100",destination:"A010203",status:"未连接"},showInventoryDetails:!1,inventoryDetails:[{id:1,batch:"20230701-001",quantity:100,location:"A区-1号架"},{id:2,batch:"20230815-002",quantity:200,location:"B区-3号架"}],inventoryColumns:[{name:"batch",label:"批次",field:"batch",align:"left"},{name:"quantity",label:"数量",field:"quantity",align:"right"},{name:"location",label:"位置",field:"location",align:"left"}],user_id:"",auth_id:"",onlyread:!0,clickedinput:!1,storage_dialog:!1,elevator_dialog:!1,conveyor_dialog:!1,bgColor:"#808080",selected:{label:"请选择一个选项",value:"undefined"},options:[{label:"未定义",value:"undefined"},{label:"库位",value:"storage"},{label:"提升机",value:"elevator"},{label:"输送机",value:"conveyor"}],error1:this.$t("stock.shelf.error1"),shelfLocal:"",activeTab:"tab1"}},created(){this.shelfLocal=this.shelf_id,console.log("测试数据:",this.inventoryDetails)},methods:{deleteInventoryDetail(){this.inventoryDetails.pop()},addInventoryDetail(){this.inventoryDetails.length>=8?this.$q.notify({message:"最多只能添加8条记录",icon:"done",color:"negative"}):this.inventoryDetails.push({id:this.inventoryDetails.length+1,batch:"批次",quantity:0,location:"位置"})},prepareDialog(){this.onlyread=!0},handleSelect(e){this.selected.value=e.opt.value,this.selected.label=e.opt.label,this.$refs.select.hidePopup(),this.$nextTick((()=>{this.$refs.select.hidePopup()}))},newDataSubmit(){console.log("newDataSubmit"),console.log(this.newFormData)},handleclick(){"undefined"==this.shelfLocal&&(this.clickedinput=!0,this.storage_dialog=!1,this.elevator_dialog=!1,this.conveyor_dialog=!1),"storage"==this.shelfLocal&&(this.clickedinput=!1,this.storage_dialog=!0,this.elevator_dialog=!1,this.conveyor_dialog=!1),"elevator"==this.shelfLocal&&(this.clickedinput=!1,this.storage_dialog=!1,this.elevator_dialog=!0,this.conveyor_dialog=!1),"conveyor"==this.shelfLocal&&(this.clickedinput=!1,this.storage_dialog=!1,this.elevator_dialog=!1,this.conveyor_dialog=!0)},handleEdit(){0==this.onlyread&&console.log("后端处理信息更正"),this.user_id=i["a"].getItem("login_mode"),"admin"==this.user_id&&(this.onlyread=!1),"admin"==this.user_id&&(this.auth_id=i["a"].getItem("auth_edit"),console.log(this.auth_id),"1"==this.auth_id?(this.onlyread=!1,this.$q.notify({message:"拥有编辑权限",icon:"done",color:"positive"})):(this.onlyread=!0,this.$q.notify({message:"权限不足,请联系管理员",icon:"close",color:"negative"})))},submit(){this.shelfLocal=this.selected.value,this.handleclick()},bgColorchanger(){"undefined"==this.shelfLocal&&(this.bgColor="#808080"),"elevator"==this.shelfLocal&&(this.bgColor="#4CAF50"),"conveyor"==this.shelfLocal&&(this.bgColor="#FF9800"),"storage"==this.shelfLocal&&(this.bgColor="#008CBA")}},watch:{shelfLocal:function(e){console.log(e),this.bgColorchanger()}}},c=r,d=(o("e6f8"),o("42e1")),u=o("9c40"),h=o("24e8"),f=o("f09f"),p=o("d847"),_=o("2c91"),g=o("05c0"),m=o("a370"),v=o("ddd8"),b=o("66e5"),y=o("4074"),q=o("429b"),k=o("7460"),x=o("adad"),w=o("823b"),$=o("27f9"),C=o("e7a9"),S=o("4b7e"),D=o("8572"),Q=o("7f67"),T=o("eebe"),I=o.n(T),L=Object(d["a"])(c,a,n,!1,null,"4401fbb6",null),z=L.exports;I()(L,"components",{QBtn:u["a"],QDialog:h["a"],QCard:f["a"],QBar:p["a"],QSpace:_["a"],QTooltip:g["a"],QCardSection:m["a"],QSelect:v["a"],QItem:b["a"],QItemSection:y["a"],QTabs:q["a"],QTab:k["a"],QTabPanels:x["a"],QTabPanel:w["a"],QInput:$["a"],QBtnGroup:C["a"],QCardActions:S["a"],QField:D["a"]}),I()(L,"directives",{ClosePopup:Q["a"]});var N={components:{goodscard:z},data(){return{shelf:{rows:15,cols:15,layers:5,layer_now:1,row_input:"15",col_input:"20",layer_input:"5"},filter:"",auth_edit:!1}},methods:{updateRow(){const e=parseInt(this.shelf.row_input);!isNaN(e)&&e>0&&(this.shelf.rows=e)},updateCol(){const e=parseInt(this.shelf.col_input);!isNaN(e)&&e>0&&(this.shelf.cols=e)},updateLayer(){const e=parseInt(this.shelf.layer_input);!isNaN(e)&&e>0&&(this.shelf.layers=e)},updateCSSVariables(){const e=document.documentElement,t=document.documentElement.clientWidth,o=document.documentElement.clientHeight;console.log(t,o);const s=.6*t,l=.6*o;var a=5*s/8/this.shelf.cols,n=3*a/5,i=n/2,r=l/this.shelf.rows-a;r<2&&(r=2,a=(l-r*this.shelf.rows)/this.shelf.rows,n=3*a/5,i=n/2);var c=r/2,d=n*this.shelf.cols+a*this.shelf.cols;console.log(d),e.style.setProperty("--cell-d",`${a}px`),e.style.setProperty("--cell-d-x",`${a+n}px`),e.style.setProperty("--cell-x-2",`${i}px`),e.style.setProperty("--cell-x",`${n}px`),e.style.setProperty("--cell-y",`${r+a}px`),e.style.setProperty("--cell-y-2",`${c}px`),e.style.setProperty("--axis-x",`${d}px`)},handleResize(){clearTimeout(this.resizeTimer),this.resizeTimer=setTimeout((()=>{this.updateCSSVariables()}),200)},handleShelfDown(){this.shelf.layer_now>this.shelf.layers&&(this.shelf.layer_now=this.shelf.layers),this.shelf.layer_now>1&&(this.shelf.layer_now-=1)},handleShelfUp(){this.shelf.layer_now<this.shelf.layers?this.shelf.layer_now+=1:this.shelf.layer_now=this.shelf.layers},reFresh(){},handle_edit(){this.auth_edit=!this.auth_edit,i["a"].set("auth_edit",this.auth_edit)}},mounted(){this.updateCSSVariables(),window.addEventListener("resize",this.handleResize)},beforeUnmount(){window.removeEventListener("resize",this.handleResize),clearTimeout(this.resizeTimer)},watch:{shelf:{deep:!0,handler(e){this.updateCSSVariables()}}},created(){i["a"].set("auth_edit",this.auth_edit)}},P=N,E=(o("e85c"),o("65c6")),j=o("f20b"),B=o("eb85"),F=o("9989"),A=Object(d["a"])(P,s,l,!1,null,"2dab57e2",null);t["default"]=A.exports;I()(A,"components",{QToolbar:E["a"],QBtnGroup:C["a"],QBtnDropdown:j["a"],QInput:$["a"],QBtn:u["a"],QTooltip:g["a"],QSeparator:B["a"],QPage:F["a"]})},"8be5":function(e,t,o){},"94b0":function(e,t,o){},e6f8:function(e,t,o){"use strict";o("8be5")},e85c:function(e,t,o){"use strict";o("94b0")}}]);
|