chunk-2d217e7a.be23fd88.js 4.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d217e7a"],{c95c:function(e,t,s){"use strict";s.r(t);var n=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",[s("save-form",{ref:"searchForm",staticClass:"searchForm",attrs:{inline:!0,model:e.searchForm,"save-key":"/baseRulesClassSetting/vipChargeSetting"},on:{submit:e.search,"update:model":function(t){e.searchForm=t}}},[s("el-form-item",{attrs:{prop:"organId"}},[s("el-select",{staticClass:"multiple",staticStyle:{width:"180px !important"},attrs:{filterable:"",placeholder:"请选择分部"},model:{value:e.searchForm.organId,callback:function(t){e.$set(e.searchForm,"organId","string"===typeof t?t.trim():t)},expression:"searchForm.organId"}},e._l(e.selects.branchs,(function(e,t){return s("el-option",{key:t,attrs:{label:e.name,value:e.id}})})),1)],1),e._v(" "),s("el-form-item",[s("el-button",{attrs:{"native-type":"submit",type:"primary"}},[e._v("搜索")])],1)],1),e._v(" "),s("div",{staticClass:"tableWrap"},[s("el-table",{staticStyle:{width:"100% !important"},attrs:{data:e.dataList,"header-cell-style":{background:"#EDEEF0",color:"#444"}}},[s("el-table-column",{attrs:{prop:"name",label:"课程形式"}}),e._v(" "),s("el-table-column",{attrs:{prop:"onlineClassesUnitPrice",label:"线上课单价"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[s("el-input",{attrs:{disabled:t.row.onlineDis},model:{value:t.row.onlineClassesUnitPrice,callback:function(s){e.$set(t.row,"onlineClassesUnitPrice","string"===typeof s?s.trim():s)},expression:"scope.row.onlineClassesUnitPrice"}},[s("template",{slot:"append"},[e._v("元/节")])],2)],1)]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"offlineClassesUnitPrice",label:"线下课单价"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[s("el-input",{model:{value:t.row.offlineClassesUnitPrice,callback:function(s){e.$set(t.row,"offlineClassesUnitPrice","string"===typeof s?s.trim():s)},expression:"scope.row.offlineClassesUnitPrice"}},[s("template",{slot:"append"},[e._v("元/节")])],2)],1)]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("div",[e.$helpers.permission("vipGroupDefaultClassesUnitPrice/add")?s("el-button",{attrs:{type:"text"},on:{click:function(s){return e.saveSeting(t.row)}}},[e._v("保存")]):e._e()],1)]}}])})],1)],1)],1)])},a=[],r=(s("ac6a"),s("c7eb")),i=(s("386d"),s("96cf"),s("1da1")),o=s("7e78"),l=(s("1cc7"),s("ce96")),c={name:"vipChargeSeting",data:function(){return{dataList:[],organList:[],searchForm:{organId:null},studentRuleNum:0}},mounted:function(){var e=Object(i["a"])(Object(r["a"])().mark((function e(){var t,s,n,a,i,c;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$store.dispatch("setBranchs");case 2:return n=new l["a"](this.$route.fullPath),a=null===(t=n.searchs[n.key])||void 0===t?void 0:t.form.organId,this.searchForm.organId=a||(null===(s=this.selects)||void 0===s?void 0:s.branchs[0]["id"]),e.prev=5,e.next=8,Object(o["y"])();case 8:i=e.sent,c=JSON.parse(i.data.config),this.studentRuleNum=c.cloud_room_rule.cloud_room_up_limit-1,e.next=16;break;case 13:e.prev=13,e.t0=e["catch"](5),console.log(e.t0);case 16:this.search();case 17:case"end":return e.stop()}}),e,this,[[5,13]])})));function t(){return e.apply(this,arguments)}return t}(),methods:{search:function(){var e=this;this.$refs.searchForm.validate((function(t){e.getList()}))},getList:function(){var e=this;Object(o["ab"])({organId:this.searchForm.organId}).then((function(t){200==t.code&&(e.dataList=t.data,e.dataList.forEach((function(t){t.studentNum>e.studentRuleNum&&(t.onlineDis=!0)})))}))},saveSeting:function(e){var t=this;Object(o["n"])({offlineClassesUnitPrice:e.offlineClassesUnitPrice,onlineClassesUnitPrice:e.onlineClassesUnitPrice,organId:this.searchForm.organId,vipGroupCategoryId:e.id}).then((function(e){200==e.code?t.$message.success("保存成功"):t.$message.error("保存失败,请重试")}))}}},u=c,d=s("2877"),p=Object(d["a"])(u,n,a,!1,null,null,null);t["default"]=p.exports}}]);