1 line
7.3 KiB
JavaScript
1 line
7.3 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-04a8fcb6"],{"4f2d":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"headStys"},[e.infoList?a("div",{},[a("div",{staticClass:"formContent"},[a("el-form",{ref:"query",staticClass:"demo-form-inline",attrs:{inline:!0,model:e.query}},[a("el-form-item",{attrs:{prop:"name",label:""}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入名称",maxlength:"64"},model:{value:e.query.name,callback:function(t){e.$set(e.query,"name",t)},expression:"query.name"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"corporateCreditCode",label:""}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入企业统一社会信息代码",maxlength:"64"},model:{value:e.query.corporateCreditCode,callback:function(t){e.$set(e.query,"corporateCreditCode",t)},expression:"query.corporateCreditCode"}})],1),e._v(" "),a("el-form-item",{attrs:{prop:"contactName",label:""}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入负责人姓名",maxlength:"64"},model:{value:e.query.contactName,callback:function(t){e.$set(e.query,"contactName",t)},expression:"query.contactName"}})],1),e._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],on:{click:function(t){return e.resetForm("query")}}},[e._v("重置")])],1),e._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary"},on:{click:e.onSearch}},[e._v("查询")])],1)],1)],1),e._v(" "),a("div",{staticClass:"contentStys"},[a("div",{staticClass:"planLst"},[a("span",[e._v("供应商列表")]),e._v(" "),a("span",{staticClass:"addPlan"},[a("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],staticClass:"cololr",attrs:{type:"primary"},on:{click:function(t){return e.addSupplier(1)}}},[e._v("添加供应商")])],1)]),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"96%","margin-left":"2%"},attrs:{border:"",data:e.listTable,"header-cell-style":e.headClass,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"#",align:"center",width:"50"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.$index+(e.query.pageNumber-1)*e.query.pageSize+1)+"\n ")])]}}],null,!1,3311124033)}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"name","min-width":"200",label:"供应商名称","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"corporateCreditCode","min-width":"150",label:"企业统一社会信用代码","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"address","min-width":"160",label:"注册地址","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.province)+e._s(t.row.city)+e._s(t.row.area)+e._s(t.row.address)+"\n ")]}}],null,!1,1972213831)}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"contactName",label:"负责人"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"contactMobile",label:"联系电话"}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"bankName",label:"开户行","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"bankAccount",label:"银行账号","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{align:"center",prop:"address",width:"200",label:"备注","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.comments||"-"))]}}],null,!1,3760403408)}),e._v(" "),a("el-table-column",{attrs:{align:"center",width:"150",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.viewSupplier(t.row)}}},[e._v("查看")]),e._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.editSupplier(t.row)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){return e.deleteSupplier(t.row)}}},[e._v("删除")])]}}],null,!1,3508558272)})],1),e._v(" "),a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{"current-page":e.query.pageNumber,"page-sizes":[10,20,30,100],"page-size":e.query.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.pageTotal},on:{"update:currentPage":function(t){return e.$set(e.query,"pageNumber",t)},"update:current-page":function(t){return e.$set(e.query,"pageNumber",t)},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)]):e._e(),e._v(" "),e.viewInfo?a("div",{staticClass:"viewDetails"},[a("addSupplier",{ref:"addSupplier",attrs:{type:e.type,classify:e.classify},on:{goBack:e.goBack}})],1):e._e()])},i=[],o=(a("4057"),a("333d")),r=a("c889"),l=a("a6b9"),s=a("b54d"),c={components:{Pagination:o["a"],supplierInfo:r["a"],addSupplier:s["a"]},data:function(){return{pageTotal:0,listLoading:!1,listTable:[],query:{name:"",corporateCreditCode:"",contactName:"",pageSize:10,pageNumber:1,type:1},infoList:!0,viewInfo:!1,type:"",classify:""}},created:function(){this.headClass()},mounted:function(){this.getlistData()},beforeRouteLeave:function(e,t,a){this.viewInfo=!1,this.infoList=!0,a()},methods:{getlistData:function(){var e=this;this.listLoading=!0;var t=JSON.parse(localStorage.getItem("companyInfo"));this.query.companyId=t.osId,Object(l["c"])(this.query).then((function(t){e.listTable=t.data.records,e.pageTotal=t.data.rowsCount,e.listLoading=!1}))},addSupplier:function(e){var t=this;this.type="add",this.classify=e,this.viewInfo=!0,this.infoList=!1,this.$nextTick((function(){t.$refs.addSupplier.getInfoLst()}))},editSupplier:function(e){var t=this;this.viewInfo=!0,this.infoList=!1,this.classify=e.type,this.type="edit",this.$nextTick((function(){t.$refs.addSupplier.getInfoLst(JSON.parse(JSON.stringify(e)))}))},viewSupplier:function(e){var t=this;this.viewInfo=!0,this.infoList=!1,this.classify=e.type,this.type="view",this.$nextTick((function(){t.$refs.addSupplier.getInfoLst(JSON.parse(JSON.stringify(e)))}))},deleteSupplier:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){var t=this;this.$confirm("确定删除该数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",center:!0}).then((function(){deleteSupplier({id:e.id}).then((function(e){0===e.code&&(t.getlistData(),t.$message({type:"success",message:"删除成功"}))}))})).catch((function(){}))})),openDialog:function(){this.showDialog=!0},closeDialog:function(){this.showDialog=!1},onSearch:function(){this.query.pageNumber=1,this.getlistData()},resetForm:function(){this.query.name="",this.query.corporateCreditCode="",this.query.contactName="",this.query.pageNumber=1,this.getlistData()},handleSizeChange:function(e){this.query.pageSize=e,this.query.pageNumber=1,this.getlistData()},handleCurrentChange:function(e){this.query.pageNumber=e,this.getlistData()},headClass:function(){return"text-align:center;background:#FAFAFA;"},goBack:function(){this.viewInfo=!1,this.infoList=!0,this.getlistData()}}},u=c,p=(a("c8e8"),a("829d")),d=Object(p["a"])(u,n,i,!1,null,"88a2b02a",null);t["default"]=d.exports},c8e8:function(e,t,a){"use strict";a("d7a0e")},d7a0e:function(e,t,a){}}]); |