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.
 
 
 
 
 
crmeb_php/public/system/js/chunk-80ff9cbe.97459286.js

1 lines
9.3 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-80ff9cbe"],{"317c":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("div",{staticClass:"demo-input-suffix acea-row"},[a("el-form",{attrs:{inline:"",size:"small","label-width":"90px"}},[a("el-form-item",{attrs:{label:"商品分类:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:e.merCateList,props:{checkStrictly:!0},clearable:""},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.cate_id,callback:function(t){e.$set(e.tableFrom,"cate_id",t)},expression:"tableFrom.cate_id"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"显示状态:"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.is_show,callback:function(t){e.$set(e.tableFrom,"is_show",t)},expression:"tableFrom.is_show"}},[a("el-option",{attrs:{label:"显示",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"不显示",value:"0"}})],1)],1),e._v(" "),a("el-form-item",{attrs:{label:"搜索:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入须知名称"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(1)}},model:{value:e.tableFrom.keyword,callback:function(t){e.$set(e.tableFrom,"keyword",t)},expression:"tableFrom.keyword"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(t){return e.getList(1)}},slot:"append"})],1)],1)],1)],1)]),e._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.onAdd}},[e._v("添加价格说明")])],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData.data,size:"small"}},[a("el-table-column",{attrs:{prop:"rule_id",label:"ID","min-width":"60"}}),e._v(" "),a("el-table-column",{attrs:{prop:"rule_name",label:"名称","min-width":"60"}}),e._v(" "),a("el-table-column",{attrs:{label:"使用分类","min-width":"60"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.cate_name.toString()||"默认全部"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"sort",label:"排序","min-width":"60"}}),e._v(" "),a("el-table-column",{attrs:{prop:"is_show",label:"是否显示","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(a){return e.onchangeIsShow(t.row)}},model:{value:t.row.is_show,callback:function(a){e.$set(t.row,"is_show",a)},expression:"scope.row.is_show"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"update_time",label:"更新时间","min-width":"100"}}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"100"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.onEdit(t.row)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.handleDelete(t.row.rule_id,t.$index)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1),e._v(" "),a("el-dialog",{attrs:{title:e.rule_id?"编辑说明":"添加说明",visible:e.dialogVisible,width:"900px","before-close":e.handleClose},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.fullscreenLoading,expression:"fullscreenLoading"}],ref:"formValidate",staticClass:"formValidate mt20",attrs:{rules:e.ruleValidate,model:e.formValidate,"label-width":"120px"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"名称:",prop:"rule_name"}},[a("el-input",{attrs:{placeholder:"请输入名称"},model:{value:e.formValidate.rule_name,callback:function(t){e.$set(e.formValidate,"rule_name",t)},expression:"formValidate.rule_name"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"使用商品分类:"}},[a("el-cascader",{staticClass:"selWidth",attrs:{options:e.merCateList,props:{multiple:!0,checkStrictly:!0,emitPath:!1},clearable:""},model:{value:e.formValidate.cate_id,callback:function(t){e.$set(e.formValidate,"cate_id",t)},expression:"formValidate.cate_id"}}),e._v(" "),a("span",[e._v(" 注: 当不选择任何分类时,默认全部商品")])],1),e._v(" "),a("el-form-item",{attrs:{label:"是否显示:",prop:"is_show"}},[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏",width:60},model:{value:e.formValidate.is_show,callback:function(t){e.$set(e.formValidate,"is_show",t)},expression:"formValidate.is_show"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"排序:",prop:"sort"}},[a("el-input-number",{attrs:{placeholder:"请输入排序序号"},model:{value:e.formValidate.sort,callback:function(t){e.$set(e.formValidate,"sort",t)},expression:"formValidate.sort"}})],1),e._v(" "),a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"价格说明详情:",prop:"content"}},[a("ueditor-from",{attrs:{content:e.formValidate.content},model:{value:e.formValidate.content,callback:function(t){e.$set(e.formValidate,"content",t)},expression:"formValidate.content"}})],1)],1),e._v(" "),a("el-form-item",{staticStyle:{"margin-top":"30px"}},[a("el-button",{staticClass:"submission",attrs:{type:"primary",size:"small"},on:{click:function(t){return e.handleSubmit("formValidate")}}},[e._v("提交")])],1)],1)],1)],1)},l=[],s=a("c80c"),n=(a("96cf"),a("3b8d")),o=(a("7f7f"),a("ac6a"),a("ef0d")),r=a("c4c8"),c={name:"LabelList",components:{ueditorFrom:o["a"]},data:function(){return{listLoading:!0,tableData:{data:[],total:0},tableFrom:{cate_id:[],is_show:"",keyword:"",page:1,limit:20},rule_id:"",merCateList:[],dialogVisible:!1,fullscreenLoading:!1,formValidate:{},ruleValidate:{rule_name:[{required:!0,message:"请输入名称",trigger:"blur"}],sort:[{required:!0,message:"请输入排序",trigger:"change"}],content:[{required:!0,message:"请输入说明详情",trigger:"blur"}]}}},mounted:function(){this.getCategorySelect(),this.getList("")},methods:{getCategorySelect:function(){var e=this;Object(r["w"])().then((function(t){e.merCateList=t.data})).catch((function(t){e.$message.error(t.message)}))},getList:function(e){var t=this;this.listLoading=!0,this.tableFrom.page=e||this.tableFrom.page,Object(r["Z"])(this.tableFrom).then((function(e){e.data.list.forEach((function(e,t){e.cate_id=[],e.cate_name=[];var a="";e.cate.forEach((function(t,i){a=t.category&&t.category.cate_name?t.category.cate_name:"",e.cate_id.push(t.right_id),e.cate_name.push(a)}))})),t.tableData.data=e.data.list,console.log(t.tableData.data),t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(e){this.tableFrom.page=e,this.getList("")},handleSizeChange:function(e){this.tableFrom.limit=e,this.getList("")},onAdd:function(){this.rule_id="",this.dialogVisible=!0,this.reset()},onEdit:function(e){this.rule_id=e.rule_id,this.formValidate=e,this.dialogVisible=!0},reset:function(){this.formValidate={cate_id:[],rule_name:"",content:"",is_show:0,sort:""}},handleDelete:function(e,t){var a=this;this.$modalSure("确定删除该说明").then((function(){Object(r["z"])(e).then((function(e){var t=e.message;a.$message.success(t),a.getList("")})).catch((function(e){var t=e.message;a.$message.error(t)}))}))},onchangeIsShow:function(e){var t=this;Object(r["ab"])(e.rule_id,{is_show:e.is_show}).then((function(e){var a=e.message;t.$message.success(a),t.getList("")})).catch((function(e){var a=e.message;t.$message.error(a)}))},handleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;t.rule_id?Object(r["Fb"])(t.rule_id,t.formValidate).then(function(){var e=Object(n["a"])(Object(s["a"])().mark((function e(a){return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.fullscreenLoading=!1,t.$message.success(a.message),t.dialogVisible=!1,t.getList("");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.fullscreenLoading=!1,t.$message.error(e.message)})):Object(r["y"])(t.formValidate).then(function(){var e=Object(n["a"])(Object(s["a"])().mark((function e(a){return Object(s["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.fullscreenLoading=!1,t.$message.success(a.message),t.dialogVisible=!1,t.getList("");case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.fullscreenLoading=!1,t.$message.error(e.message)}))}))},handleClose:function(){this.dialogVisible=!1}}},u=c,d=(a("6edc"),a("2877")),m=Object(d["a"])(u,i,l,!1,null,"2aa151b3",null);t["default"]=m.exports},"6edc":function(e,t,a){"use strict";a("7f12")},"7f12":function(e,t,a){}}]);