chunk-021451cc.1f11e278.js 18 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-021451cc"],{"206d":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACYAAAAmCAYAAACoPemuAAAAAXNSR0IArs4c6QAAAJ5JREFUWAnt2DEKwDAMA8Ck9Cl9e/Ko9i8uXrUIBQ8eVMhgUEW4Zggdo+jZe7+5iurGXVUUEU9VV/ZclWWVXd6Yqmkxi6kCat5nzGKqgJr3GbOYKqDm256xmbfO6kueqoP5OefXVgw3ezyvtSLXcQG82FbMG4MvRUeLUSIIWAxA6GgxSgQBiwEIHS1GiSBgMQChY1uxsn+weR2mDELgB3FmFp5YffVrAAAAAElFTkSuQmCC"},4091:function(t,e,a){},"5cc6":function(t,e,a){var s=a("74e8");s("Uint8",(function(t){return function(e,a,s){return t(this,e,a,s)}}))},c19f:function(t,e,a){"use strict";var s=a("23e7"),o=a("da84"),l=a("621a"),n=a("2626"),r="ArrayBuffer",i=l[r],c=o[r];s({global:!0,forced:c!==i},{ArrayBuffer:i}),n(r)},cbc3:function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"finish_room"},[a("div",{staticClass:"finish_room2"},[a("div",{staticClass:"img-list"},t._l(t.photo,(function(e,s){return a("div",{key:s,staticClass:"room_img"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.url,expression:"item.url"}]}),a("div",{staticClass:"im-button",attrs:{disabled:!t.disabled},on:{click:function(e){return t.deleteImg(s)}}},[a("div",{staticClass:"im-close"}),a("div",{staticClass:"im-close1"})])])})),0),t.photo.length<t.limit?a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"room_add_img"},[t._m(0),a("input",{attrs:{disabled:t.disabled,type:"file"},on:{change:t.add_img}})]):t._e()])])},o=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("span",{staticStyle:{"margin-top":"35px"}},[s("img",{attrs:{src:a("206d")}})])}],l=(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(l),r={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(t){this.photo&&this.photo instanceof Array&&this.photo.splice(t,1)},compress:function(t){var e=null,a=document.createElement("canvas"),s=t.height/t.width;a.width=720,a.height=720*s;var o=a.getContext("2d");return o.clearRect(0,0,a.width,a.height),o.drawImage(t,0,0,a.width,a.height),e=a.toDataURL("image/jpeg"),e},dataURItoBlob:function(t){for(var e=window.atob(t.split(",")[1]),a=t.split(",")[0].split(":")[1].split(";")[0],s=new ArrayBuffer(e.length),o=new Uint8Array(s),l=0;l<e.length;l++)o[l]=e.charCodeAt(l);return new window.Blob([s],{type:a})},add_img:function(t){var e=t.target.files[0];if(/\.(gif|jpg|jpeg|png|GIF|JPG|PNG)$/.test(t.target.value)){var a=10485760,s=e.size;if(s>a)return t.target.value="",void this.$notify.error({title:"上传图片错误",message:"上传图片不能超过10M"});this.loading=!0;var o=new FileReader,l=this;o.readAsDataURL(e);var r=new Image;o.onload=function(a){r.src=this.result,r.onload=function(){var s=a.target.result,o=e;l.isCompress&&(s=l.compress(r),o=l.dataURItoBlob(s));var i=new window.FormData;i.append("file",o),n()({method:"POST",url:"/upload/uploadImage",data:i,timeout:1e6,headers:{"Content-Type":"multipart/form-data"}}).then((function(a){console.log(a.data),t.target.value="","undefined"!=typeof l.photo&&""!=l.photo||(l.photo=[]),console.log(l.photo),l.photo.push({fileName:e.fileName,url:a.data.data}),l.loading=!1})).catch((function(e){t.target.value="",l.loading=!1,console.log(e)}))}}}else t.target.value="",this.$notify.error({title:"上传图片错误",message:"请上传gif|jpg|jpeg|png|GIF|JPG|PNG格式图片"})}}},i=r,c=(a("e5ee"),a("2877")),d=Object(c["a"])(i,s,o,!1,null,"2ed5cae0",null);e["a"]=d.exports},dcaf:function(t,e,a){},e5ee:function(t,e,a){"use strict";a("4091")},f4d7:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"ele-body"},[a("el-card",{attrs:{shadow:"never"}},[a("el-form",{staticClass:"ele-form-search",attrs:{model:t.table.where,"label-width":"77px"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.$refs.table.reload()},submit:function(t){t.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:t.table.where.keyword,callback:function(e){t.$set(t.table.where,"keyword",e)},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:t.table.where.status,callback:function(e){t.$set(t.table.where,"status",e)},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(e){return t.$refs.table.reload()}}},[t._v("查询 ")]),a("el-button",{on:{click:function(e){(t.table.where={})&&t.$refs.table.reload()}}},[t._v("重置")])],1)])],1)],1),a("div",{staticClass:"ele-table-tool ele-table-tool-default"},[t.permission.includes("sys:orders:add")?a("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:function(e){t.showEdit=!0}}},[t._v("添加 ")]):t._e(),t.permission.includes("sys:orders:dall")?a("el-button",{staticClass:"ele-btn-icon",attrs:{type:"danger",icon:"el-icon-delete",size:"small"},on:{click:function(e){return t.remove()}}},[t._v("批量删除 ")]):t._e(),t.permission.includes("sys:orders:export")?a("el-button",{staticClass:"ele-btn-icon",attrs:{icon:"el-icon-download",type:"success"},on:{click:t.exportData}},[t._v("导出")]):t._e()],1),a("ele-data-table",{ref:"table",attrs:{config:t.table,choose:t.choose,height:"calc(100vh - 315px)","highlight-current-row":""},on:{"update:choose":function(e){t.choose=e}},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.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"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("el-avatar",{attrs:{shape:"square",size:35,src:s.fx_thumb}}),a("span",{staticClass:"row_text",domProps:{textContent:t._s(s.fx_name)}})]}}],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":"200"}}),a("el-table-column",{attrs:{prop:"device_num",label:"灯号","show-overflow-tooltip":"",align:"center","min-width":"100"}}),a("el-table-column",{attrs:{prop:"pay_type",label:"支付方式",align:"center","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[1==s.pay_type?a("span",{staticClass:"ele-text-success"},[t._v("微信支付")]):2==s.pay_type?a("span",{staticClass:"ele-text-primary"},[t._v("支付宝支付")]):3==s.pay_type?a("span",{staticClass:"ele-text-warning"},[t._v("刷卡支付")]):t._e()]}}],null,!0)}),a("el-table-column",{attrs:{prop:"buy_type",label:"购买类型","show-overflow-tooltip":"",align:"center","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[1==s.buy_type?a("span",{staticClass:"ele-text-success"},[t._v("购买")]):t._e(),2==s.buy_type?a("span",{staticClass:"ele-text-danger"},[t._v("续费")]):t._e()]}}],null,!0)}),a("el-table-column",{attrs:{prop:"num",label:"数量/天","show-overflow-tooltip":"",align:"center","min-width":"80"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[t._v(" "+t._s(a.num)+"天 ")]}}],null,!0)}),a("el-table-column",{attrs:{prop:"total",label:"总价","show-overflow-tooltip":"",align:"center","min-width":"100"}}),a("el-table-column",{attrs:{prop:"pay_money",label:"实付金额","show-overflow-tooltip":"",align:"center","min-width":"100"}}),a("el-table-column",{attrs:{prop:"lamp_status",label:"灯状态",resizable:!1,align:"center","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[1==s.lamp_status?a("span",[t._v("未开启")]):t._e(),2==s.lamp_status?a("span",[t._v("已开启")]):t._e()]}}],null,!0)}),a("el-table-column",{attrs:{prop:"status",label:"状态",resizable:!1,align:"center","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[1==s.status?a("span",{staticClass:"ele-text-primary"},[t._v("待支付")]):t._e(),2==s.status?a("span",{staticClass:"ele-text-success"},[t._v("已支付")]):t._e(),3==s.status?a("span",{staticClass:"ele-text-danger"},[t._v("已取消")]):t._e()]}}],null,!0)}),a("el-table-column",{attrs:{prop:"sf_name",label:"收福人","show-overflow-tooltip":"",align:"center","min-width":"120"}}),a("el-table-column",{attrs:{label:"创建时间",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[t._v(t._s(t._f("toDateString")(a.create_time)))]}}],null,!0)}),a("el-table-column",{attrs:{label:"支付时间",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[t._v(t._s(a.pay_at))]}}],null,!0)}),a("el-table-column",{attrs:{label:"到期时间",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"160"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[t._v(t._s(a.expire_at))]}}],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:"操作",width:"130px",align:"center",resizable:!1,fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[t.permission.includes("sys:orders:edit")?a("el-link",{attrs:{icon:"el-icon-edit",type:"primary",underline:!1},on:{click:function(e){return t.edit(s)}}},[t._v("详情")]):t._e(),a("el-popconfirm",{staticClass:"ele-action",attrs:{title:"确定要删除此订单信息吗?"},on:{confirm:function(e){return t.remove(s)}}},[t.permission.includes("sys:orders:delete")?a("el-link",{attrs:{slot:"reference",icon:"el-icon-delete",type:"danger",underline:!1},slot:"reference"},[t._v("删除")]):t._e()],1)]}}],null,!0)})]}}])})],1),a("el-dialog",{attrs:{title:(t.editForm.id,"修改订单信息"),visible:t.showEdit,width:"600px","destroy-on-close":!0,"custom-class":"ele-dialog-form","lock-scroll":!1},on:{"update:visible":function(e){t.showEdit=e},closed:function(e){t.editForm={}}}},[a("el-form",{ref:"editForm",attrs:{model:t.editForm,rules:t.editRules,"label-width":"110px"}},[a("el-form-item",{attrs:{label:"佛像图片:",visible:t.showEdit},on:{"update:visible":function(e){t.showEdit=e}}},[a("uploadImage",{attrs:{limit:1,disabled:!0},model:{value:t.editForm.fx_thumb,callback:function(e){t.$set(t.editForm,"fx_thumb",e)},expression:"editForm.fx_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:t._s(t.editForm.nickname)}})]),a("el-form-item",{attrs:{label:"佛像名称:",prop:"fx_name"}},[a("span",{domProps:{textContent:t._s(t.editForm.fx_name)}})]),a("el-form-item",{attrs:{label:"订单编号:",prop:"order_sn"}},[a("span",{domProps:{textContent:t._s(t.editForm.order_sn)}})]),a("el-form-item",{attrs:{label:"交易单号:",prop:"trade_no"}},[a("span",{domProps:{textContent:t._s(t.editForm.trade_no)}})]),a("el-form-item",{attrs:{label:"灯号:",prop:"device_num"}},[a("span",{domProps:{textContent:t._s(t.editForm.device_num)}}),t._v("号 ")]),a("el-form-item",{attrs:{label:"购买数量:",prop:"num"}},[a("span",{domProps:{textContent:t._s(t.editForm.num)}}),t._v("天 ")]),a("el-form-item",{attrs:{label:"购买总价:",prop:"total"}},[a("span",{domProps:{textContent:t._s(t.editForm.total)}})]),a("el-form-item",{attrs:{label:"实付金额:",prop:"pay_money"}},[a("span",{domProps:{textContent:t._s(t.editForm.pay_money)}})]),a("el-form-item",{attrs:{label:"下单时间:",prop:"create_time"}},[a("span",{domProps:{textContent:t._s(t.editForm.create_time)}})]),a("el-form-item",{attrs:{label:"支付时间:",prop:"pay_at"}},[a("span",{domProps:{textContent:t._s(t.editForm.pay_at)}})]),a("el-form-item",{attrs:{label:"到期时间:",prop:"pay_at"}},[a("span",{domProps:{textContent:t._s(t.editForm.expire_at)}})]),a("el-form-item",{attrs:{label:"收福人:",prop:"sf_name"}},[a("span",{domProps:{textContent:t._s(t.editForm.sf_name)}})]),a("el-form-item",{attrs:{label:"祈福内容:",prop:"qf_content"}},[a("span",{domProps:{textContent:t._s(t.editForm.qf_content)}})]),a("el-form-item",{attrs:{label:"订单备注:",prop:"remark"}},[a("span",{domProps:{textContent:t._s(t.editForm.remark)}})]),a("el-form-item",{attrs:{label:"灯状态:",prop:"lamp_status"}},[1==t.editForm.lamp_status?a("span",[t._v("未开启")]):t._e(),2==t.editForm.lamp_status?a("span",[t._v("已开启")]):t._e()]),a("el-form-item",{attrs:{label:"订单状态:",prop:"status"}},[1==t.editForm.status?a("span",[t._v("待支付")]):t._e(),2==t.editForm.status?a("span",[t._v("已支付")]):t._e(),3==t.editForm.status?a("span",[t._v("已取消")]):t._e()])],1)],1)],1)],1),a("div",{attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.showEdit=!1}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.send()}}},[t._v("发货")])],1)],1)],1)},o=[],l=(a("4160"),a("d81d"),a("159b"),a("5530")),n=a("1146"),r=a.n(n),i=a("2f62"),c=a("cbc3"),d={name:"SysOrdersOnline",components:{uploadImage:c["a"]},data:function(){return{table:{url:"/gdorders/index",where:{status:"0"},page:{page:1,limit:50}},choose:[],showEdit:!1,editForm:{id:0,status:1,form:1,thumb:{},albums:[],title:""},express:[],editRules:{status:[{required:!0,message:"请选择发布状态",trigger:"blur"}]}}},computed:Object(l["a"])(Object(l["a"])({},Object(i["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(t){this.editForm=Object.assign({},t),this.editForm.albums||(this.editForm.albums=[]),this.showEdit=!0},save:function(){var t=this;this.$refs["editForm"].validate((function(e){if(!e)return!1;var a=t.$loading({lock:!0});t.$http.post("/gdorders/edit",t.editForm).then((function(e){a.close(),0===e.data.code?(t.showEdit=!1,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)}))}))},remove:function(t){var e=this;if(t){var a=this.$loading({lock:!0});this.$http.post("/gdorders/delete",{id:t.id}).then((function(t){a.close(),0===t.data.code?(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)}))}else{if(0===this.choose.length)return this.$message.error("请至少选择一条数据");var s=this.choose.map((function(t){return t.id}));this.$confirm("确定要删除选中的信息吗?","提示",{type:"warning"}).then((function(){var t=e.$loading({lock:!0});e.$http.post("/gdorders/delete",{id:s}).then((function(a){t.close(),0===a.data.code?(e.$message({type:"success",message:a.data.msg}),e.$refs.table.reload()):e.$message.error(a.data.msg)})).catch((function(a){t.close(),e.$message.error(a.message)}))})).catch((function(){return 0}))}},exportData:function(){var t=this,e=[["商品","订单号","交易单号","灯号","购买类型","收福人","祈福内容","数量","订单金额","实付金额","支付时间","到期时间","灯状态","状态"]],a=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("/gdorders/index?page="+this.table.where.page+"&limit="+this.table.where.limit+"&status="+this.table.where.status).then((function(s){if(a.close(),0===s.data.code){s.data.data.forEach((function(t){e.push([t.fx_name,t.order_sn,t.trade_no,t.device_num?t.device_num+"号":"",["","购买","续费"][t.buy_type],t.sf_name,t.qf_content,t.num,t.total,t.pay_money,t.pay_at,t.expire_at,["","未开启","已开启"][t.lamp_status],["","待支付","已支付","已取消"][t.status]])}));var o=r.a.utils.aoa_to_sheet(e);t.$util.exportSheet(r.a,o,"线上供灯订单")}else t.$message.error(s.data.msg)})).catch((function(e){a.close(),t.$message.error(e.message)}))},editStatus:function(t){var e=this,a=this.$loading({lock:!0}),s=Object.assign({},t);this.$http.post("/gdorders/status",s).then((function(s){a.close(),0===s.data.code?e.$message({type:"success",message:s.data.msg}):(t.status=t.status?1:2,e.$message.error(s.data.msg))})).catch((function(t){a.close(),e.$message.error(t.message)}))}}},u=d,m=(a("fe1b"),a("2877")),p=Object(m["a"])(u,s,o,!1,null,"3eddd08a",null);e["default"]=p.exports},fe1b:function(t,e,a){"use strict";a("dcaf")}}]);