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

1 line
4.5 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["farmer/pages/order/distribution/list"],{"86b4":function(t,e,n){"use strict";n.r(e);var i=n("f734"),a=n("ea19");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);var o=n("f0c5"),s=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=s.exports},"88ae":function(t,e,n){"use strict";(function(t){var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("2eee")),r=i(n("c973")),o=n("26cb"),s={components:{},data:function(){return{options:{},activeIndex:0,tabList:[{id:0,title:"全部"},{id:2,title:"待配送",number:0},{id:3,title:"配送中",number:0},{id:7,title:"已完成"},{id:-1,title:"已取消"}],statusType:{"-1":"已取消",2:"待配送",3:"配送中",7:"已完成"},orderType:{1:"认养订单",2:"土地订单"},sendType:{1:"自提",2:"快递"},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,n=void 0===e?0:e;this.activeIndex=n,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()},getList:function(){var t=this;return(0,r.default)(a.default.mark((function e(){var n,i,r,o,s;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return n=t.list,i=t.param,r=t.tabList,o=t.activeIndex,i.pay_type=r[o].id,e.next=4,t.$api.farmer.farmerSendOrderList(i);case 4:s=e.sent,1==t.param.page||(s.data=n.data.concat(s.data)),t.list=s,t.loading=!1,t.tabList[1].number=s.no_send,t.tabList[2].number=s.send_ing,t.$util.hideAll();case 10:case"end":return e.stop()}}),e)})))()},handerTabChange:function(t){this.activeIndex=t,this.$util.showLoading(),this.param.page=1,this.list.data=[],this.getList()},toChangeOrder:function(t,e){var n=this;return(0,r.default)(a.default.mark((function i(){var r,o,s;return a.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:r=n.list.data[t],o=r.id,s=r.order_code,n.popupInfo={id:o,name:"订单编号:".concat(s),image:"",index:t,refs_key:e},n.$refs[e].open();case 3:case"end":return i.stop()}}),i)})))()},confirmChangeOrder:function(){var t=this;return(0,r.default)(a.default.mark((function e(){var n,i,r,o,s,u,c;return a.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(n=t.popupInfo,i=n.id,n.index,r=n.refs_key,!t.lockTap){e.next=3;break}return e.abrupt("return");case 3:return t.lockTap=!0,t.$util.showLoading(),o={confirm_get_item:{method:"sendOrderPickup",msg:"取货成功"},confirm_send_item:{method:"sendOrderSend",msg:"发货成功"}},s=o[r],u=s.method,c=s.msg,e.prev=7,e.next=10,t.$api.farmer[u]({id:i});case 10:t.$util.hideAll(),t.$util.showToast({title:c}),t.lockTap=!1,t.$refs[r].close(),t.initRefresh(),e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](7),setTimeout((function(){t.lockTap=!1,t.$util.hideAll()}),2e3);case 20:case"end":return e.stop()}}),e,null,[[7,17]])})))()},goDetail:function(t){var e=this.list.data[t],n=e.id,i=e.type,a="/farmer/pages/order/distribution/detail?id=".concat(n,"&type=").concat(i);this.$util.goUrl({url:a})}}};e.default=s}).call(this,n("543d")["default"])},c97a:function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("b03e");i(n("66fd"));var a=i(n("86b4"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},ea19:function(t,e,n){"use strict";n.r(e);var i=n("88ae"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},f734:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.tabList.length),i=t.loading?t.list.current_page>=t.list.last_page&&t.list.data.length>0:null,a=!t.loading&&t.list.data.length<=0&&1==t.list.current_page;t.$mp.data=Object.assign({},{$root:{g0:n,g1:i,g2:a}})},a=[]}},[["c97a","common/runtime","common/vendor"]]]);