1 line
5.0 KiB
JavaScript
1 line
5.0 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[56,16],{492:function(t,e,n){var content=n(494);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(18).default)("1e01d57a",content,!0,{sourceMap:!1})},493:function(t,e,n){"use strict";n(492)},494:function(t,e,n){var r=n(17)((function(i){return i[1]}));r.push([t.i,".null-data[data-v-93598fb0]{padding:100px}.null-data .img-null[data-v-93598fb0]{height:150px;width:150px}",""]),r.locals={},t.exports=r},495:function(t,e,n){"use strict";n.r(e);var r={components:{},props:{img:{type:String},text:{type:String,default:"暂无数据"},imgStyle:{type:String,default:""}},methods:{}},o=(n(493),n(9)),component=Object(o.a)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"bg-white flex-col col-center null-data"},[e("img",{staticClass:"img-null",style:t.imgStyle,attrs:{src:t.img,alt:""}}),t._v(" "),e("div",{staticClass:"muted mt8"},[t._v(t._s(t.text))])])}),[],!1,null,"93598fb0",null);e.default=component.exports},517:function(t,e,n){"use strict";var r=n(2),o=n(110).find,c=n(194),l="find",d=!0;l in[]&&Array(1)[l]((function(){d=!1})),r({target:"Array",proto:!0,forced:d},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),c(l)},554:function(t,e,n){t.exports=n.p+"img/order_null.df79063.png"},594:function(t,e,n){var content=n(679);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(18).default)("5ff78ac0",content,!0,{sourceMap:!1})},678:function(t,e,n){"use strict";n(594)},679:function(t,e,n){var r=n(17)((function(i){return i[1]}));r.push([t.i,".user-order{padding:20px 0;position:relative}.download-box{position:absolute;right:16px;top:22px;z-index:999}",""]),r.locals={},t.exports=r},732:function(t,e,n){"use strict";n.r(e);n(30);var r=n(8),o=(n(517),n(12),n(56),n(104)),c={head:function(){return{title:this.$store.getters.headTitle,link:[{rel:"icon",type:"image/x-icon",href:this.$store.getters.favicon}]}},layout:"user",asyncData:function(t){var e=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,c,l,d,f,m,v,h,code;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=t.query,c=t.$get,l=t.$post,e,d={},n.next=5,c("order/lists",{params:{page_size:10}});case 5:return f=n.sent,m=f.data,v=m.list,h=m.count,code=f.code,n.next=12,l("order/contractDownload",{}).then((function(t){var code=t.code,data=t.data;t.msg;1==code&&(d=data)}));case 12:if(1==r.is_frontend&&o.Message.success("订单前置成功"),1!=code){n.next=15;break}return n.abrupt("return",{orderList:{list:v,count:h},download_contract:d});case 15:case"end":return n.stop()}}),n)})))()},components:{},data:function(){return{activeName:"all",order:[{type:"all",list:[],name:"全部",count:0,page:1},{type:"pay",list:[],name:"待付款",count:0,page:1},{type:"delivery",list:[],name:"待收货",count:0,page:1},{type:"finish",list:[],name:"已完成",count:0,page:1},{type:"close",list:[],name:"已关闭",count:0,page:1}],download_contract:{}}},methods:{handleClick:function(){this.getOrderList()},getOrderList:function(){var t=this;return Object(r.a)(regeneratorRuntime.mark((function e(){var n,r,o,c,l,d,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.activeName,r=t.order,o=r.find((function(t){return t.type==n})),e.next=4,t.$get("order/lists",{params:{page_size:10,page_no:o.page,type:n}});case 4:c=e.sent,l=c.data,d=l.list,f=l.count,1==c.code&&(t.orderList={list:d,count:f});case 10:case"end":return e.stop()}}),e)})))()},changePage:function(t){var e=this;this.order.some((function(n){n.type==e.activeName&&(n.page=t)})),this.getOrderList()}},watch:{orderList:{immediate:!0,handler:function(t){var e=this;this.order.some((function(n){if(n.type==e.activeName)return Object.assign(n,t),console.log(n),!0}))}}}},l=c,d=(n(678),n(9)),component=Object(d.a)(l,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-order"},[e("div",{staticClass:"download-box"},[e("a",{attrs:{target:"_blank",href:t.download_contract.domain+"/"+t.download_contract.path}},[e("el-button",{attrs:{type:"success",icon:"el-icon-download",size:"medium"}},[t._v("下载合同")])],1)]),t._v(" "),e("el-tabs",{on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},t._l(t.order,(function(r,o){return e("el-tab-pane",{key:o,attrs:{label:r.name,name:r.type}},[r.list.length?[e("order-list",{attrs:{list:r.list},on:{refresh:t.getOrderList}}),t._v(" "),r.count?e("div",{staticClass:"pagination flex row-center"},[e("el-pagination",{attrs:{"hide-on-single-page":"",background:"",layout:"prev, pager, next",total:r.count,"prev-text":"上一页","next-text":"下一页","page-size":10},on:{"current-change":t.changePage}})],1):t._e()]:e("null-data",{attrs:{img:n(554),text:"暂无订单~"}})],2)})),1)],1)}),[],!1,null,null,null);e.default=component.exports;installComponents(component,{OrderList:n(704).default,NullData:n(495).default})}}]); |