chunk-0e56fdfb.21e1bff2.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0e56fdfb"],{"206d":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAJ5JREFUWAnt2DEKwDAMA8Ck9Cl9e/Ko9i8uXrUIBQ8eVMhgUEW4Zggdo+jZe7+5iurGXVUUEU9VV/ZclWWVXd6Yqmkxi6kCat5nzGKqgJr3GbOYKqDm256xmbfO6kueqoP5OefXVgw3ezyvtSLXcQG82FbMG4MvRUeLUSIIWAxA6GgxSgQBiwEIHS1GiSBgMQChY1uxsn+weR2mDELgB3FmFp5YffVrAAAAAElFTkSuQmCC"},"3edc":function(e,t,a){},4091:function(e,t,a){},"5cc6":function(e,t,a){var s=a("74e8");s("Uint8",(function(e){return function(t,a,s){return e(this,t,a,s)}}))},"7db6":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"ele-body"},[a("el-card",{attrs:{shadow:"never"}},[a("el-form",{staticClass:"ele-form-search",attrs:{model:e.table.where,"label-width":"77px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.$refs.table.reload()},submit:function(e){e.preventDefault()}}},[a("el-row",{attrs:{gutter:15}},[a("el-col",{attrs:{md:6,sm:12}},[a("el-form-item",{attrs:{label:"关键词:"}},[a("el-input",{attrs:{placeholder:"请输入订单号/用户昵称",clearable:""},model:{value:e.table.where.keyword,callback:function(t){e.$set(e.table.where,"keyword",t)},expression:"table.where.keyword"}})],1)],1),a("el-col",{attrs:{md:6,sm:12}},[a("el-form-item",{attrs:{label:"状态:"}},[a("el-select",{staticClass:"ele-fluid",attrs:{placeholder:"请选择状态",clearable:""},model:{value:e.table.where.status,callback:function(t){e.$set(e.table.where,"status",t)},expression:"table.where.status"}},[a("el-option",{attrs:{label:"全部",value:"0"}}),a("el-option",{attrs:{label:"待支付",value:"1"}}),a("el-option",{attrs:{label:"已支付",value:"2"}})],1)],1)],1),a("el-col",{attrs:{md:6,sm:12}},[a("div",{staticClass:"ele-form-actions"},[a("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(t){return e.$refs.table.reload()}}},[e._v("查询 ")]),a("el-button",{on:{click:function(t){(e.table.where={type:1})&&e.$refs.table.reload()}}},[e._v("重置")])],1)])],1)],1),a("div",{staticClass:"ele-table-tool ele-table-tool-default"},[e.permission.includes("sys:order_qifu:add")?a("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:function(t){e.showEdit=!0}}},[e._v("添加 ")]):e._e(),e.permission.includes("sys:order_qifu:dall")?a("el-button",{staticClass:"ele-btn-icon",attrs:{type:"danger",icon:"el-icon-delete",size:"small"},on:{click:function(t){return e.remove()}}},[e._v("批量删除 ")]):e._e(),e.permission.includes("sys:order_qifu:export")?a("el-button",{staticClass:"ele-btn-icon",attrs:{icon:"el-icon-download",type:"success"},on:{click:e.exportData}},[e._v("导出")]):e._e()],1),a("ele-data-table",{ref:"table",attrs:{config:e.table,choose:e.choose,height:"calc(100vh - 315px)","highlight-current-row":""},on:{"update:choose":function(t){e.choose=t},"change-page":e.changePage,"change-limit":e.changePageSize},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.index;return[a("el-table-column",{attrs:{type:"selection",width:"45",align:"center",fixed:"left"}}),a("el-table-column",{attrs:{type:"index",index:s,label:"编号",width:"60",align:"center",fixed:"left","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"商品","min-width":"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(e){var t=e.row;return[a("el-avatar",{attrs:{shape:"square",size:35,src:t.thumb}})]}}],null,!0)}),a("el-table-column",{attrs:{prop:"nickname",label:"用户","show-overflow-tooltip":"",align:"center","min-width":"100"}}),a("el-table-column",{attrs:{prop:"order_sn",label:"订单编号","show-overflow-tooltip":"",align:"center","min-width":"180"}}),a("el-table-column",{attrs:{prop:"type",label:"类型","show-overflow-tooltip":"",align:"center","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.row;return[1==s.type?a("span",[e._v("祈福")]):e._e(),2==s.type?a("span",[e._v("超度")]):e._e(),3==s.type?a("span",[e._v("放生")]):e._e()]}}],null,!0)}),a("el-table-column",{attrs:{prop:"price",label:"价格","show-overflow-tooltip":"",align:"center","min-width":"100"}}),a("el-table-column",{attrs:{prop:"num",label:"数量","show-overflow-tooltip":"",align:"center","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.row;return[e._v(" "+e._s(s.num)),!s.specs||s.specs?a("span"):e._e()]}}],null,!0)}),a("el-table-column",{attrs:{prop:"total",label:"总价/券","show-overflow-tooltip":"",align:"center","min-width":"100"}}),a("el-table-column",{attrs:{prop:"status",label:"状态",resizable:!1,align:"center","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.row;return[1==s.status?a("span",{staticClass:"ele-text-info"},[e._v("待支付")]):e._e(),2==s.status?a("span",{staticClass:"ele-text-success"},[e._v("已支付")]):e._e(),3==s.status?a("span",{staticClass:"ele-text-danger"},[e._v("已取消")]):e._e()]}}],null,!0)}),a("el-table-column",{attrs:{prop:"trade_no",label:"交易单号","show-overflow-tooltip":"",align:"center","min-width":"180"}}),a("el-table-column",{attrs:{prop:"remark",label:"备注","show-overflow-tooltip":"",align:"center","min-width":"200"}}),a("el-table-column",{attrs:{label:"创建时间",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(e._s(e._f("toDateString")(a.create_time)))]}}],null,!0)}),a("el-table-column",{attrs:{label:"支付时间",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){var a=t.row;return[e._v(e._s(a.pay_at))]}}],null,!0)}),a("el-table-column",{attrs:{label:"操作",width:"130px",align:"center",resizable:!1,fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.row;return[e.permission.includes("sys:order_qifu:edit")?a("el-link",{attrs:{icon:"el-icon-edit",type:"primary",underline:!1},on:{click:function(t){return e.edit(s)}}},[e._v("详情")]):e._e(),a("el-popconfirm",{staticClass:"ele-action",attrs:{title:"确定要删除此订单信息吗?"},on:{confirm:function(t){return e.remove(s)}}},[e.permission.includes("sys:order_qifu:delete")?a("el-link",{attrs:{slot:"reference",icon:"el-icon-delete",type:"danger",underline:!1},slot:"reference"},[e._v("删除")]):e._e()],1)]}}],null,!0)})]}}])})],1),a("el-dialog",{attrs:{title:(e.editForm.id,"修改订单信息"),visible:e.showEdit,width:"600px","destroy-on-close":!0,"custom-class":"ele-dialog-form","lock-scroll":!1},on:{"update:visible":function(t){e.showEdit=t},closed:function(t){e.editForm={}}}},[a("el-form",{ref:"editForm",attrs:{model:e.editForm,rules:e.editRules,"label-width":"110px"}},[a("el-form-item",{attrs:{label:"商品图片:",visible:e.showEdit},on:{"update:visible":function(t){e.showEdit=t}}},[a("uploadImage",{attrs:{limit:1,disabled:!0},model:{value:e.editForm.thumb,callback:function(t){e.$set(e.editForm,"thumb",t)},expression:"editForm.thumb"}})],1),a("el-row",{attrs:{gutter:15}},[a("el-col",{attrs:{sm:24}},[a("el-col",{attrs:{sm:24}},[a("el-form-item",{attrs:{label:"购买用户:",prop:"nickname"}},[a("span",{domProps:{textContent:e._s(e.editForm.nickname)}})]),a("el-form-item",{attrs:{label:"订单编号:",prop:"order_sn"}},[a("span",{domProps:{textContent:e._s(e.editForm.order_sn)}})]),a("el-form-item",{attrs:{label:"交易单号:",prop:"trade_no"}},[a("span",{domProps:{textContent:e._s(e.editForm.trade_no)}})]),a("el-form-item",{attrs:{label:"商品价格:",prop:"price"}},[a("span",{domProps:{textContent:e._s(e.editForm.price)}})]),a("el-form-item",{attrs:{label:"购买数量:",prop:"num"}},[a("span",{domProps:{textContent:e._s(e.editForm.num)}}),a("span",{domProps:{textContent:e._s(e.editForm.specs)}})]),a("el-form-item",{attrs:{label:"购买总价:",prop:"total"}},[a("span",{domProps:{textContent:e._s(e.editForm.total)}})]),a("el-form-item",{attrs:{label:"下单时间:",prop:"create_time"}},[a("span",{domProps:{textContent:e._s(e.editForm.create_time)}})]),a("el-form-item",{attrs:{label:"支付时间:",prop:"pay_at"}},[a("span",{domProps:{textContent:e._s(e.editForm.pay_at)}})]),a("el-form-item",{attrs:{label:"订单备注:",prop:"remark"}},[a("span",{domProps:{textContent:e._s(e.editForm.remark)}})]),a("el-form-item",{attrs:{label:"订单状态:",prop:"status"}},[1==e.editForm.status?a("span",[e._v("待支付")]):e._e(),2==e.editForm.status?a("span",[e._v("已支付")]):e._e(),3==e.editForm.status?a("span",[e._v("已取消")]):e._e()])],1)],1)],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.showEdit=!1}}},[e._v("取消")])],1)],1)],1)},o=[],i=(a("4160"),a("d81d"),a("159b"),a("5530")),n=a("1146"),l=a.n(n),r=a("2f62"),c=a("cbc3"),d={name:"SysOrdersQifu",components:{uploadImage:c["a"]},data:function(){return{table:{url:"/enshrineorders/index",where:{status:"0",type:1},page:{page:1,limit:30}},choose:[],showEdit:!1,editForm:{id:0,status:1,form:1,thumb:{},albums:[],title:""},express:[],editRules:{status:[{required:!0,message:"请选择发布状态",trigger:"blur"}]}}},computed:Object(i["a"])(Object(i["a"])({},Object(r["b"])(["permission"])),{},{editContent:function(){return{menubar:!1,file_picker_callback:this.file_picker_callback,skin_url:"dark"===this.$store.state.theme.theme?"/tinymce/skins/ui/oxide-dark":"/tinymce/skins/ui/oxide",content_css:"dark"===this.$store.state.theme.theme?"/tinymce/skins/content/dark/content.css":"/tinymce/skins/content/default/content.css"}}}),mounted:function(){},methods:{edit:function(e){this.editForm=Object.assign({},e),this.editForm.albums||(this.editForm.albums=[]),this.showEdit=!0},save:function(){var e=this;this.$refs["editForm"].validate((function(t){if(!t)return!1;var a=e.$loading({lock:!0});e.$http.post("/enshrineorders/edit",e.editForm).then((function(t){a.close(),0===t.data.code?(e.showEdit=!1,e.$message({type:"success",message:t.data.msg}),e.$refs.table.reload()):e.$message.error(t.data.msg)})).catch((function(t){a.close(),e.$message.error(t.message)}))}))},send:function(){var e=this;this.$refs["editForm"].validate((function(t){if(!t)return!1;var a=e.$loading({lock:!0});e.$http.post("/enshrineorders/send",e.editForm).then((function(t){a.close(),0===t.data.code?(e.showEdit=!1,e.$message({type:"success",message:t.data.msg}),e.$refs.table.reload()):e.$message.error(t.data.msg)})).catch((function(t){a.close(),e.$message.error(t.message)}))}))},remove:function(e){var t=this;if(e){var a=this.$loading({lock:!0});this.$http.post("/enshrineorders/delete",{id:e.id}).then((function(e){a.close(),0===e.data.code?(t.$message({type:"success",message:e.data.msg}),t.$refs.table.reload()):t.$message.error(e.data.msg)})).catch((function(e){a.close(),t.$message.error(e.message)}))}else{if(0===this.choose.length)return this.$message.error("请至少选择一条数据");var s=this.choose.map((function(e){return e.id}));this.$confirm("确定要删除选中的信息吗?","提示",{type:"warning"}).then((function(){var e=t.$loading({lock:!0});t.$http.post("/enshrineorders/delete",{id:s}).then((function(a){e.close(),0===a.data.code?(t.$message({type:"success",message:a.data.msg}),t.$refs.table.reload()):t.$message.error(a.data.msg)})).catch((function(a){e.close(),t.$message.error(a.message)}))})).catch((function(){return 0}))}},changePage:function(e){this.table.page.page=e},changePageSize:function(e){this.table.page.limit=e},exportData:function(){var e=this,t=[["商品","订单号","交易单号","类型","数量","订单金额","实付金额","用户昵称","手机号","支付时间","状态"]],a=this.$loading({lock:!0});this.table.page.page=this.table.page.page?this.table.page.page:1,this.table.page.limit=this.table.page.limit?this.table.page.limit:50,this.$http.get("/enshrineorders/index?page="+this.table.page.page+"&limit="+this.table.page.limit+"&status="+this.table.where.status).then((function(s){if(a.close(),0===s.data.code){s.data.data.forEach((function(e){t.push([e.goods_name,e.order_sn,e.trade_no,["","祈福","超度","放生"][e.type],e.num,e.total,e.pay_money,e.nickname,e.mobile,e.pay_at,["","待支付","已支付","已取消"][e.status]])}));var o=l.a.utils.aoa_to_sheet(t);e.$util.exportSheet(l.a,o,"祈福供奉订单")}else e.$message.error(s.data.msg)})).catch((function(t){a.close(),e.$message.error(t.message)}))},editStatus:function(e){var t=this,a=this.$loading({lock:!0}),s=Object.assign({},e);this.$http.post("/enshrineorders/status",s).then((function(s){a.close(),0===s.data.code?t.$message({type:"success",message:s.data.msg}):(e.status=e.status?1:2,t.$message.error(s.data.msg))})).catch((function(e){a.close(),t.$message.error(e.message)}))}}},u=d,m=(a("f1e8"),a("2877")),p=Object(m["a"])(u,s,o,!1,null,"13b0fdc4",null);t["default"]=p.exports},c19f:function(e,t,a){"use strict";var s=a("23e7"),o=a("da84"),i=a("621a"),n=a("2626"),l="ArrayBuffer",r=i[l],c=o[l];s({global:!0,forced:c!==r},{ArrayBuffer:r}),n(l)},cbc3:function(e,t,a){"use strict";var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"finish_room"},[a("div",{staticClass:"finish_room2"},[a("div",{staticClass:"img-list"},e._l(e.photo,(function(t,s){return a("div",{key:s,staticClass:"room_img"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.url,expression:"item.url"}]}),a("div",{staticClass:"im-button",attrs:{disabled:!e.disabled},on:{click:function(t){return e.deleteImg(s)}}},[a("div",{staticClass:"im-close"}),a("div",{staticClass:"im-close1"})])])})),0),e.photo.length<e.limit?a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"room_add_img"},[e._m(0),a("input",{attrs:{disabled:e.disabled,type:"file"},on:{change:e.add_img}})]):e._e()])])},o=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("span",{staticStyle:{"margin-top":"35px"}},[s("img",{attrs:{src:a("206d")}})])}],i=(a("a434"),a("c19f"),a("a9e3"),a("d3b7"),a("ac1f"),a("1276"),a("5cc6"),a("9a8c"),a("a975"),a("735e"),a("c1ac"),a("d139"),a("3a7b"),a("d5d6"),a("82f8"),a("e91f"),a("60bd"),a("5f96"),a("3280"),a("3fcc"),a("ca91"),a("25a1"),a("cd26"),a("3c5d"),a("2954"),a("649e"),a("219c"),a("170b"),a("b39a"),a("72f7"),a("bc3a")),n=a.n(i),l={name:"uploadImage",props:{limit:{type:Number,default:function(){return 1}},disabled:{type:Boolean,default:function(){return!1}},isCompress:{type:Boolean,default:function(){return!1}},value:{}},data:function(){return{photo:[],deleteStatus:!1,loading:!1}},watch:{photo:function(){1==this.limit?this.$emit("input",this.photo.length>0?this.photo[0].url:""):this.$emit("input",this.photo)},value:function(){1==this.limit?this.value instanceof Array?this.photo=[]:this.photo=this.value?[{url:this.value}]:[]:this.photo=this.value}},mounted:function(){1==this.limit?this.value instanceof Array?this.photo=[]:this.photo=this.value?[{url:this.value}]:[]:this.value instanceof Array?this.photo=this.value:this.photo=[]},methods:{deleteImg:function(e){this.photo&&this.photo instanceof Array&&this.photo.splice(e,1)},compress:function(e){var t=null,a=document.createElement("canvas"),s=e.height/e.width;a.width=720,a.height=720*s;var o=a.getContext("2d");return o.clearRect(0,0,a.width,a.height),o.drawImage(e,0,0,a.width,a.height),t=a.toDataURL("image/jpeg"),t},dataURItoBlob:function(e){for(var t=window.atob(e.split(",")[1]),a=e.split(",")[0].split(":")[1].split(";")[0],s=new ArrayBuffer(t.length),o=new Uint8Array(s),i=0;i<t.length;i++)o[i]=t.charCodeAt(i);return new window.Blob([s],{type:a})},add_img:function(e){var t=e.target.files[0];if(/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(e.target.value)){var a=10485760,s=t.size;if(s>a)return e.target.value="",void this.$notify.error({title:"上传图片错误",message:"上传图片不能超过10M"});this.loading=!0;var o=new FileReader,i=this;o.readAsDataURL(t);var l=new Image;o.onload=function(a){l.src=this.result,l.onload=function(){var s=a.target.result,o=t;i.isCompress&&(s=i.compress(l),o=i.dataURItoBlob(s));var r=new window.FormData;r.append("file",o),n()({method:"POST",url:"/upload/uploadImage",data:r,timeout:1e6,headers:{"Content-Type":"multipart/form-data"}}).then((function(a){console.log(a.data),e.target.value="","undefined"!=typeof i.photo&&""!=i.photo||(i.photo=[]),console.log(i.photo),i.photo.push({fileName:t.fileName,url:a.data.data}),i.loading=!1})).catch((function(t){e.target.value="",i.loading=!1,console.log(t)}))}}}else e.target.value="",this.$notify.error({title:"上传图片错误",message:"请上传gif|jpg|jpeg|png|GIF|JPG|PNG格式图片"})}}},r=l,c=(a("e5ee"),a("2877")),d=Object(c["a"])(r,s,o,!1,null,"2ed5cae0",null);t["a"]=d.exports},e5ee:function(e,t,a){"use strict";a("4091")},f1e8:function(e,t,a){"use strict";a("3edc")}}]);