1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-7674"],{"/f1G":function(e,t,n){e.exports={default:n("nhzr"),__esModule:!0}},"1nDX":function(e,t,n){"use strict";var a=n("m1cH"),i=n.n(a),l=n("gDS+"),r=n.n(l),o=n("QbLZ"),s=n.n(o),c=n("U/5H"),d=n.n(c),u=n("wk8/"),f={props:{defaultColumnDefs:{type:Array,default:function(){return[]}},type_id:{type:[String,Number],default:""}},data:function(){return{visible:!1,fieldList:[],pinnedArr:[{label:"不固定",value:!1},{label:"左侧固定",value:"left"},{label:"右侧固定",value:"right"}]}},computed:{hideFieldLen:function(e){return e.fieldList.filter(function(e){return e.hide}).length}},methods:{initSort:function(){var e=this,t=this.$refs.multipleTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0];new d.a(t,{animation:150,onEnd:function(t){var n=e.fieldList.splice(t.oldIndex,1)[0];e.fieldList.splice(t.newIndex,0,n)}})},tableRowClassName:function(e){return e.row.hide?"hide-row-class":""},selectData:function(e,t){this.$set(t,"hide",!t.hide)},selectAll:function(e){var t=this;this.fieldList.forEach(function(n){t.$set(n,"hide",!e.length)})},dataFormat:function(e){return e.map(function(e){return s()({},e,{hide:e.hide||!1,fixed:e.fixed||!1,prop:e.prop||e.key,fixedText:{left:"左侧固定",right:"右侧固定"}[e.fixed]||"不固定"})})},load:function(e){var t=this;Array.isArray(e)&&(this.fieldList=this.dataFormat(e),this.visible=!0,this.$nextTick(function(){t.fieldList.forEach(function(e){e.hide||t.$refs.multipleTable.toggleRowSelection(e)}),t.initSort()}))},onSubmit:function(){var e=this,t=this.fieldList;t.filter(function(e){return!e.hide}).length<1?this.$message({type:"warning",message:"列表至少展示一个字段"}):Object(u.bb)({type_id:this.$route.name,content:r()(this.fieldList)}).then(function(n){200===n.data.code?(e.$message.success("修改成功"),e.$emit("success",[].concat(i()(t))),e.visible=!1):e.$message.error(n.data.msg)})},reset:function(){this.load(this.defaultColumnDefs),this.$message({message:"已恢复默认,保存后生效!",type:"success"})},onClose:function(){this.visible=!1}}},p=(n("PpT3"),n("KHd+")),b=Object(p.a)(f,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-dialog",{staticClass:"table-field-cfg",attrs:{visible:e.visible,"append-to-body":""},on:{"update:visible":function(t){e.visible=t},close:e.onClose}},[n("div",{staticClass:"title-row",attrs:{slot:"title"},slot:"title"},[n("h4",{staticStyle:{margin:"0"}},[e._v("表格字段设置")]),e._v(" "),n("div",[e._v("\n (共 "+e._s(e.fieldList.length)+"个字段, 已隐藏"+e._s(e.hideFieldLen)+"个)\n ")]),e._v(" "),n("el-button",{staticClass:"reset-btn",attrs:{type:"text"},on:{click:e.reset}},[e._v("恢复默认")])],1),e._v(" "),n("div",{staticClass:"main"},[n("el-table",{ref:"multipleTable",attrs:{data:e.fieldList,"row-class-name":e.tableRowClassName,"max-height":"500","row-key":"prop"},on:{select:e.selectData,"select-all":e.selectAll}},[n("el-table-column",{attrs:{width:"40px"},scopedSlots:e._u([{key:"default",fn:function(e){return[n("i",{staticClass:"el-icon-rank",staticStyle:{cursor:"move"}})]}}])}),e._v(" "),n("el-table-column",{attrs:{type:"selection"}}),e._v(" "),n("el-table-column",{attrs:{label:"序号"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.$index+1)+"\n "),t.row.hide?n("el-tag",{staticStyle:{"margin-left":"5px"},attrs:{type:"info"}},[e._v("隐藏")]):e._e()]}}])}),e._v(" "),n("el-table-column",{attrs:{label:"字段名",prop:"label"}}),e._v(" "),n("el-table-column",{attrs:{label:"固定列",prop:"fixedText"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-select",{staticStyle:{width:"108px"},attrs:{size:"mini",placeholder:"请选择固定列方式"},model:{value:t.row.fixed,callback:function(n){e.$set(t.row,"fixed",n)},expression:"scope.row.fixed"}},e._l(e.pinnedArr,function(e,t){return n("el-option",{key:t,attrs:{label:e.label,value:e.value}})}))]}}])}),e._v(" "),n("el-table-column",{attrs:{label:"对齐方式"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-select",{staticStyle:{width:"108px"},attrs:{size:"mini",placeholder:"对齐方式"},model:{value:t.row.align,callback:function(n){e.$set(t.row,"align",n)},expression:"scope.row.align"}},[n("el-option",{attrs:{label:"左侧对齐",value:"left"}}),e._v(" "),n("el-option",{attrs:{label:"居中",value:"center"}}),e._v(" "),n("el-option",{attrs:{label:"右侧对齐",value:"right"}})],1)]}}])}),e._v(" "),n("el-table-column",{attrs:{label:"宽度",prop:"width"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-input",{attrs:{size:"mini",placeholder:"字段宽度"},model:{value:t.row.width,callback:function(n){e.$set(t.row,"width",n)},expression:"scope.row.width"}})]}}])})],1)],1),e._v(" "),n("div",{staticClass:"footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{size:"medium"},on:{click:e.onClose}},[e._v("取 消")]),e._v(" "),n("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.onSubmit}},[e._v("确 定")])],1)])},[],!1,null,"46453d70",null);b.options.__file="index.vue";t.a=b.exports},E8gZ:function(e,t,n){var a=n("jmDH"),i=n("w6GO"),l=n("NsO/"),r=n("NV0k").f;e.exports=function(e){return function(t){for(var n,o=l(t),s=i(o),c=s.length,d=0,u=[];c>d;)n=s[d++],a&&!r.call(o,n)||u.push(e?[n,o[n]]:o[n]);return u}}},ElaR:function(e,t,n){var a=n("wlPf");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,n("SZ7m").default)("6b9594e9",a,!0,{})},NSWC:function(e,t,n){"use strict";var a=n("gDS+"),i=n.n(a),l=n("GQeE"),r=n.n(l),o=n("wk8/");t.a={data:function(){return{tableFieldDefs:[]}},mounted:function(){this.getTableListFieldDefs()},computed:{fieldDefsData:function(){return this.tableFieldDefs.filter(function(e){return!e.hide})}},methods:{getTableListFieldDefs:function(){var e=this;Object(o.qb)({type_id:this.$route.name}).then(function(t){var n=t.data.data,a=r()(n).length?n.data.content:e.fieldDefs;e.$nextTick(function(){e.tableFieldDefs=a})})},loadFieldDialog:function(){this.$refs.TableFieldCfg&&this.$refs.TableFieldCfg.load(this.tableFieldDefs)},onHeaderDragend:function(e,t,n,a){this.setColumnWidth(n,e)},setColumnWidth:function(e,t){var n=this,a=this.tableFieldDefs.map(function(a){return a.prop===e.property&&n.$set(a,"width",t),a});Object(o.bb)({type_id:this.$route.name,content:i()(a)})}}}},PpT3:function(e,t,n){"use strict";var a=n("ElaR");n.n(a).a},TEci:function(e,t,n){"use strict";var a=n("iDJ8");n.n(a).a},Wusa:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),n.d(t,"d",function(){return l}),n.d(t,"f",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"e",function(){return s}),n.d(t,"b",function(){return c});var a=n("t3Un");function i(e){return Object(a.a)({url:"?r=chrpannel-billing-standard/add",method:"post",data:e})}function l(e){return Object(a.a)({url:"?r=chrpannel-billing-standard/edit",method:"post",data:e})}function r(e){return Object(a.a)({url:"?r=chrpannel-billing-standard/detail",method:"post",data:e})}function o(e){return Object(a.a)({url:"?r=chrpannel-billing-standard/delete",method:"post",data:e})}function s(e){return Object(a.a)({url:"?r=chrpannel-billing-standard/list",method:"post",data:e})}function c(e){return Object(a.a)({url:"?r=chrpannel-billing-standard/bind",method:"post",data:e})}},Y5bG:function(e,t,n){"use strict";n.d(t,"a",function(){return i}),Math.easeInOutQuad=function(e,t,n,a){return(e/=a/2)<1?n/2*e*e+t:-n/2*(--e*(e-2)-1)+t};var a=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)};function i(e,t,n){var i=document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop,l=e-i,r=0;t=void 0===t?500:t;!function e(){r+=20,function(e){document.documentElement.scrollTop=e,document.body.parentNode.scrollTop=e,document.body.scrollTop=e}(Math.easeInOutQuad(r,i,l,t)),r<t?a(e):n&&"function"==typeof n&&n()}()}},fW1p:function(e,t,n){var a=n("Y7ZC"),i=n("E8gZ")(!1);a(a.S,"Object",{values:function(e){return i(e)}})},gldb:function(e,t,n){(e.exports=n("I1BE")(!1)).push([e.i,".el-pagination[data-v-1280621c] {\n background: #fff;\n padding: 20px 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n text-align: center;\n}\n.el-pagination[data-v-1280621c] .el-select {\n width: 109px;\n padding: 5px;\n margin: 0px, 10px;\n}\n.el-pagination[data-v-1280621c] .el-input__inner {\n font-size: 13px;\n height: 28px;\n}\n.el-pagination[data-v-1280621c] .el-select__caret {\n margin-top: 5px;\n}\n.el-pagination__jump[data-v-1280621c] {\n margin-left: 24px;\n font-weight: 400;\n color: #606266;\n padding: 0 3px;\n}\n.el-pagination__jump[data-v-1280621c] .el-input {\n width: 50px;\n margin: 4px;\n text-align: center;\n}\n.btn > button[data-v-1280621c]:disabled {\n background-color: #f4f4f5;\n}\n.btn_pre[data-v-1280621c] {\n margin-left: 5px;\n background-color: #f4f4f5;\n color: #606266;\n min-width: 30px;\n border-radius: 2px;\n cursor: pointer;\n}\n.btn_next[data-v-1280621c] {\n background-color: #f4f4f5;\n color: #606266;\n min-width: 30px;\n border-radius: 2px;\n cursor: pointer;\n}\n.page-list[data-v-1280621c] {\n margin: 0 10px;\n background-color: #145dff;\n color: #FFF;\n border-radius: 2px;\n}\n.page-list > span[data-v-1280621c] {\n min-width: 30px;\n}\n",""])},iDJ8:function(e,t,n){var a=n("gldb");"string"==typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);(0,n("SZ7m").default)("9690bc6a",a,!0,{})},iJd5:function(e,t,n){"use strict";n.d(t,"d",function(){return r}),n.d(t,"c",function(){return o}),n.d(t,"a",function(){return s}),n.d(t,"f",function(){return c}),n.d(t,"b",function(){return d}),n.d(t,"e",function(){return u});var a=n("EJiy"),i=n.n(a),l=function(e){var t={},n=[];return e.forEach(function(e){var a=e,l=e,r=e;"object"===(void 0===e?"undefined":i()(e))&&(a=e.v,l=e.t,r=e.e),n.push({value:a,text:l,type:r}),t[a]=l}),{arr:n,obj:t}},r=10,o=l([{t:"计时",v:"1"},{t:"计量",v:"2"},{t:"按功率",v:"3"}]),s=l([{t:"空闲",v:"NORMAL"},{t:"禁用",v:"DISABLED"},{t:"充电中",v:"CHARGING"},{t:"故障",v:"FAULT"}]),c=l([{t:"微信支付",v:0},{t:"线下支付",v:1},{t:"支付宝支付",v:2},{t:"钱客多支付",v:3},{t:"富友支付",v:4},{t:"支付宝周期扣款",v:5},{t:"泰隆支付",v:6},{t:"拉卡拉支付",v:7},{t:"paypal支付",v:8},{t:"钱包支付",v:9},{t:"充电座钱包",v:10},{t:"订单逾期续费",v:11},{t:"蚂蚁代扣",v:14},{t:"充电桩钱包",v:15}]),d=l([{t:"全部",v:-1},{t:"未开始",v:0},{t:"开启充电操作中",v:1},{t:"充电中",v:2},{t:"开启充电失败",v:3},{t:"停止充电操作中",v:4},{t:"停止充电失败",v:5},{t:"充电结束",v:6}]),u=l([{t:"待支付",v:"WAIT_PAY",e:"warning"},{t:"已支付",v:"SUCCESS_PAY",e:"success"},{t:"支付失败",v:"FAIL_PAY",e:"danger"},{t:"取消支付",v:"CANCEL_PAY",e:"info"}])},nhzr:function(e,t,n){n("fW1p"),e.exports=n("WEpk").Object.values},st40:function(e,t,n){"use strict";n.r(t);var a=n("Wusa"),i=n("zBnO"),l=n("NOnC"),r=n("iJd5"),o=n("1nDX"),s=n("NSWC"),c=n("Y5bG"),d={name:"CustomPagination",props:{page:{type:Number,required:!0},pageLimit:{type:Number,required:!0},records:{type:Number,required:!0},autoScroll:{type:Boolean,default:!0},total:{type:[Number,String],default:0},pageSizesProps:{type:Array,default:function(){return[10,20,30,50,100,200]}}},data:function(){return{pageSizes:[10,20,30,50,100,200]}},computed:{disabledNextBtn:function(e){var t=e.pageLimit,n=e.records,a=e.page;return this.total?t>n||+this.total/+a<=t:t>n}},created:function(){this.pageSizes=this.pageSizesProps},methods:{handlePageSizeChange:function(e){this.page=1,this.$emit("update:page",this.page),this.$emit("update:pageLimit",this.pageLimit),this.$emit("getPageNo")},preBtn:function(){this.page=this.page-1,this.handlePageChange()},nextBtn:function(){this.page=this.page+1,this.handlePageChange()},handlePageChange:function(){""===this.page&&(this.page=1),this.$emit("update:page",this.page),this.$emit("getPageNo"),this.autoScroll&&Object(c.a)(0,800)}}},u=(n("TEci"),n("KHd+")),f=Object(u.a)(d,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"el-pagination"},[n("el-select",{on:{change:e.handlePageSizeChange},model:{value:e.pageLimit,callback:function(t){e.pageLimit=t},expression:"pageLimit"}},e._l(e.pageSizes,function(t){return n("el-option",{key:t,attrs:{label:t+"条/页",value:t}},[e._v(e._s(t)+"条 / 页")])})),e._v(" "),n("div",{staticClass:"btn",staticStyle:{"margin-left":"10px"}},[n("button",{staticClass:"el-icon-arrow-left btn_pre",attrs:{disabled:e.page<=1},on:{click:e.preBtn}})]),e._v(" "),n("div",{staticClass:"page-list"},[n("span",[e._v(e._s(e.page))])]),e._v(" "),n("div",{staticClass:"btn"},[n("button",{staticClass:"btn_next el-icon-arrow-right",attrs:{disabled:e.disabledNextBtn},on:{click:e.nextBtn}})]),e._v(" "),n("div",{staticClass:"el-pagination__jump"},[e._v("\n 前往"),n("el-input",{attrs:{oninput:"value=value.replace(/^0|[^0-9]/g, '')"},on:{change:e.handlePageChange},model:{value:e.page,callback:function(t){e.page=e._n(t)},expression:"page"}}),e._v("页\n ")],1)],1)},[],!1,null,"1280621c",null);f.options.__file="index.vue";var p=f.exports,b={name:"RateCfg",components:{LazyTree:i.a,TableFieldCfg:o.a,customPagination:p},mixins:[s.a],data:function(){return{CHARGE_WAY_ENUM:r.c,fieldDefs:[{label:"计费类型",prop:"charge_way",align:"center"},{label:"名称",prop:"charge_name",align:"center",minWidth:160},{label:"关联设备数",prop:"bind_count",align:"center",width:120},{label:"创建ID",prop:"billing_standard_id",align:"center"},{label:"时间",prop:"ctime",align:"center",width:160},{label:"门店",prop:"shop_name",align:"center",minWidth:160}],loading:!1,records:0,searchForm:{page:1,limit:10,is_all_level:1},tableData:[]}},created:function(){!this.$route.meta.refresh&&this.queryList()},beforeRouteEnter:function(e,t,n){n(function(t){e.meta.refresh&&t.queryList()})},methods:{DateFormat:l.a,handleAdd:function(){this.$router.push({path:"/add-rateCfg"})},handleUpdate:function(e){this.$router.push({path:"/edit-rateCfg?sn="+e.billing_standard_sn})},handleDelete:function(e){var t=this;this.$confirm("确定删除收费标准 “"+e.charge_name+"” ?","删除确认",{type:"warning"}).then(function(){Object(a.c)({billing_standard_sn:e.billing_standard_sn}).then(function(e){e.succeed&&(t.$message.success("删除成功"),t.queryList())})})},selectGroup:function(e){this.searchForm.shop_id=e.shop_id},handleCurrentChange:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.searchForm.page=e,this.queryList()},queryList:function(){var e=this;Object(a.e)(this.searchForm).then(function(t){var n=t.data,a=n.data;200===n.code&&(e.tableData=a.list,e.records=e.tableData.length)})}}},h=Object(u.a)(b,function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"app-container"},[n("div",{staticClass:"search-container"},[n("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.searchForm,size:"mini"}},[n("el-form-item",{attrs:{label:"门店"}},[n("lazy-tree",{ref:"addTree",staticStyle:{"margin-bottom":"0",display:"flex",width:"100%"},attrs:{"input-width":"400px"},on:{handleSelectGroup:e.selectGroup}})],1),e._v(" "),n("el-form-item",[n("el-checkbox",{attrs:{"true-label":1,"false-label":0},model:{value:e.searchForm.is_all_level,callback:function(t){e.$set(e.searchForm,"is_all_level",t)},expression:"searchForm.is_all_level"}},[e._v("包含所有门店")])],1),e._v(" "),n("el-form-item",{attrs:{label:"计费类型"}},[n("el-select",{staticStyle:{width:"150px"},attrs:{clearable:"",placeholder:"计费类型",size:"mini"},model:{value:e.searchForm.charge_way,callback:function(t){e.$set(e.searchForm,"charge_way",t)},expression:"searchForm.charge_way"}},e._l(e.CHARGE_WAY_ENUM.arr,function(e){return n("el-option",{key:e.value,attrs:{value:e.value,label:e.text}})}))],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:function(t){e.handleCurrentChange()}}},[e._v("查询")]),e._v(" "),n("el-button",{attrs:{type:"success",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),e._v(" "),n("el-form-item",[n("el-tooltip",{attrs:{content:"表格字段设置",effect:"dark"}},[n("img",{staticClass:"table-cfg-icon",attrs:{src:"https://qiniu.bms16.com/menu_header_config.png"},on:{click:e.loadFieldDialog}})])],1)],1)],1),e._v(" "),n("el-table",{key:JSON.stringify(e.fieldDefsData),ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:e.tableData,border:"",fit:""},on:{"header-dragend":e.onHeaderDragend,"row-dblclick":e.handleUpdate}},[e._l(e.fieldDefsData,function(t,a){return n("el-table-column",e._b({key:a,scopedSlots:e._u([{key:"default",fn:function(a){return["charge_way"==t.prop?n("div",[e._v("\n "+e._s(e.CHARGE_WAY_ENUM.obj[a.row.charge_way])+"\n ")]):"ctime"==t.prop?n("div",[e._v("\n "+e._s(0==a.row.ctime?"":e.DateFormat(new Date(1e3*a.row.ctime),"yyyy-MM-dd HH:mm:ss"))+"\n ")]):n("div",[e._v(e._s(a.row[t.prop]))])]}}])},"el-table-column",t,!1))}),e._v(" "),n("el-table-column",{attrs:{label:"操作",align:"center",width:"120",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[n("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(n){e.handleUpdate(t.row)}}},[e._v("修改")]),e._v(" "),n("el-button",{staticStyle:{color:"#f00"},attrs:{type:"text",size:"mini"},on:{click:function(n){e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],2),e._v(" "),n("TableFieldCfg",{ref:"TableFieldCfg",attrs:{"default-column-defs":e.fieldDefs},on:{success:e.getTableListFieldDefs}}),e._v(" "),n("custom-pagination",{attrs:{page:e.searchForm.page,"page-limit":e.searchForm.limit,records:e.records},on:{"update:page":function(t){e.$set(e.searchForm,"page",t)},"update:pageLimit":function(t){e.$set(e.searchForm,"limit",t)},getPageNo:e.queryList}})],1)},[],!1,null,null,null);h.options.__file="rateCfg.vue";t.default=h.exports},wlPf:function(e,t,n){(e.exports=n("I1BE")(!1)).push([e.i,"[data-v-46453d70] .el-table .hide-row-class {\n background: rgba(144, 147, 153, 0.3);\n}\n.table-field-cfg[data-v-46453d70] .el-dialog__body {\n padding: 10px 20px !important;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.table-field-cfg[data-v-46453d70] .el-dialog__footer {\n padding: 16px !important;\n}\n.table-field-cfg .title-row[data-v-46453d70] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n}\n.table-field-cfg .title-row .reset-btn[data-v-46453d70] {\n font-size: 15px;\n color: #000;\n}\n.table-field-cfg .title-row .reset-btn[data-v-46453d70]:active {\n opacity: .5;\n}\n.table-field-cfg .main[data-v-46453d70] {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 100%;\n display: block;\n}\n.table-field-cfg .footer[data-v-46453d70] {\n text-align: center;\n background: #fff;\n width: 100%;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n}\n",""])}}]);
|