chunk-ba978af2.0cff1cd9.js 15 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ba978af2"],{"0b65":function(e,t,i){"use strict";t["a"]={shortcuts:[{text:"今天",onClick:function(e){var t=new Date,i=new Date;i.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate())),e.$emit("pick",[i,t])}},{text:"昨天",onClick:function(e){var t=new Date,i=new Date;i.setTime(i.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),t.setTime(t.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()-1))),e.$emit("pick",[i,t])}},{text:"最近7天",onClick:function(e){var t=new Date,i=new Date;i.setTime(i.getTime()-6048e5),e.$emit("pick",[i,t])}},{text:"最近30天",onClick:function(e){var t=new Date,i=new Date;i.setTime(i.getTime()-2592e6),e.$emit("pick",[i,t])}},{text:"本月",onClick:function(e){var t=new Date,i=new Date;i.setTime(i.setTime(new Date((new Date).getFullYear(),(new Date).getMonth(),1))),e.$emit("pick",[i,t])}},{text:"本年",onClick:function(e){var t=new Date,i=new Date;i.setTime(i.setTime(new Date((new Date).getFullYear(),0,1))),e.$emit("pick",[i,t])}}]}},"5bbd":function(e,t,i){},"9e7d":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"divBox"},[i("div",{staticClass:"selCard"},[i("el-form",{ref:"searchForm",attrs:{model:e.tableFrom,size:"small",inline:"","label-width":"85px"}},[i("el-form-item",{staticClass:"width100",attrs:{label:"订单状态:",prop:"order_type"}},[i("el-radio-group",{attrs:{type:"button"},on:{change:function(t){return e.getList(1)}},model:{value:e.tableFrom.order_type,callback:function(t){e.$set(e.tableFrom,"order_type",t)},expression:"tableFrom.order_type"}},[i("el-radio-button",{attrs:{label:""}},[e._v("全部 ")]),e._v(" "),i("el-radio-button",{attrs:{label:"1"}},[e._v("待付款")]),e._v(" "),i("el-radio-button",{attrs:{label:"2"}},[e._v("待发货")]),e._v(" "),i("el-radio-button",{attrs:{label:"3"}},[e._v("待收货")]),e._v(" "),i("el-radio-button",{attrs:{label:"4"}},[e._v("待评价")]),e._v(" "),i("el-radio-button",{attrs:{label:"5"}},[e._v("交易完成")]),e._v(" "),i("el-radio-button",{attrs:{label:"6"}},[e._v("已退款")]),e._v(" "),i("el-radio-button",{attrs:{label:"7"}},[e._v("已删除")])],1)],1),e._v(" "),i("el-form-item",{attrs:{label:"时间选择:"}},[i("el-date-picker",{staticStyle:{width:"280px"},attrs:{"value-format":"yyyy/MM/dd",format:"yyyy/MM/dd",type:"daterange",placement:"bottom-end",placeholder:"自定义时间","picker-options":e.pickerOptions},on:{change:e.onchangeTime},model:{value:e.timeVal,callback:function(t){e.timeVal=t},expression:"timeVal"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"关键字:",prop:"keyword"}},[i("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入订单号/收货人/联系方式",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(1)}},model:{value:e.tableFrom.keyword,callback:function(t){e.$set(e.tableFrom,"keyword",t)},expression:"tableFrom.keyword"}})],1),e._v(" "),i("el-form-item",{attrs:{label:"开票状态:",prop:"status"}},[i("el-select",{staticClass:"selWidth",attrs:{placeholder:"请选择",clearable:""},on:{change:e.getList},model:{value:e.tableFrom.status,callback:function(t){e.$set(e.tableFrom,"status",t)},expression:"tableFrom.status"}},e._l(e.invoiceStatusList,(function(e){return i("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),i("el-form-item",{attrs:{label:"用户信息:",prop:"username"}},[i("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入用户昵称/手机号",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.getList(1)}},model:{value:e.tableFrom.username,callback:function(t){e.$set(e.tableFrom,"username",t)},expression:"tableFrom.username"}})],1),e._v(" "),i("el-form-item",[i("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.getList(1)}}},[e._v("搜索")]),e._v(" "),i("el-button",{attrs:{size:"small"},on:{click:function(t){return e.searchReset()}}},[e._v("重置")])],1)],1)],1),e._v(" "),i("el-card",{staticClass:"mt14"},[i("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"},on:{click:function(t){return e.getInvoiceInfo("","invoice")}}},[e._v("\n 合并开票\n ")]),e._v(" "),i("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],ref:"multipleSelection",staticClass:"table",attrs:{"tooltip-effect":"dark","row-key":function(e){return e.order_receipt_id},data:e.tableData.data,size:"small"},on:{"selection-change":e.handleSelectionChange}},[i("el-table-column",{attrs:{type:"selection","reserve-selection":!0,width:"55"}}),e._v(" "),i("el-table-column",{attrs:{prop:"storeOrder.order_sn",label:"订单号","min-width":"170"}}),e._v(" "),i("el-table-column",{attrs:{prop:"user.nickname",label:"用户昵称","min-width":"90"}}),e._v(" "),i("el-table-column",{attrs:{prop:"order_price",label:"订单金额","min-width":"90"}}),e._v(" "),i("el-table-column",{attrs:{label:"订单状态","min-width":"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.storeOrder&&0===t.row.storeOrder.paid&&0===t.row.storeOrder.status?i("span",[e._v("待付款")]):i("span",[e._v(e._s(e._f("orderStatusFilter")(t.row.storeOrder&&t.row.storeOrder.status)))])]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"receipt_price",label:"发票金额","min-width":"90"}}),e._v(" "),i("el-table-column",{attrs:{prop:"receipt_sn",label:"发票单号","min-width":"120"}}),e._v(" "),i("el-table-column",{attrs:{label:"发票类型","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.receipt_info?i("span",[e._v(e._s(1==t.row.receipt_info.receipt_type?"普通发票":"专用发票"))]):i("span",[e._v("--")])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"发票抬头","min-width":"90"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.receipt_info.receipt_title))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"发票联系人","min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.storeOrder&&t.row.storeOrder.real_name))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"发票联系信息","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(t.row.delivery_info&&t.row.delivery_info.email?t.row.delivery_info.email:t.row.delivery_info.user_address&&t.row.delivery_info.user_address+t.row.delivery_info.user_phone&&t.row.delivery_info.user_phone))])]}}])}),e._v(" "),i("el-table-column",{attrs:{label:"开票状态","min-width":"120"},scopedSlots:e._u([{key:"default",fn:function(t){return[i("span",[e._v(e._s(1==t.row.status?"已开":"未开"))])]}}])}),e._v(" "),i("el-table-column",{attrs:{prop:"mer_mark",label:"发票备注","min-width":"120"}}),e._v(" "),i("el-table-column",{attrs:{label:"操作","min-width":"150",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.row.status&&t.row.storeOrder&&1===t.row.storeOrder.paid?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return e.getInvoiceInfo(t.row.order_receipt_id,"invoice")}}},[e._v("开票")]):e._e(),e._v(" "),i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return e.onOrderDetail(t.row.order_id)}}},[e._v("订单详情")]),e._v(" "),t.row.status?i("el-button",{attrs:{type:"text",size:"small"},on:{click:function(i){return e.getInvoiceInfo(t.row.order_receipt_id,"edit")}}},[e._v("编辑")]):e._e()]}}])})],1),e._v(" "),i("div",{staticClass:"block"},[i("el-pagination",{attrs:{background:"","page-size":e.tableFrom.limit,"current-page":e.tableFrom.page,layout:"total, prev, pager, next, jumper",total:e.tableData.total},on:{"size-change":e.handleSizeChange,"current-change":e.pageChange}})],1)],1),e._v(" "),e.dialogVisible?i("el-dialog",{attrs:{title:e.invoiceInfo.title,visible:e.dialogVisible,width:"660px","custom-class":"customHeight"},on:{"update:visible":function(t){e.dialogVisible=t}}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[i("div",{staticClass:"box-container"},[i("div",{staticClass:"title"},[e._v("发票详情")]),e._v(" "),i("div",{staticClass:"acea-row"},[i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("发票申请单号:")]),e._v(e._s(e.invoiceInfo.receipt_sn))])]),e._v(" "),i("div",{staticClass:"title"},[e._v("发票信息")]),e._v(" "),i("div",{staticClass:"acea-row"},[i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("发票抬头:")]),e._v(e._s(e.invoiceInfo.receipt_info.receipt_title))]),e._v(" "),i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("发票类型:")]),e._v(e._s(1==e.invoiceInfo.receipt_info.receipt_type?"普通发票":"专用发票"))]),e._v(" "),i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("发票抬头类型:")]),e._v(e._s("1"==e.invoiceInfo.receipt_info.receipt_title_type?"个人":"企业"))]),e._v(" "),i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("发票金额:")]),e._v(e._s(e.invoiceInfo.receipt_price))]),e._v(" "),"2"==e.invoiceInfo.receipt_info.receipt_title_type?i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("企业税号:")]),e._v(e._s(e.invoiceInfo.receipt_info.duty_paragraph))]):e._e(),e._v(" "),2==e.invoiceInfo.receipt_info.receipt_type?i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("开户银行:")]),e._v(e._s(e.invoiceInfo.receipt_info.bank_name))]):e._e(),e._v(" "),2==e.invoiceInfo.receipt_info.receipt_type?i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("银行账号:")]),e._v(e._s(e.invoiceInfo.receipt_info.bank_code))]):e._e(),e._v(" "),2==e.invoiceInfo.receipt_info.receipt_type?i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("企业地址:")]),e._v(e._s(e.invoiceInfo.receipt_info.address))]):e._e(),e._v(" "),2==e.invoiceInfo.receipt_info.receipt_type?i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("企业电话:")]),e._v(e._s(e.invoiceInfo.receipt_info.tel))]):e._e()]),e._v(" "),i("div",{staticClass:"title"},[e._v("联系信息:")]),e._v(" "),1==e.invoiceInfo.receipt_info.receipt_type?i("div",[i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("联系邮箱:")]),e._v(e._s(e.invoiceInfo.delivery_info.email))])]):i("div",[i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("联系人姓名:")]),e._v(e._s(e.invoiceInfo.delivery_info.user_name))]),e._v(" "),i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("联系人电话:")]),e._v(e._s(e.invoiceInfo.delivery_info.user_phone))]),e._v(" "),i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("联系人地址:")]),e._v(e._s(e.invoiceInfo.delivery_info.user_address))])]),e._v(" "),i("div",[i("div",{staticClass:"list sp"},[i("label",{staticClass:"name"},[e._v("开票状态:")]),e._v(e._s(1==e.invoiceInfo.status?"已开":"未开"))]),e._v(" "),i("div",{staticClass:"list sp100"},[i("label",{staticClass:"name"},[e._v("发票号码:")]),i("span",{staticClass:"info mt10"},[i("el-input",{nativeOn:{keyup:function(t){e.invoiceData.number=e.invoiceData.number.replace(/[^\w]/g,"")}},model:{value:e.invoiceData.number,callback:function(t){e.$set(e.invoiceData,"number",t)},expression:"invoiceData.number"}})],1)]),e._v(" "),i("div",{staticClass:"list sp100"},[i("label",{staticClass:"name"},[e._v("发票备注:")]),i("span",{staticClass:"info"},[i("el-input",{attrs:{type:"textarea",rows:3},model:{value:e.invoiceData.mark,callback:function(t){e.$set(e.invoiceData,"mark",t)},expression:"invoiceData.mark"}})],1)])]),e._v(" "),i("el-button",{staticStyle:{width:"100%","margin-top":"15px"},attrs:{type:"primary"},on:{click:e.handleInvoic}},[e._v("确定")])],1)])]):e._e(),e._v(" "),i("order-detail",{ref:"orderDetail",attrs:{orderId:e.orderId,disabled:!0,drawer:e.drawer},on:{closeDrawer:e.closeDrawer,changeDrawer:e.changeDrawer,getList:e.getList}})],1)},s=[],n=(i("ac6a"),i("6b54"),i("f8b7")),l=i("0b65"),o=i("068f"),r={components:{orderDetail:o["a"]},name:"OrderInvoice",data:function(){return{pickerOptions:l["a"],logisticsName:"refund",id:0,type:"",tableData:{data:[],total:0},invoiceStatusList:[{label:"已开票",value:1},{label:"未开票",value:0}],listLoading:!0,tableFrom:{username:"",type:"",date:"",page:1,limit:20,receipt_sn:"",order_type:"",keyword:"",status:""},orderChartType:{},timeVal:[],multipleSelection:[],selectionList:[],tableFromLog:{page:1,limit:20},tableDataLog:{data:[],total:0},loading:!1,dialogVisible:!1,orderDatalist:null,invoiceInfo:{},invoiceData:{number:"",mark:""},orderId:"",drawer:!1}},mounted:function(){this.$route.query.hasOwnProperty("sn")?this.tableFrom.order_sn=this.$route.query.sn:this.tableFrom.order_sn="",this.getList(1)},methods:{searchReset:function(){this.timeVal=[],this.tableFrom.date="",this.$refs.searchForm.resetFields(),this.getList(1)},changeDrawer:function(e){this.drawer=e},closeDrawer:function(){this.drawer=!1},onOrderDetail:function(e){this.orderId=e,this.$refs.orderDetail.getInfo(e),this.drawer=!0},handleSelectionChange:function(e){this.multipleSelection=e},pageChangeLog:function(e){this.tableFromLog.page=e,this.getList("")},handleSizeChangeLog:function(e){this.tableFromLog.limit=e,this.getList("")},getInvoiceInfo:function(e,t){var i=this;this.id=e,this.type=t;var a=e?e.toString():this.getInvoic(),s={ids:a};"invoice"===t?Object(n["K"])(s).then((function(e){i.listLoading=!1,i.dialogVisible=!0,i.invoiceInfo=e.data,i.invoiceData={number:"",mark:""}})).catch((function(e){i.$message.error(e.message),i.listLoading=!1})):Object(n["J"])(e).then((function(e){i.listLoading=!1,i.dialogVisible=!0,i.invoiceInfo=e.data,i.invoiceData={number:e.data.receipt_no,mark:e.data.mer_mark}})).catch((function(e){i.$message.error(e.message),i.listLoading=!1}))},handleInvoic:function(){var e=this,t=this.id?this.id.toString():this.getInvoic(),i={ids:t,receipt_sn:this.invoiceInfo.receipt_sn,receipt_price:this.invoiceInfo.receipt_price,receipt_no:this.invoiceData.number,mer_mark:this.invoiceData.mark?this.invoiceData.mark:""};"invoice"===this.type?Object(n["I"])(i).then((function(t){e.$message.success(t.message),e.dialogVisible=!1,e.getList(),e.id=""})).catch((function(t){e.$message.error(t.message),e.listLoading=!1})):Object(n["M"])(this.id,{receipt_no:this.invoiceData.number,mer_mark:this.invoiceData.mark?this.invoiceData.mark:""}).then((function(t){e.$message.success(t.message),e.dialogVisible=!1,e.getList(),e.id=""})).catch((function(t){e.$message.error(t.message),e.listLoading=!1}))},getInvoic:function(){var e=[];return this.multipleSelection.forEach((function(t,i){e.push(t.order_receipt_id)})),e.toString()},onOrderMark:function(e){},onchangeTime:function(e){this.timeVal=e,this.tableFrom.date=e?this.timeVal.join("-"):"",this.getList(1)},getList:function(e){var t=this;this.listLoading=!0,this.tableFrom.page=e||this.tableFrom.page,Object(n["L"])(this.tableFrom).then((function(e){t.orderChartType=e.data.stat,t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.$message.error(e.message),t.listLoading=!1}))},pageChange:function(e){this.tableFrom.page=e,this.getList()},handleSizeChange:function(e){this.tableFrom.limit=e,this.getList()},handleClose:function(){this.dialogLogistics=!1}}},c=r,d=(i("f60f"),i("2877")),v=Object(d["a"])(c,a,s,!1,null,"0f777cd0",null);t["default"]=v.exports},f60f:function(e,t,i){"use strict";i("5bbd")}}]);