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