(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-efc6a6ec"],{"5c01":function(t,e,a){"use strict";a.d(e,"b",(function(){return l})),a.d(e,"c",(function(){return i})),a.d(e,"d",(function(){return n})),a.d(e,"e",(function(){return s})),a.d(e,"a",(function(){return c}));var r=a("6b2d");const l=t=>r.a.post("/match_friend.MatchFriendOrder/create",t),i=t=>r.a.get("/match_friend.MatchFriendOrder/del",{params:t}),n=t=>r.a.get("/match_friend.MatchFriendOrder/detail",{params:t}),s=t=>r.a.post("/match_friend.MatchFriendOrder/update",t),c=t=>r.a.get("/match_friend.MatchFriendOrder/list",{params:t})},dd4b:function(t,e,a){"use strict";a.r(e);var r=a("5c01"),l={data:()=>({query:{id:"",user_id:"",sn:""},table:{currentPage:1,pageSize:10,total:0,data:null}}),methods:{formatPayTime(t){if(null==t||""===t)return"";const e=Number(t);if(!e)return"";const a=new Date(e<1e12?1e3*e:e),r=t=>String(t).padStart(2,"0");return`${a.getFullYear()}-${r(a.getMonth()+1)}-${r(a.getDate())} ${r(a.getHours())}:${r(a.getMinutes())}:${r(a.getSeconds())}`},onSearch(){this.table.currentPage=1,this.getData(this.table.pageSize,this.table.currentPage)},onReset(){this.query.id="",this.query.user_id="",this.query.sn="",this.table.currentPage=1,this.getData(this.table.pageSize,this.table.currentPage)},delItem(t){this.$confirm("确认删除该订单吗？","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Object(r.c)({id:t}).then(t=>{1==t.code?(this.$message.success("删除成功!"),this.getData(this.table.pageSize,this.table.currentPage)):this.$message.error(t.msg||"删除失败")})}).catch(()=>{})},goDetail(t){this.$router.push({path:"/application/matchfriend/match_friendOrderDetail",query:{id:t}})},goEdit(t){this.$router.push({path:"/application/matchfriend/match_friendOrderEdit",query:{id:t}})},handleCurrentChange(t){this.table.currentPage=t,this.getData(this.table.pageSize,this.table.currentPage)},getData(t,e){const a={page:e,limit:t};Object.keys(this.query||{}).forEach(t=>{const e=this.query[t];""!==e&&null!=e&&(a[t]=e)}),Object(r.a)(a).then(t=>{this.table.currentPage=e;const a=t&&t.data;this.table.total=a&&a.total||0,this.table.data=a&&(a.data||a.list)||[]})},jumpAdd(){this.$router.push({path:"/application/matchfriend/match_friendOrderAdd",query:{}})}},mounted(){this.getData(10,1)}},i=a("2877"),n=Object(i.a)(l,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"ls-card m-b-12"},[a("el-alert",{attrs:{title:"温馨提示：该页面用来管理H5盲盒订单",type:"info","show-icon":"",closable:!1}})],1),a("div",{staticClass:"ls-card m-b-12"},[a("el-form",{attrs:{inline:!0,size:"mini",model:t.query}},[a("el-form-item",{attrs:{label:"订单ID"}},[a("el-input",{staticStyle:{width:"160px"},attrs:{clearable:"",placeholder:"请输入"},model:{value:t.query.id,callback:function(e){t.$set(t.query,"id",e)},expression:"query.id"}})],1),a("el-form-item",{attrs:{label:"用户ID"}},[a("el-input",{staticStyle:{width:"160px"},attrs:{clearable:"",placeholder:"请输入"},model:{value:t.query.user_id,callback:function(e){t.$set(t.query,"user_id",e)},expression:"query.user_id"}})],1),a("el-form-item",{attrs:{label:"订单编号"}},[a("el-input",{staticStyle:{width:"220px"},attrs:{clearable:"",placeholder:"请输入"},model:{value:t.query.sn,callback:function(e){t.$set(t.query,"sn",e)},expression:"query.sn"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:t.onSearch}},[t._v("搜索")]),a("el-button",{attrs:{type:"primary"},on:{click:t.jumpAdd}},[t._v("新增")])],1)],1)],1),a("div",{staticClass:"ls-card",staticStyle:{"min-height":"60vh"}},[a("el-table",{staticStyle:{width:"100%"},attrs:{size:"mini",data:null==t.table.data?[]:t.table.data,height:"600"}},[a("el-table-column",{attrs:{prop:"id",label:"订单ID"}}),a("el-table-column",{attrs:{prop:"user_id",label:"用户ID"}}),a("el-table-column",{attrs:{prop:"sn",label:"订单编号"}}),a("el-table-column",{attrs:{prop:"blind_boxe_id",label:"盲盒id"}}),a("el-table-column",{attrs:{prop:"pay_way",label:"支付方式"}}),a("el-table-column",{attrs:{prop:"pay_time",label:"支付时间"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.formatPayTime(e.row.pay_time)))])]}}])}),a("el-table-column",{attrs:{prop:"pay_status",label:"支付状态"}}),a("el-table-column",{attrs:{prop:"order_amount",label:"支付金额"}}),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.goDetail(e.row.id)}}},[t._v("详情")]),a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.goEdit(e.row.id)}}},[t._v("编辑")]),a("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(a){return a.stopPropagation(),t.delItem(e.row.id)}}},[t._v("删除")])]}}])})],1),a("el-pagination",{attrs:{"current-page":t.table.currentPage,"page-size":t.table.pageSize,layout:"total, prev, pager, next",total:t.table.total},on:{"current-change":t.handleCurrentChange}})],1)])}),[],!1,null,null,null);e.default=n.exports}}]);