51.2ec044b5.js 13 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[51],{9172:function(t,e,a){"use strict";var n=a("9810"),o=a.n(n);e["default"]=o.a},9810:function(t,e){},b2d4:function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",[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,filter:t.filter,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("new"),icon:"add"},on:{click:function(e){return t.newFormCheck()}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v("\n "+t._s(t.$t("newtip"))+"\n ")])],1),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("\n "+t._s(t.$t("refreshtip"))+"\n ")])],1)],1),e("q-space")]},proxy:!0},{key:"body",fn:function(a){return[e("q-tr",{attrs:{props:a}},[a.row.id===t.editid?[e("q-td",{key:"bound_status_code",attrs:{props:a}},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:t.$t("warehouse.view_warehouse.bound_status_code"),autofocus:"",rules:[e=>e&&e.length>0||t.error0]},model:{value:t.editFormData.bound_status_code,callback:function(e){t.$set(t.editFormData,"bound_status_code",e)},expression:"editFormData.bound_status_code"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"bound_status_code",attrs:{props:a}},[t._v("\n "+t._s(a.row.bound_status_code)+"\n ")])]:t._e(),a.row.id===t.editid?[e("q-td",{key:"bound_status_name",attrs:{props:a}},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:t.$t("warehouse.view_warehouse.bound_status_name"),autofocus:"",rules:[e=>e&&e.length>0||t.error1]},model:{value:t.editFormData.bound_status_name,callback:function(e){t.$set(t.editFormData,"bound_status_name",e)},expression:"editFormData.bound_status_name"}})],1)]:a.row.id!==t.editid?[e("q-td",{key:"bound_status_name",attrs:{props:a}},[t._v("\n "+t._s(a.row.bound_status_name)+"\n ")])]:t._e(),e("q-td",{key:"creater",attrs:{props:a}},[t._v("\n "+t._s(a.row.creater)+"\n ")]),e("q-td",{key:"create_time",attrs:{props:a}},[t._v("\n "+t._s(a.row.create_time)+"\n ")]),e("q-td",{key:"update_time",attrs:{props:a}},[t._v("\n "+t._s(a.row.update_time)+"\n ")]),t.editMode?t.editMode?[a.row.id===t.editid?[e("q-td",{key:"action",staticStyle:{width:"100px"},attrs:{props:a}},[e("q-btn",{attrs:{round:"",flat:"",push:"",color:"secondary",icon:"check"},on:{click:function(e){return t.editDataSubmit()}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v("\n "+t._s(t.$t("confirmedit"))+"\n ")])],1),e("q-btn",{attrs:{round:"",flat:"",push:"",color:"red",icon:"close"},on:{click:function(e){return t.editDataCancel()}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v("\n "+t._s(t.$t("canceledit"))+"\n ")])],1)],1)]:a.row.id!==t.editid?void 0:t._e()]:t._e():[e("q-td",{key:"action",staticStyle:{width:"100px"},attrs:{props:a}},[e("q-btn",{attrs:{round:"",flat:"",push:"",color:"purple",icon:"edit"},on:{click:function(e){return t.editData(a.row)}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v("\n "+t._s(t.$t("edit"))+"\n ")])],1),e("q-btn",{attrs:{round:"",flat:"",push:"",color:"dark",icon:"delete"},on:{click:function(e){return t.deleteData(a.row.id)}}},[e("q-tooltip",{attrs:{"content-class":"bg-amber text-black shadow-4",offset:[10,10],"content-style":"font-size: 12px"}},[t._v("\n "+t._s(t.$t("delete"))+"\n ")])],1)],1)]],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){return t.getList()}},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",{model:{value:t.newForm,callback:function(e){t.newForm=e},expression:"newForm"}},[e("q-card",{staticClass:"shadow-24"},[e("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[e("div",[t._v(t._s(t.$t("newtip")))]),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"}},[t._v(t._s(t.$t("index.close")))])],1)],1),e("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"325px",width:"400px"}},[e("q-input",{attrs:{dense:"",outlined:"",square:"",label:t.$t("warehouse.view_warehouse.bound_status_code"),autofocus:"",rules:[e=>e&&e.length>0||t.error0]},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.newDataSubmit()}},model:{value:t.newFormData.bound_status_code,callback:function(e){t.$set(t.newFormData,"bound_status_code",e)},expression:"newFormData.bound_status_code"}}),e("q-input",{attrs:{dense:"",outlined:"",square:"",label:t.$t("warehouse.view_warehouse.bound_status_name"),rules:[e=>e&&e.length>0||t.error1]},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.newDataSubmit()}},model:{value:t.newFormData.bound_status_name,callback:function(e){t.$set(t.newFormData,"bound_status_name",e)},expression:"newFormData.bound_status_name"}})],1),e("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[e("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(e){return t.newDataCancel()}}},[t._v(t._s(t.$t("cancel")))]),e("q-btn",{attrs:{color:"primary"},on:{click:function(e){return t.newDataSubmit()}}},[t._v(t._s(t.$t("submit")))])],1)],1)],1),e("q-dialog",{model:{value:t.deleteForm,callback:function(e){t.deleteForm=e},expression:"deleteForm"}},[e("q-card",{staticClass:"shadow-24"},[e("q-bar",{staticClass:"bg-light-blue-10 text-white rounded-borders",staticStyle:{height:"50px"}},[e("div",[t._v(t._s(t.$t("delete")))]),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"}},[t._v(t._s(t.$t("index.close")))])],1)],1),e("q-card-section",{staticClass:"scroll",staticStyle:{"max-height":"325px",width:"400px"}},[t._v("\n "+t._s(t.$t("deletetip"))+"\n ")]),e("div",{staticStyle:{float:"right",padding:"15px 15px 15px 0"}},[e("q-btn",{staticStyle:{"margin-right":"25px"},attrs:{color:"white","text-color":"black"},on:{click:function(e){return t.deleteDataCancel()}}},[t._v(t._s(t.$t("cancel")))]),e("q-btn",{attrs:{color:"primary"},on:{click:function(e){return t.deleteDataSubmit()}}},[t._v(t._s(t.$t("submit")))])],1)],1)],1)],2)},o=[],s=a("3004"),i=a("18d6"),r=(a("bc3a"),{name:"Pagebound_status",data(){return{openid:"",login_name:"",authin:"0",pathname:"warehouse/status/",pathname_previous:"",pathname_next:"",separator:"cell",loading:!1,height:"",table_list:[],columns:[{name:"bound_status_code",required:!0,label:this.$t("warehouse.view_warehouse.bound_status_code"),align:"left",field:"bound_status_code",sortable:!0},{name:"bound_status_name",required:!0,label:this.$t("warehouse.view_warehouse.bound_status_name"),align:"left",field:"bound_status_name",sortable:!0},{name:"creater",label:this.$t("creater"),field:"creater",align:"center"},{name:"create_time",label:this.$t("createtime"),field:"create_time",align:"center",sortable:!0},{name:"update_time",label:this.$t("updatetime"),field:"update_time",align:"center",sortable:!0},{name:"action",label:this.$t("action"),align:"center"}],filter:"",pagination:{page:1,rowsPerPage:"30"},newForm:!1,newFormData:{bound_status_code:"",bound_status_name:"",creater:""},editid:0,editFormData:{},editMode:!1,deleteForm:!1,deleteid:0,publishForm:!1,publishdetail:"",square_measure:"",error0:this.$t("warehouse.view_warehouseset.error0"),error1:this.$t("warehouse.view_warehouseset.error1"),error2:this.$t("warehouse.view_warehouseset.error2"),error3:this.$t("warehouse.view_warehouseset.error3"),error4:this.$t("warehouse.view_warehouseset.error4"),error5:this.$t("warehouse.view_warehouseset.error5"),current:1,max:0,total:0,paginationIpt:1}},methods:{getList(){var t=this;i["a"].has("auth")&&Object(s["f"])(t.pathname+"?page="+t.current,{}).then((e=>{t.table_list=e.results,t.total=e.count,0===e.count||1===Math.ceil(e.count/30)?t.max=0:t.max=Math.ceil(e.count/30),t.pathname_previous=e.previous,t.pathname_next=e.next})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},changePageEnter(t){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.getList()},getListPrevious(){var t=this;i["a"].has("auth")&&Object(s["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;i["a"].has("auth")&&Object(s["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.getList()},newFormCheck(){var t=this;t.newForm=!0},newDataSubmit(){var t=this,e=[];t.table_list.forEach((t=>{e.push(t.bound_status_name)})),-1===e.indexOf(t.newFormData.bound_status_name)&&0!==t.newFormData.bound_status_name.length?(t.newFormData.creater=t.login_name,Object(s["i"])(t.pathname,t.newFormData).then((e=>{t.getList(),t.newDataCancel(),t.$q.notify({message:"Success Create",icon:"check",color:"green"})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))):(t.newFormData.creater=t.login_name,Object(s["i"])(t.pathname,t.newFormData).then((e=>{t.getList(),t.newDataCancel(),t.$q.notify({message:"",icon:"close",color:"negative"})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))),e=[]},newDataCancel(){var t=this;t.newForm=!1,t.newFormData={bound_status_code:"",bound_status_name:"",creater:""}},editData(t){var e=this;e.editMode=!0,e.editid=t.id,e.editFormData={bound_status_code:t.bound_status_code,bound_status_name:t.bound_status_name,creater:e.login_name}},editDataSubmit(){var t=this;Object(s["j"])(t.pathname+t.editid+"/",t.editFormData).then((e=>{t.editDataCancel(),t.getList(),t.$q.notify({message:"Success Edit Data",icon:"check",color:"green"})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},editDataCancel(){var t=this;t.editMode=!1,t.editid=0,t.editFormData={bound_status_code:"",bound_status_name:"",creater:""}},deleteData(t){var e=this;e.deleteForm=!0,e.deleteid=t},deleteDataSubmit(){var t=this;Object(s["d"])(t.pathname+t.deleteid+"/").then((e=>{t.deleteDataCancel(),t.getList(),t.$q.notify({message:"Success Edit Data",icon:"check",color:"green"})})).catch((e=>{t.$q.notify({message:e.detail,icon:"close",color:"negative"})}))},deleteDataCancel(){var t=this;t.deleteForm=!1,t.deleteid=0}},created(){var t=this;i["a"].has("openid")?t.openid=i["a"].getItem("openid"):(t.openid="",i["a"].set("openid","")),i["a"].has("login_name")?t.login_name=i["a"].getItem("login_name"):(t.login_name="",i["a"].set("login_name","")),i["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(){}}),l=r,c=a("42e1"),d=a("9172"),u=a("eaac"),p=a("e7a9"),h=a("9c40"),m=a("05c0"),_=a("2c91"),b=a("bd08"),g=a("db86"),w=a("27f9"),f=a("3b16"),v=a("24e8"),x=a("f09f"),q=a("d847"),k=a("a370"),y=a("7f67"),$=a("eebe"),D=a.n($),F=Object(c["a"])(l,n,o,!1,null,null,null);"function"===typeof d["default"]&&Object(d["default"])(F);e["default"]=F.exports;D()(F,"components",{QTable:u["a"],QBtnGroup:p["a"],QBtn:h["a"],QTooltip:m["a"],QSpace:_["a"],QTr:b["a"],QTd:g["a"],QInput:w["a"],QPagination:f["a"],QDialog:v["a"],QCard:x["a"],QBar:q["a"],QCardSection:k["a"]}),D()(F,"directives",{ClosePopup:y["a"]})}}]);