王总上门按摩后台代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
11 KiB

2 months ago
webpackJsonp([73],{"0Ynn":function(e,t){},r4CE:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("mvHQ"),n=a.n(r),i=a("Xxa5"),s=a.n(i),o=a("exGp"),l=a.n(o),c=a("PJh5"),u=a.n(c),d={data:function(){return{loading:!1,pagePermission:[],base_city:[],searchForm:{page:1,limit:10,name:""},tableData:[],total:0,subForm:{id:0,city_id:"",distance_free:"",distance_price:"",start_distance:"",start_price:"",invented_distance:""},subFormRules:{city_id:{required:!0,type:"number",message:"请选择城市",trigger:"blur"},start_distance:{required:!0,validator:this.$reg.isFloatNum,trigger:"blur"},start_price:{required:!0,validator:this.$reg.isMoney,trigger:"blur"},distance_price:{required:!0,validator:this.$reg.isMoney,trigger:"blur"},invented_distance:{required:!0,validator:this.$reg.isPercent,trigger:"blur"}},showDialog:!1}},created:function(){var e=this;return l()(s.a.mark(function t(){return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.pagePermission=e.$route.meta.pagePermission.filter(function(t){return t.title===e.$route.name})[0].auth,t.next=3,e.getCityList();case 3:e.getTableDataList();case 4:case"end":return t.stop()}},t,e)}))()},methods:{getCityList:function(){var e=this;return l()(s.a.mark(function t(){var a,r,n;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e.subForm.city_id=[],t.next=3,e.$api.system.citySelect();case 3:if(a=t.sent,r=a.code,n=a.data,200===r){t.next=8;break}return t.abrupt("return");case 8:e.base_city=n;case 9:case"end":return t.stop()}},t,e)}))()},handleSizeChange:function(e){this.searchForm.limit=e,this.handleCurrentChange(1)},handleCurrentChange:function(e){this.searchForm.page=e,this.getTableDataList()},toChange:function(e){var t=this;return l()(s.a.mark(function a(){return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:t.searchForm.status=e,t.getTableDataList(1);case 2:case"end":return a.stop()}},a,t)}))()},getTableDataList:function(e){var t=this;return l()(s.a.mark(function a(){var r,n,i;return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e&&(t.searchForm.page=1),t.tableData=[],t.loading=!0,a.next=5,t.$api.system.getCarConfigList(t.searchForm);case 5:if(r=a.sent,n=r.code,i=r.data,t.loading=!1,200===n){a.next=11;break}return a.abrupt("return");case 11:t.tableData=i.data,t.total=i.total;case 13:case"end":return a.stop()}},a,t)}))()},toShowDialog:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return l()(s.a.mark(function a(){var r,i;return s.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:for(i in r=JSON.parse(n()(t)),e.subForm)e.subForm[i]=r[i];e.showDialog=!0;case 3:case"end":return a.stop()}},a,e)}))()},updateItem:function(e,t){var a=this;return l()(s.a.mark(function r(){var n,i;return s.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:n=-1===t?{id:e}:{id:e,status:t},i=-1===t?"getCarConfigDel":"getCarConfigUpdate",a.$api.system[i](n).then(function(e){if(200===e.code){if(a.$message.success(a.$t(-1===t?"tips.successDel":"tips.successOper")),-1!==t)return;a.searchForm.page=a.searchForm.page<Math.ceil((a.total-1)/a.searchForm.limit)?a.searchForm.page:Math.ceil((a.total-1)/a.searchForm.limit),a.getTableDataList()}else{if(-1===t)return;a.getTableDataList()}});case 3:case"end":return r.stop()}},r,a)}))()},confirmDel:function(e){var t=this;this.$confirm("删除之后,该城市的车费默认使用全局车费设置,确认删除吗?",this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){t.updateItem(e,-1)})},submitForm:function(){var e=this;this.$refs.subForm.validate(function(t){if(t){var a=JSON.parse(n()(e.subForm)),r=a.id?"getCarConfigUpdate":"getCarConfigAdd";e.$api.system[r](a).then(function(t){200===t.code&&(e.$message.success(e.$t("tips.successSub")),e.showDialog=!1,e.getTableDataList())})}})}},filters:{handleTime:function(e,t){return 1===t?u()(1e3*e).format("YYYY-MM-DD"):2===t?u()(1e3*e).format("HH:mm:ss"):u()(1e3*e).format("YYYY-MM-DD HH:mm:ss")}}},m={rend