chunk-64899ae3.1752112d.js 17 KB

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