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 lines
11 KiB
1 lines
11 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4598ccba"],{"0b65":function(e,t,a){"use strict";t["a"]={shortcuts:[{text:"今天",onClick:function(e){var t=new Date,a=new Date;a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),e.$emit("pick",[a,t])}},{text:"昨天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),e.$emit("pick",[a,t])}},{text:"最近7天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-6048e5),e.$emit("pick",[a,t])}},{text:"最近30天",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.getTime()-2592e6),e.$emit("pick",[a,t])}},{text:"本月",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),e.$emit("pick",[a,t])}},{text:"本年",onClick:function(e){var t=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),0,1))),e.$emit("pick",[a,t])}}]}},c6ea:function(e,t,a){"use strict";a("dfaf")},d2e8: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("div",{staticClass:"selCard"},[a("el-form",{ref:"searchForm",attrs:{model:e.tableFrom,inline:"",size:"small","label-width":"85px"}},[a("el-form-item",{attrs:{label:"时间选择:"}},[a("el-date-picker",{staticStyle:{width:"280px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",size:"small",type:"daterange",placement:"bottom-end",placeholder:"自定义时间","picker-options":e.pickerOptions},on:{change:e.onchangeTime},model:{value:e.timeVal,callback:function(t){e.timeVal=t},expression:"timeVal"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"消息名称:",prop:"keyword"}},[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"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.getList(1)}}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(t){return e.searchReset()}}},[e._v("重置")])],1)],1)],1),e._v(" "),a("el-card",{staticClass:"mt14"},[a("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"},on:{click:e.createNews}},[e._v("发布消息")]),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.tableData.data,size:"small"}},[a("el-table-column",{attrs:{label:"序号","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.$index+(e.tableFrom.page-1)*e.tableFrom.limit+1))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"notice_title",label:"消息名称","min-width":"150"}}),e._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"发送日期","min-width":"180"}}),e._v(" "),a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left",inline:""}},[a("el-form-item",[a("span",[e._v(e._s(t.row.notice_content))])]),e._v(" "),3===t.row.type||4===t.row.type?a("el-form-item",{attrs:{label:"商户分类:"}},[a("span",{staticClass:"mr10"},[e._v(e._s(t.row.type_str?t.row.type_str:"-"))])]):e._e(),e._v(" "),1===t.row.type||4===t.row.type?a("el-form-item",{attrs:{label:"商户名称:"}},[t.row.type_str?a("span",{staticClass:"mr10"},[e._v(e._s(t.row.type_str?t.row.type_str:"-"))]):a("span",[e._v("-")])]):e._e(),e._v(" "),2===t.row.type||4===t.row.type?a("el-form-item",{attrs:{label:"商户类别:"}},[t.row.type_str?a("span",{staticClass:"mr10"},[e._v(e._s(t.row.type_str?t.row.type_str:"-"))]):a("span",[e._v("-")])]):e._e()],1)]}}])})],1),e._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, 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:"发布消息",visible:e.dialogVisible,width:"600px"},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:{size:"small",rules:e.ruleValidate,model:e.formValidate,"label-width":"100px"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"消息名称:",prop:"notice_title"}},[a("el-input",{attrs:{placeholder:"请输入消息名称"},model:{value:e.formValidate.notice_title,callback:function(t){e.$set(e.formValidate,"notice_title",t)},expression:"formValidate.notice_title"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"消息内容:",prop:"notice_content"}},[a("el-input",{attrs:{maxLength:"500",placeholder:"仅限500字",type:"textarea",rows:2},model:{value:e.formValidate.notice_content,callback:function(t){e.$set(e.formValidate,"notice_content",t)},expression:"formValidate.notice_content"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"选择商户"}},[a("el-radio-group",{model:{value:e.formValidate.type,callback:function(t){e.$set(e.formValidate,"type",t)},expression:"formValidate.type"}},[a("el-radio",{attrs:{label:4}},[e._v("全部")]),e._v(" "),a("el-radio",{attrs:{label:1}},[e._v("商户名称")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("商户类别")]),e._v(" "),a("el-radio",{attrs:{label:3}},[e._v("商户分类")])],1)],1),e._v(" "),1===e.formValidate.type?a("el-form-item",{attrs:{label:"商户名称:"}},[a("el-select",{staticClass:"width100",attrs:{multiple:"",clearable:"",filterable:"",placeholder:"请选择"},on:{change:function(t){return e.getList(1)}},model:{value:e.formValidate.mer_id,callback:function(t){e.$set(e.formValidate,"mer_id",t)},expression:"formValidate.mer_id"}},e._l(e.merSelect,(function(e){return a("el-option",{key:e.mer_id,attrs:{label:e.mer_name,value:e.mer_id}})})),1)],1):e._e(),e._v(" "),2===e.formValidate.type?a("el-form-item",{attrs:{label:"商户类别:"}},[a("el-select",{staticClass:"width100",attrs:{clearable:"",placeholder:"请选择"},model:{value:e.formValidate.is_trader,callback:function(t){e.$set(e.formValidate,"is_trader",t)},expression:"formValidate.is_trader"}},[a("el-option",{attrs:{label:"自营",value:"1"}}),e._v(" "),a("el-option",{attrs:{label:"非自营",value:"0"}})],1)],1):e._e(),e._v(" "),3===e.formValidate.type?a("el-form-item",{attrs:{label:"商户分类:"}},[a("el-select",{staticClass:"width100",attrs:{multiple:"",placeholder:"请选择",clearable:""},on:{change:function(t){return e.getList()}},model:{value:e.formValidate.category_id,callback:function(t){e.$set(e.formValidate,"category_id",t)},expression:"formValidate.category_id"}},e._l(e.merCateList,(function(e){return a("el-option",{key:e.merchant_category_id,attrs:{label:e.category_name,value:e.merchant_category_id}})})),1)],1):e._e()],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.handleSubmit("formValidate")}}},[e._v("确 定")])],1)],1)],1)},l=[],r=a("c80c"),n=(a("96cf"),a("3b8d")),o=(a("7f7f"),a("8593")),s=a("c4c8"),c=a("e572"),m=a("0b65"),d={name:"SystemLog",data:function(){return{props:{emitPath:!1},pickerOptions:m["a"],listLoading:!0,tableData:{data:[],total:0},fromList:c["a"],dialogVisible:!1,categoryList:[],merCateList:[],merSelect:[],fullscreenLoading:!1,tableFrom:{page:1,limit:20,store_name:"",keyword:"",date:""},formValidate:{type:4,notice_title:"",notice_content:"",is_trader:"",mer_id:[],category_id:[]},timeVal:"",ruleValidate:{notice_title:[{required:!0,message:"请输入消息名称",trigger:"blur"}],notice_content:[{required:!0,message:"请输入消息内容",trigger:"blur"}]}}},mounted:function(){this.getCategorySelect(),this.getMerSelect(),this.getList("")},methods:{searchReset:function(){this.timeVal=[],this.tableFrom.date="",this.$refs.searchForm.resetFields(),this.getList(1)},getCategorySelect:function(){var e=this;Object(s["O"])().then((function(t){e.merCateList=t.data.list})).catch((function(t){e.$message.error(t.message)}))},getMerSelect:function(){var e=this;Object(s["Q"])().then((function(t){e.merSelect=t.data})).catch((function(t){e.$message.error(t.message)}))},onchangeTime:function(e){this.timeVal=e,this.tableFrom.date=e?this.timeVal.join("-"):"",this.getList(1)},selectChange:function(e){this.tableFrom.date=e,this.tableFrom.page=1,this.timeVal=[],this.getList(1)},getList:function(e){var t=this;this.listLoading=!0,this.tableFrom.page=e||this.tableFrom.page,Object(o["ab"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,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(1)},createNews:function(){this.dialogVisible=!0,this.formValidate={type:4,notice_title:"",notice_content:"",is_trader:"",category_id:""}},handleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;Object(o["x"])(t.formValidate).then(function(){var e=Object(n["a"])(Object(r["a"])().mark((function e(a){return Object(r["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(1);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)}))}))}}},u=d,f=(a("c6ea"),a("2877")),p=Object(f["a"])(u,i,l,!1,null,"feb6a456",null);t["default"]=p.exports},dfaf:function(e,t,a){},e572:function(e,t,a){"use strict";a.d(t,"c",(function(){return i})),a.d(t,"a",(function(){return l})),a.d(t,"b",(function(){return r}));var i=[{label:"开启",value:1},{label:"关闭",value:0}],l={title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},r={title:"状态",custom:!0,fromTxt:[{text:"全部",val:""},{text:"待审核",val:"0"},{text:"审核已通过",val:"1"},{text:"审核未通过",val:"2"}]}}}]); |