1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-75146ec5"],{"0129":function(t,o,e){"use strict";e("23dd")},"1acf":function(t,o,e){"use strict";e("a1cd")},"23dd":function(t,o,e){},"333d":function(t,o,e){"use strict";var n=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"page-content"},[e("el-pagination",{attrs:{background:"","hide-on-single-page":t.paginationConfig.hideSinglePage,"current-page":t.paginationConfig.page,"page-size":t.paginationConfig.size,"page-sizes":t.paginationConfig.sizeList,layout:t.paginationConfig.layout,"pager-count":5,total:t.paginationConfig.total},on:{"current-change":t.handleCurrentChange,"size-change":t.handleSizeChange}}),t._v(" "),e("el-button",{attrs:{size:"mini",icon:"el-icon-refresh"},nativeOn:{click:function(o){return o.preventDefault(),t.refresh(o)}}},[t._v("刷新")])],1)},i=[],a=(e("c5f6"),{name:"Pagination",props:{paginationConfig:{hideSinglePage:{type:Boolean,default:function(){return!1}},page:{type:Number,default:function(){return 1}},size:{type:Number,default:function(){return 15}},sizeList:{type:Array,default:function(){return[10,15,30,50]}},layout:{type:String,default:function(){return"total, sizes, prev, pager, next, jumper"}},total:{type:Number,default:function(){return 0}}}},data:function(){return{}},created:function(){},methods:{handleCurrentChange:function(t){this.paginationConfig.page=t,this.$emit("putPagination",this.paginationConfig)},handleSizeChange:function(t){this.paginationConfig.size=t,this.$emit("putPagination",this.paginationConfig)},refresh:function(){this.$emit("putPagination",this.paginationConfig)}}}),r=a,c=(e("5f6c"),e("2877")),s=Object(c["a"])(r,n,i,!1,null,null,null);o["a"]=s.exports},"5f6c":function(t,o,e){"use strict";e("ed77")},"61ae":function(t,o,e){t.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},"7e2d":function(t,o,e){"use strict";var n=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",[e("transition",{attrs:{name:"marsk-fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.toastConfig.isShow,expression:"toastConfig.isShow"}],staticClass:"marsk"})]),t._v(" "),e("transition",{attrs:{name:"slide-fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.toastConfig.isShow,expression:"toastConfig.isShow"}],class:["action-toast",t.toastConfig.center?"center":""]},[e("p",[t._v(t._s(t.toastConfig.message))]),t._v(" "),e("div",{staticClass:"button-group"},[e("el-button",{attrs:{type:"danger",size:"mini",round:""},nativeOn:{click:function(o){return o.preventDefault(),t.sure(o)}}},[t._v("确定")]),t._v(" "),t.toastConfig.showCancel?e("el-button",{attrs:{type:"info",size:"mini",round:""},nativeOn:{click:function(o){return o.preventDefault(),t.cancel(o)}}},[t._v("取消")]):t._e()],1)])])],1)},i=[],a={name:"Toast",props:{toastConfig:{isShow:{type:Boolean,default:function(){return!1}},showCancel:{type:Boolean,default:function(){return!1}},center:{type:Boolean,default:function(){return!1}},message:{type:String,default:function(){return""}}}},methods:{sure:function(){this.$emit("putToast",!0)},cancel:function(){this.$emit("putToast",!1)}}},r=a,c=(e("1acf"),e("bbf7"),e("2877")),s=Object(c["a"])(r,n,i,!1,null,"6632f172",null);o["a"]=s.exports},"90a5":function(t,o,e){"use strict";e("61ae")},"934c":function(t,o,e){"use strict";e("a526")},"950e":function(t,o,e){t.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},a1cd:function(t,o,e){},a326:function(t,o,e){"use strict";e("a462")},a462:function(t,o,e){t.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},a526:function(t,o,e){},bbf7:function(t,o,e){"use strict";e("950e")},ed77:function(t,o,e){t.exports={color_0:"#000",color_1:"#111",color_2:"#222",color_3:"#333",color_4:"#444",color_5:"#555",color_6:"#666",color_7:"#777",color_8:"#888",color_9:"#999",color_a:"#aaa",color_b:"#bbb",color_c:"#ccc",color_d:"#ddd",color_e:"#eee",color_f2:"#f2f2f2",color_f5:"#f5f5f5",color_fa:"#fafafa",color_fc:"#fcfcfc",color_f:"#fff",color_on:"#F66420",pad:"20px"}},fc31:function(t,o,e){"use strict";e.r(o);var n=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"invoice"},[e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",attrs:{stripe:"",size:"small",height:"85%",data:t.listData,"element-loading-text":"拼命加载中","row-class-name":t.tableRowClassName},on:{"sort-change":t.sortChange}},t._l(t.headerData,(function(o,n){return e("el-table-column",{key:n,attrs:{align:"center",prop:o.prop,label:o.label,sortable:o.sortable,width:"index"==o.prop?60:""},scopedSlots:t._u([{key:"default",fn:function(n){return["operation"!=o.prop||"0"!=n.row["invoiceState"]&&n.row["invoiceState"]?"operation"==o.prop&&"1"==n.row["invoiceState"]?e("span",{attrs:{slot:"content"},slot:"content"},[t._v("--")]):"operation"==o.prop&&"2"==n.row["invoiceState"]?e("span",{staticClass:"operation",attrs:{slot:"content"},on:{click:function(o){return t.viewInvoice(n.row["pointId"],n.row["invoiceId"])}},slot:"content"},[t._v("查看发票")]):"createTime"==o.prop?e("span",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(t.formatTime(n.row[o.prop])))]):"invoiceState"==o.prop?e("span",{attrs:{slot:"content"},slot:"content"},[t._v(t._s("0"!=n.row[o.prop]&&n.row[o.prop]?"1"==n.row[o.prop]?"开票中":"已开票":"未开票"))]):e("span",{attrs:{slot:"content"},slot:"content"},[t._v(t._s(n.row[o.prop]))]):e("span",{attrs:{slot:"content"},slot:"content"},[e("el-checkbox",{on:{change:t.getChecked},model:{value:n.row[o.prop],callback:function(e){t.$set(n.row,o.prop,e)},expression:"scope.row[header.prop]"}})],1)]}}],null,!0)})})),1),t._v(" "),e("div",{staticClass:"pagination"},[e("Pagination",{attrs:{"pagination-config":t.paginationConfig},on:{putPagination:t.getPagination}}),t._v(" "),e("el-button",{attrs:{type:"danger",size:"mini",plain:"",round:""},nativeOn:{click:function(o){return o.preventDefault(),t.getInvoice(o)}}},[t._v(t._s(t.checkedList.length>1?"当前选中"+t.checkedList.length+"项,合并开票":"开票"))])],1),t._v(" "),e("Toast",{attrs:{"toast-config":t.toastConfig},on:{putToast:t.getToast}}),t._v(" "),e("ViewInvoice",{attrs:{"view-config":t.viewConfig},on:{putView:t.getView}})],1)},i=[],a=(e("6b54"),e("c5f6"),e("333d")),r=e("7e2d"),c=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",[e("transition",{attrs:{name:"marsk-fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.viewConfig.isShow,expression:"viewConfig.isShow"}],staticClass:"marsk"})]),t._v(" "),e("transition",{attrs:{name:"slide-fade"}},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.viewConfig.isShow,expression:"viewConfig.isShow"}],staticClass:"action-view"},[e("div",{staticClass:"header"},[e("div",{staticClass:"operation"},[e("i",{staticClass:"el-icon-circle-close",on:{click:t.close}})]),t._v(" "),e("p",[t._v("\n 共"+t._s(t.viewConfig.total)+"笔交易,合计金额¥"+t._s(t.viewConfig.amount)+"\n ")]),t._v(" "),e("el-button",{attrs:{size:"mini",round:"",plain:""},nativeOn:{click:function(o){return o.preventDefault(),t.sure(o)}}},[t._v("补寄发票")])],1),t._v(" "),e("div",{staticClass:"content"},t._l(t.viewConfig.dataList,(function(o,n){return e("div",{key:n,staticClass:"list"},[e("div",{staticClass:"desc"},[e("p",[t._v("\n "+t._s(o.desc)+"\n "),0==n&&t.viewConfig.total>1?e("span",{staticClass:"target"},[t._v("当前")]):t._e()]),t._v(" "),e("span",[t._v(t._s(t.formatTime(o.createTime)))])]),t._v(" "),e("span",{staticClass:"price"},[t._v(t._s(o.money))])])})),0)])])],1)},s=[],l=e("ed08"),f={name:"ViewInvoice",props:{viewConfig:{isShow:{type:Boolean,default:function(){return!1}},total:{type:Number,default:function(){return 0}},amount:{type:Number,default:function(){return 0}},dataList:{type:Array,default:function(){return[]}}}},methods:{sure:function(){this.$emit("putView",this.viewConfig.dataList[0].invoiceId)},close:function(){this.$emit("putView",!1)},formatTime:function(t){return Object(l["e"])(t)}}},u=f,p=(e("934c"),e("a326"),e("2877")),d=Object(p["a"])(u,c,s,!1,null,"4dc49b00",null),g=d.exports,h=e("b775"),_={name:"Invoice",components:{Pagination:a["a"],Toast:r["a"],ViewInvoice:g},data:function(){return{paginationConfig:{hideSinglePage:!1,page:1,size:15,sizeList:[10,15,30,50],layout:"total, sizes, prev, pager, next, jumper",total:0},toastConfig:{isShow:!1,showCancel:!1,center:!1,message:""},viewConfig:{isShow:!1,dataList:[],amount:0},loading:!1,headerData:[],listData:[],checkedList:[]}},computed:{},created:function(){this.addHeader(),this.getData()},methods:{addHeader:function(){var t=[];t.push({label:"序号",prop:"index"}),t.push({label:"描述",prop:"desc",sortable:"custom"}),t.push({label:"时间",prop:"createTime",sortable:"custom"}),t.push({label:"金额",prop:"money",sortable:"custom"}),t.push({label:"状态",prop:"invoiceState",sortable:"custom"}),t.push({label:"操作",prop:"operation"}),this.headerData=t},getData:function(){var t=this,o=this.$loading({lock:!0,text:"Loading",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});setTimeout((function(){var e={transCode:"C00011",type:"1",page:t.paginationConfig.page,count:t.paginationConfig.size};t.orderSortName&&(e.orderSortName=t.orderSortName),t.orderSortType&&(e.orderSortType=t.orderSortType),Object(h["e"])(e).then((function(e){t.listData=[],o.close(),t.listData=e.rows,t.paginationConfig.total=e.total,t.listData.map((function(o,e){o.index=(t.paginationConfig.page-1)*t.paginationConfig.size+e+1,o.money="¥"+Number(o.money).toFixed(2)}))})).catch((function(t){o.close()}))}),1500)},tableRowClassName:function(t,o){return 1==t.row.operation?"selected":""},viewInvoice:function(t,o){var e=this,n={transCode:"C00014",pointId:t,invoiceId:o};Object(h["e"])(n).then((function(t){var o=t.rows;o.map((function(t,o){t.money="¥"+Number(t.money).toFixed(2)})),e.viewConfig={isShow:!0,total:t.total,amount:Number(t.totalMoney).toFixed(2),dataList:o}})).catch((function(t){}))},getChecked:function(){var t=this;this.checkedList=[],this.listData.map((function(o){!0===o.operation&&t.checkedList.push(o.pointId)}))},invoice:function(){var t=this,o={transCode:"C00013",pointId:this.checkedList.toString()};Object(h["e"])(o).then((function(o){t.toastConfig={isShow:!0,showCancel:!1,center:!0,message:"已申请发票,请耐心等待!"},t.checkedList=[],t.getData()})).catch((function(t){}))},getInvoice:function(){this.checkedList.length<=0?this.toastConfig={isShow:!0,showCancel:!1,center:!0,message:"请选择需要开票项!"}:1===this.checkedList.length?this.invoice():this.toastConfig={isShow:!0,showCancel:!0,center:!1,message:"同时勾选多项时将合并到一张发票上,您确定开发票吗?"}},getPagination:function(t){this.paginationConfig=t,this.getData()},getToast:function(t){this.toastConfig.isShow=!1,t&&"同时勾选多项时将合并到一张发票上,您确定开发票吗?"===this.toastConfig.message?this.invoice():t&&console.log("确定")},getView:function(t){var o=this;if(this.viewConfig.isShow=!1,t){var e={transCode:"C00015",id:t};Object(h["e"])(e).then((function(t){o.toastConfig={isShow:!0,showCancel:!1,center:!0,message:"已补寄发票,请查收邮箱。"}})).catch((function(t){}))}},formatTime:function(t){return Object(l["e"])(t)},sortChange:function(t,o,e){"desc"==t.prop?this.orderSortName="content":"createTime"==t.prop?this.orderSortName="create_time":"invoiceState"==t.prop?this.orderSortName="invoice_state":this.orderSortName=t.prop,this.orderSortType="descending"==t.order?"desc":"asc",this.getData()}}},v=_,m=(e("0129"),e("90a5"),Object(p["a"])(v,n,i,!1,null,"8b5ba4c6",null));o["default"]=m.exports}}]);
|