admin-api/public/mer/js/chunk-0f3e5d27.1b6ef853.js

1 line
12 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0f3e5d27"],{"0b65":function(t,e,a){"use strict";e["a"]={shortcuts:[{text:"今天",onClick:function(t){var e=new Date,a=new Date;a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),t.$emit("pick",[a,e])}},{text:"昨天",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),e.setTime(e.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.$emit("pick",[a,e])}},{text:"最近7天",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近30天",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"本月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),t.$emit("pick",[a,e])}},{text:"本年",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.setTime(new Date((new Date).getFullYear(),0,1))),t.$emit("pick",[a,e])}}]}},"5a5d":function(t,e,a){},a160:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"container"},[a("el-form",{ref:"tableFrom",attrs:{model:t.tableFrom,size:"small","label-width":"90px",inline:!0}},[a("el-form-item",{attrs:{label:"创建时间:",prop:"date"}},[a("el-date-picker",{staticClass:"selWidth",attrs:{"value-format":"yyyy/MM/dd",align:"right","unlink-panels":"",format:"yyyy/MM/dd",size:"small",type:"daterange",placement:"bottom-end",placeholder:"自定义时间","picker-options":t.pickerOptions},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"上架状态:",prop:"status"}},[a("el-select",{staticClass:"filter-item selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.is_used,callback:function(e){t.$set(t.tableFrom,"is_used",e)},expression:"tableFrom.is_used"}},[a("el-option",{attrs:{label:"上架",value:1}}),t._v(" "),a("el-option",{attrs:{label:"下架",value:0}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"商品搜索:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入商品名称/ID",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.getList(1)}}},[t._v("查询")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.reset("tableFrom")}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("router-link",{attrs:{to:{path:t.roterPre+"/marketing/integral/addProduct"}}},[a("el-button",{attrs:{size:"small",type:"primary"}},[t._v("添加积分商品")])],1),t._v(" "),a("el-button",{attrs:{size:"small",type:"success"},on:{click:function(e){return t.quickAdd()}}},[t._v("快速添加")]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticClass:"mt20",staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{"min-width":"100",label:"商品图片"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.image}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品标题","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"ot_price",label:"兑换积分","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"price",label:"兑换金额","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"80"}}),t._v(" "),a("el-table-column",{attrs:{prop:"sales",label:"已兑换数量","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time","min-width":"200",label:"创建时间"}}),t._v(" "),a("el-table-column",{attrs:{prop:"sort","min-width":"120",label:"排序"}}),t._v(" "),a("el-table-column",{attrs:{label:"状态","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"上架","inactive-text":"下架"},nativeOn:{click:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_used,callback:function(a){t.$set(e.row,"is_used",a)},expression:"scope.row.is_used"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"180",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("router-link",{attrs:{to:{path:t.roterPre+"/marketing/integral/orderList?id="+e.row.product_id}}},[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"}},[t._v("兑换记录")])],1),t._v(" "),a("router-link",{attrs:{to:{path:t.roterPre+"/marketing/integral/addProduct/"+e.row.product_id}}},[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"}},[t._v("编辑")])],1),t._v(" "),a("router-link",{attrs:{to:{path:t.roterPre+"/marketing/integral/addProduct/"+e.row.product_id+"?type=2"}}},[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"}},[t._v("复制")])],1),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.product_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1),t._v(" "),a("goods-list",{ref:"goodsList",on:{getProduct:t.getProduct}})],1)},l=[],n=a("b7be"),s=a("83d6"),o=a("0b65"),r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.dialogVisible?a("el-dialog",{attrs:{title:"商品信息",visible:t.dialogVisible,width:"1000px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("div",{staticClass:"divBox"},[a("div",{staticClass:"header clearfix"},[a("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small",inline:"","label-width":"100px"}},[a("el-form-item",{staticClass:"width100",attrs:{label:"商品分类:"}},[a("el-cascader",{attrs:{options:t.merCateList,props:{checkStrictly:!0,emitPath:!1},clearable:""},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.pid,callback:function(e){t.$set(t.tableFrom,"pid",e)},expression:"tableFrom.pid"}})],1),t._v(" "),a("el-form-item",{staticClass:"width100",attrs:{label:"商品搜索:"}},[a("el-input",{attrs:{placeholder:"请输入商品名称,关键字,编号",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(e)}},model:{value:t.tableFrom.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1)],1)],1)]),t._v(" "),t.resellShow?a("el-alert",{attrs:{title:"注:添加为预售商品后,原普通商品会下架;如该商品已开启其它营销活动,请勿选择!",type:"warning","show-icon":""}}):t._e(),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%","margin-top":"10px"},attrs:{data:t.tableData.data,size:"mini"}},[a("el-table-column",{attrs:{width:"55"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-radio",{attrs:{label:e.row.product_id},nativeOn:{change:function(a){return t.getTemplateRow(e.row)}},model:{value:t.templateRadio,callback:function(e){t.templateRadio=e},expression:"templateRadio"}},[t._v(" ")])]}}],null,!1,3465899556)}),t._v(" "),a("el-table-column",{attrs:{prop:"product_id",label:"ID","min-width":"50"}}),t._v(" "),a("el-table-column",{attrs:{label:"商品图","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.image,"preview-src-list":[t.row.image]}})],1)]}}],null,!1,2331550732)}),t._v(" "),a("el-table-column",{attrs:{prop:"store_name",label:"商品名称","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"stock",label:"库存","min-width":"80"}})],1),t._v(" "),a("div",{staticClass:"block mb20"},[a("el-pagination",{attrs:{"page-sizes":[10,20,40],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)]):t._e()},c=[],d=a("c4c8"),u={name:"GoodsList",props:{resellShow:{type:Boolean,default:!1}},data:function(){return{dialogVisible:!1,templateRadio:0,merCateList:[],roterPre:s["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:10,cate_id:"",store_name:"",keyword:"",type:1,is_gift_bag:0},multipleSelection:{},checked:[]}},mounted:function(){var t=this;this.getList(),this.getCategorySelect(),window.addEventListener("unload",(function(e){return t.unloadHandler(e)}))},methods:{getTemplateRow:function(t){this.multipleSelection={src:t.image,id:t.product_id},this.dialogVisible=!1,this.$emit("getProduct",this.multipleSelection)},getCategorySelect:function(){var t=this;Object(d["q"])().then((function(e){t.merCateList=e.data})).catch((function(e){t.$message.error(e.message)}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(d["Q"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()}}},m=u,p=a("2877"),g=Object(p["a"])(m,r,c,!1,null,"7dc6e8bc",null),h=g.exports,b={name:"integralProduct",components:{goodsList:h},data:function(){return{props:{multiple:!1,emitPath:!1},Loading:!1,dialogVisible:!1,roterPre:s["roterPre"],listLoading:!0,receiveType:0,id:"",categoryList:[],labelList:[],tableData:{data:[],total:0},tableFrom:{page:1,limit:20,keyword:"",is_used:"",date:""},type:0,isShow:!1,pickerOptions:o["a"],timeVal:[]}},mounted:function(){this.getList(1)},methods:{quickAdd:function(){this.$refs.goodsList.dialogVisible=!0},getProduct:function(t){this.$router.push({path:this.roterPre+"/marketing/integral/addProduct/".concat(t.id,"?type=1")})},onchangeTime:function(t){this.timeVal=t,this.tableFrom.date=t?this.timeVal.join("-"):"",this.tableFrom.page=1,this.getList()},reset:function(t){this.timeVal=[],this.tableFrom={page:1,limit:20,keyword:"",is_used:"",date:""},this.getList("")},handleDelete:function(t,e){var a=this;this.$modalSureDelete("删除积分商品后将无法恢复,请谨慎操作!").then((function(){Object(n["nb"])(t).then((function(t){var e=t.message;a.$message.success(e),a.getList("")})).catch((function(t){var e=t.message;a.$message.error(e)}))}))},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(n["pb"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},onchangeIsShow:function(t){var e=this;Object(n["rb"])(t.product_id,t.is_used).then((function(t){var a=t.message;e.$message.success(a),e.getList("")})).catch((function(t){var a=t.message;e.$message.error(a)}))}}},v=b,f=(a("b7b0"),Object(p["a"])(v,i,l,!1,null,"6620c1dd",null));e["default"]=f.exports},b7b0:function(t,e,a){"use strict";a("5a5d")}}]);