Files
Smart-Farm/front/land/pages/order/list.js
2025-12-22 17:13:05 +08:00

1 line
5.3 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["land/pages/order/list"],{1807:function(t,e,a){"use strict";a.r(e);var n=a("46ae"),i=a("1870");for(var r in i)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(r);var o=a("f0c5"),u=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=u.exports},1870:function(t,e,a){"use strict";a.r(e);var n=a("9569"),i=a.n(n);for(var r in n)["default"].indexOf(r)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(r);e["default"]=i.a},"46ae":function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,a=(t._self._c,t.tabList.length),n=t.loading?t.list.current_page>=t.list.last_page&&t.list.data.length>0:null,i=!t.loading&&t.list.data.length<=0&&1==t.list.current_page;t.$mp.data=Object.assign({},{$root:{g0:a,g1:n,g2:i}})},i=[]},9569:function(t,e,a){"use strict";(function(t){var n=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(a("2eee")),r=n(a("c973")),o=a("26cb"),u={components:{},data:function(){return{options:{},activeIndex:0,tabList:[{id:0,title:"全部"},{id:2,title:"租赁中",number:0},{id:7,title:"已完成"}],statusType:{"-1":"已取消",1:"待支付",2:"租赁中",7:"已完成"},param:{page:1},list:{data:[]},loading:!0,popupInfo:{},lockTap:!1}},computed:(0,o.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},subColor:function(t){return t.config.configInfo.subColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo}}),onLoad:function(t){this.$util.showLoading(),this.options=t;var e=t.tab,a=void 0===e?0:e;this.activeIndex=a,this.initIndex()},onPullDownRefresh:function(){t.showNavigationBarLoading(),this.initRefresh(),t.stopPullDownRefresh()},onReachBottom:function(){this.list.current_page>=this.list.last_page||this.loading||(this.param.page=this.param.page+1,this.loading=!0,this.getList())},methods:{initIndex:function(){this.getList()},initRefresh:function(){this.param.page=1,this.initIndex()},handerTabChange:function(t){this.activeIndex=t,this.$util.showLoading(),this.param.page=1,this.list.data=[],this.getList()},getList:function(){var t=this;return(0,r.default)(i.default.mark((function e(){var a,n,r,o,u,c;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.list,n=t.param,r=t.tabList,o=t.activeIndex,n.pay_type=r[o].id,e.next=4,t.$api.land.orderList(n);case 4:u=e.sent,1==t.param.page||(u.data=a.data.concat(u.data)),t.list=u,t.loading=!1,c=u.count.rent_count,t.tabList[1].number=c,t.$util.hideAll();case 10:case"end":return e.stop()}}),e)})))()},toChangeOrder:function(t,e){var a=this;return(0,r.default)(i.default.mark((function n(){var r,o,u,c;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:r=a.list.data[t],o=r.id,u=r.order_code,c=r.goods_cover,a.popupInfo={id:o,name:"订单编号:".concat(u),image:c,index:t},a.$refs[e].open();case 3:case"end":return n.stop()}}),n)})))()},confirmCancel:function(){var t=this;return(0,r.default)(i.default.mark((function e(){var a,n,r;return i.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a=t.popupInfo,n=a.id,r=a.index,!t.lockTap){e.next=3;break}return e.abrupt("return");case 3:return t.lockTap=!0,t.$util.showLoading(),e.prev=5,e.next=8,t.$api.land.cancelOrder({id:n});case 8:t.$util.hideAll(),0==t.activeIndex?t.list.data[r].pay_type=-1:t.list.data.splice(r,1),t.$util.showToast({title:"取消成功"}),t.lockTap=!1,t.$refs.cancel_item.close(),e.next=18;break;case 15:e.prev=15,e.t0=e["catch"](5),setTimeout((function(){t.lockTap=!1,t.$util.hideAll()}),2e3);case 18:case"end":return e.stop()}}),e,null,[[5,15]])})))()},toPay:function(t){var e=this;return(0,r.default)(i.default.mark((function a(){var n,r,o,u,c,l;return i.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(!e.lockTap){a.next=2;break}return a.abrupt("return");case 2:return e.lockTap=!0,e.$util.showLoading(),n=e.list.data[t],r=n.id,o=n.pay_model,a.prev=5,a.next=8,e.$api.land.landRePayOrder({id:r});case 8:if(u=a.sent,c=u.pay_list,e.$util.hideAll(),!c){a.next=26;break}return 3==o&&(c={orderInfo:c,provider:"alipay"}),a.prev=13,a.next=16,e.$util.pay(c);case 16:e.lockTap=!1,0==e.activeIndex?e.list.data[t].pay_type=2:e.list.data.splice(t,1),l=e.tabList[1].number,e.tabList[1].number=l+1,a.next=26;break;case 22:return a.prev=22,a.t0=a["catch"](13),e.lockTap=!1,a.abrupt("return");case 26:a.next=31;break;case 28:a.prev=28,a.t1=a["catch"](5),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 31:case"end":return a.stop()}}),a,null,[[5,28],[13,22]])})))()},toEvaluate:function(t){var e=this.list.data[t].id,a="/mine/pages/evaluate/edit?id=".concat(e,"&type=land");this.$util.goUrl({url:a})},goDetail:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=this.list.data[t].id,n="/land/pages/order/detail?id=".concat(a,"&tab=").concat(e);this.$util.goUrl({url:n})}}};e.default=u}).call(this,a("543d")["default"])},"9c22":function(t,e,a){"use strict";(function(t,e){var n=a("4ea4");a("b03e");n(a("66fd"));var i=n(a("1807"));t.__webpack_require_UNI_MP_PLUGIN__=a,e(i.default)}).call(this,a("bc2e")["default"],a("543d")["createPage"])}},[["9c22","common/runtime","common/vendor"]]]);