1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1ebf3d75"],{"302a":function(e,t,a){},"64c1":function(e,t,a){"use strict";a("302a")},"741a":function(e,t,a){"use strict";a.r(t);var l=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:"标签类型:",prop:"type"}},[a("el-select",{staticClass:"filter-item selWidth mr20",attrs:{placeholder:"请选择",size:"small",clearable:""},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.type,callback:function(t){e.$set(e.tableFrom,"type",t)},expression:"tableFrom.type"}},e._l(e.labelTypeList,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"标签名称:",prop:"keyword"}},[a("el-input",{staticClass:"selWidth",attrs:{clearable:"",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.onAdd}},[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","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"ID",prop:"label_rule_id","min-width":"60"}}),e._v(" "),a("el-table-column",{attrs:{label:"标签名称",prop:"label.label_name","min-width":"120"}}),e._v(" "),a("el-table-column",{attrs:{label:"标签类型","min-width":"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(0===t.row.type?"订单数":"订单金额"))])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"标签规则","min-width":"180"},scopedSlots:e._u([{key:"default",fn:function(t){return["0.00"===t.row.min&&"0.00"===t.row.max?a("span",[e._v("从未支付的客户")]):a("span",[1===t.row.type?a("span",[e._v("订单金额在"+e._s(t.row.min)+" - "+e._s(t.row.max)+"的客户")]):a("span",[e._v("支付订单数在"+e._s(Math.trunc(t.row.min))+" - "+e._s(Math.trunc(t.row.max))+"的客户")])])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"客户数",prop:"user_num","min-width":"60"}}),e._v(" "),a("el-table-column",{attrs:{label:"更新时间","min-width":"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.update_time?t.row.update_time:"未更新"))])]}}])}),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.onUpdate(t.row.label_rule_id)}}},[e._v("更新")]),e._v(" "),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.label_rule_id,t.$index)}}},[e._v("删除")])]}}])})],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:e.title,visible:e.dialogVisible,width:"660px"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("el-form",{directives:[{name:"loading",rawName:"v-l
|