Files
wysite/hc-etms.sqygj.cn/static/js/chunk-4896995a.047e156a.js

1 line
9.9 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4896995a"],{"1e45":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"headStys"},[t.infoList?a("div",{},[a("div",{staticClass:"formContent"},[a("el-form",{ref:"query",staticClass:"demo-form-inline",attrs:{inline:!0,model:t.query}},[a("el-form-item",{attrs:{prop:"name",label:""}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入名称",maxlength:"64"},model:{value:t.query.name,callback:function(e){t.$set(t.query,"name",e)},expression:"query.name"}})],1),t._v(" "),a("el-form-item",{attrs:{prop:"corporateCreditCode",label:""}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入企业统一社会信息代码",maxlength:"64"},model:{value:t.query.corporateCreditCode,callback:function(e){t.$set(t.query,"corporateCreditCode",e)},expression:"query.corporateCreditCode"}})],1),t._v(" "),a("el-form-item",{attrs:{prop:"contactName",label:""}},[a("el-input",{attrs:{clearable:"",placeholder:"请输入负责人姓名",maxlength:"64"},model:{value:t.query.contactName,callback:function(e){t.$set(t.query,"contactName",e)},expression:"query.contactName"}})],1),t._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],on:{click:function(e){return t.resetForm("query")}}},[t._v("重置")])],1),t._v(" "),a("el-form-item",[a("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary"},on:{click:t.onSearch}},[t._v("查询")])],1)],1)],1),t._v(" "),a("div",{staticClass:"contentStys"},[a("div",{staticClass:"planLst"},[a("span",[t._v("分公司列表")]),t._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(e){return t.addSupplier(2)}}},[t._v("添加分公司")])],1)]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"96%","margin-left":"2%"},attrs:{border:"",data:t.listTable,"header-cell-style":t.headClass,"tooltip-effect":"dark"}},[a("el-table-column",{attrs:{label:"#",align:"center",width:"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.$index+(t.query.pageNumber-1)*t.query.pageSize+1)+"\n ")])]}}],null,!1,3311124033)}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"name","min-width":"200",label:"分公司名称","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"corporateCreditCode","min-width":"150",label:"企业统一社会信用代码","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"address","min-width":"160",label:"注册地址","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.province)+t._s(e.row.city)+t._s(e.row.area)+t._s(e.row.address)+"\n ")]}}],null,!1,1972213831)}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"contactName","min-width":"80",label:"负责人"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"contactMobile","min-width":"120",label:"联系电话"}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"bankName","min-width":"120",label:"开户行","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"bankAccount","min-width":"120",label:"银行账号","show-overflow-tooltip":""}}),t._v(" "),a("el-table-column",{attrs:{align:"center",prop:"invoiceStatus","min-width":"100",label:"发票资质状态","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",{style:{color:1==e.row.invoiceStatus?"green":"red"}},[t._v("\n "+t._s(t._f("getItemType")(e.row.invoiceStatus,t.invoiceStatusArr))+"\n ")])]}}],null,!1,1758299767)}),t._v(" "),a("el-table-column",{attrs:{align:"center","min-width":"80",label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[1==e.row.status?a("el-tag",{attrs:{type:"success"}},[t._v("启用")]):t._e(),t._v(" "),0==e.row.status?a("el-tag",{attrs:{type:"info"}},[t._v("禁用")]):t._e()]}}],null,!1,3822344242)}),t._v(" "),a("el-table-column",{attrs:{align:"center","min-width":"290",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{class:0===e.row.invoiceStatus?"status-warning":"status-danger",attrs:{type:"text"},on:{click:function(a){return t.updataInvoiceStatus(e.row)}}},[t._v(t._s(0===e.row.invoiceStatus?"发票状态启用":"发票状态禁用"))]),t._v(" "),a("el-button",{class:0===e.row.status?"status-warning":"status-danger",attrs:{type:"text"},on:{click:function(a){return t.updataStatus(e.row)}}},[t._v(t._s(1===e.row.status?"禁用":"启用"))]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.viewSupplier(e.row)}}},[t._v("查看")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.editSupplier(e.row)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.deleteSupplier(e.row)}}},[t._v("删除")])]}}],null,!1,1112909680)})],1),t._v(" "),a("div",{staticClass:"pagination"},[a("el-pagination",{attrs:{background:"","current-page":t.query.pageNumber,"page-sizes":[10,20,30,100],"page-size":t.query.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.pageTotal},on:{"update:currentPage":function(e){return t.$set(t.query,"pageNumber",e)},"update:current-page":function(e){return t.$set(t.query,"pageNumber",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)]):t._e(),t._v(" "),t.viewInfo?a("div",{staticClass:"viewDetails"},[a("addSupplier",{ref:"addSupplier",attrs:{type:t.type,classify:t.classify},on:{goBack:t.goBack}})],1):t._e()])},i=[],r=(a("ac67"),a("1bc7"),a("32ea"),a("5821")),s=a("333d"),o=a("c889"),l=a("a6b9"),c=a("b54d");function u(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function p(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?u(Object(a),!0).forEach((function(e){Object(r["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):u(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var d={components:{Pagination:s["a"],supplierInfo:o["a"],addSupplier:c["a"]},data:function(){return{pageTotal:0,listLoading:!1,listTable:[],query:{name:"",corporateCreditCode:"",contactName:"",pageSize:10,pageNumber:1,type:2},infoList:!0,viewInfo:!1,type:"",classify:"",invoiceStatusArr:[{value:0,label:"已禁用"},{value:1,label:"已启用"}]}},created:function(){this.headClass()},mounted:function(){this.getlistData()},beforeRouteLeave:function(t,e,a){this.viewInfo=!1,this.infoList=!0,a()},methods:{getlistData:function(){var t=this;this.listLoading=!0,this.query.companyId=JSON.parse(window.localStorage.getItem("companyInfo")).osId,Object(l["c"])(this.query).then((function(e){t.listTable=e.data.records,t.pageTotal=e.data.rowsCount,t.listLoading=!1}))},addSupplier:function(t){var e=this;this.type="add",this.classify=t,this.viewInfo=!0,this.infoList=!1,this.$nextTick((function(){e.$refs.addSupplier.getInfoLst()}))},editSupplier:function(t){var e=this;this.viewInfo=!0,this.infoList=!1,this.classify=t.type,this.type="edit",this.$nextTick((function(){e.$refs.addSupplier.getInfoLst(JSON.parse(JSON.stringify(t)))}))},viewSupplier:function(t){var e=this;this.viewInfo=!0,this.infoList=!1,this.classify=t.type,this.type="view",this.$nextTick((function(){e.$refs.addSupplier.getInfoLst(JSON.parse(JSON.stringify(t)))}))},updataStatus:function(t){var e=this;this.$confirm("确定修改数据状态吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then((function(){var a=p(p({},t),{},{status:1===t.status?0:1});Object(l["d"])(a).then((function(t){0===t.code?e.$message({message:"修改数据状态成功",type:"success"}):e.$message({message:"修改数据状态失败",type:"error"}),e.getlistData()})).catch((function(t){e.$message({message:"修改数据状态失败",type:"error"})}))}))},updataInvoiceStatus:function(t){var e=this;this.$confirm("确定修改发票状态吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0}).then((function(){var a={id:t.id,invoiceStatus:0===t.invoiceStatus?1:0};Object(l["e"])(a).then((function(t){0===t.code?(e.$message({message:"修改发票状态成功",type:"success"}),2===a.status&&e.updataStatisicRes()):e.$message({message:"修改发票状态失败",type:"error"}),e.getlistData()})).catch((function(t){e.$message({message:"修改发票状态失败",type:"error"})}))}))},deleteSupplier:function(t){var e=this;this.$confirm("确定删除该数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"info",center:!0}).then((function(){Object(l["b"])({id:t.id}).then((function(t){0===t.code&&(e.getlistData(),e.$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(t){this.query.pageSize=t,this.query.pageNumber=1,this.getlistData()},handleCurrentChange:function(t){this.query.pageNumber=t,this.getlistData()},headClass:function(){return"text-align:center;background:#FAFAFA;"},goBack:function(){this.viewInfo=!1,this.infoList=!0,this.getlistData()}}},f=d,g=(a("6fa9"),a("829d")),m=Object(g["a"])(f,n,i,!1,null,"697176e6",null);e["default"]=m.exports},"6fa9":function(t,e,a){"use strict";a("9e13")},"9e13":function(t,e,a){}}]);