(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/adminOrder"],{"0887":function(t,e,n){"use strict";n.r(e);var o=n("358b"),r=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=r.a},"358b":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n("307c"),r=function(){n.e("components/uni-load-more/uni-load-more").then(function(){return resolve(n("20fd"))}.bind(null,n)).catch(n.oe)},i=function(){n.e("components/empty").then(function(){return resolve(n("de8d"))}.bind(null,n)).catch(n.oe)},a={components:{uniLoadMore:r,empty:i},filters:{moneyNum:function(t){return+t}},data:function(){return{tabCurrentIndex:0,navList:[{state:0,text:"未支付",loadingType:"more",orderList:[],page:1,limit:10},{state:1,text:"待接单",loadingType:"more",orderList:[],page:1,limit:10},{state:2,text:"进行中",loadingType:"more",orderList:[],page:1,limit:10},{state:4,text:"已完成",loadingType:"more",orderList:[],page:1,limit:10}],isUser:!0}},onLoad:function(t){console.log(t),this.isUser=t.isUser,console.log(this.isUser),this.tabCurrentIndex=+t.state,0==t.state&&this.loadData()},methods:{moneyNum:function(t){return+t},orderTake:function(e,n){var r=this;t.showModal({title:"是否确认收货？",success:function(i){i.confirm?(0,o.orderTake)({uni:e.order_id}).then((function(e){r.navList[r.tabCurrentIndex].orderList.splice(n,1),t.showToast({title:"收货成功"})})).catch((function(t){console.log(t)})):i.cancel&&console.log("取消")}})},goToOrderDetail:function(t){},orderRefund:function(e){t.navigateTo({url:"/pages/order/orderRefund?id="+e.order_id})},orderPay:function(e){t.navigateTo({url:"/pages/money/pay?type=1&ordid="+e.order_id+"&money="+e.pay_price})},loadData:function(e){var n=this,r=this.tabCurrentIndex,i=this.navList[r],a=i.state;"tabChange"===e&&!0===i.loaded||"loading"!==i.loadingType&&"noMore"!==i.loadingType&&(i.loadingType="loading",(0,o.GetAdminOrderList)({status:a,page:i.page,limit:i.limit}).then((function(e){var o=e.data;console.log(o,"ddddddddddd");var r=o.map((function(t){var e=n.orderStateExp(t.status);return t.stateTip=e.stateTip,t.stateTipColor=e.stateTipColor,t}));i.orderList=i.orderList.concat(r),console.log(i.orderList),i.page++,i.limit!=o.length?(i.loadingType="noMore",t.hideLoading(),n.$set(i,"loaded",!0)):i.loadingType="more"})).catch((function(t){console.log(t)})))},changeTab:function(t){this.tabCurrentIndex=t.target.current,this.loadData("tabChange")},tabClick:function(t){console.log(t),this.tabCurrentIndex=t},deleteOrder:function(e){var n=this;t.showLoading({title:"请稍后"}),setTimeout((function(){n.navList[n.tabCurrentIndex].orderList.splice(e,1),t.hideLoading()}),600)},cancelOrder:function(e){var n=this;t.showModal({title:"订单取消",content:"是否取消订单？",success:function(r){if(r.confirm){t.showLoading({title:"请稍后"}),(0,o.orderCancel)({id:e.order_id}).then((function(e){t.showToast({title:"取消成功",duration:2e3,position:"top"})})).catch((function(t){console.log(t)}));var i=n.navList[n.tabCurrentIndex].orderList,a=i.findIndex((function(t){return t.id===e.id}));-1!==a&&i.splice(a,1),t.hideLoading()}}})},orderStateExp:function(t){var e="",n="#fa436a";switch(+t){case 0:e="待付款";break;case 1:e="待发货";break;case 2:e="待收货";break;case 3:e="待评价";break;case 4:e="已完成",n="#901b21";break;case 9:e="订单已关闭",n="#909399";break}return{stateTip:e,stateTipColor:n}}}};e.default=a}).call(this,n("543d")["default"])},"7f3c":function(t,e,n){"use strict";var o=n("9058"),r=n.n(o);r.a},9058:function(t,e,n){},a961:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var o={uniLoadMore:function(){return n.e("components/uni-load-more/uni-load-more").then(n.bind(null,"20fd"))}},r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.navList,(function(e,n){var o=t.__get_orig(e),r=t.__map(e.orderList,(function(e,n){var o=t.__get_orig(e),r=t.__map(e._info,(function(e,n){var o=t.__get_orig(e),r=t._f("moneyNum")(e.cart_info.productInfo.price);return{$orig:o,f0:r}})),i=t.moneyNum(e.pay_price),a=t.moneyNum(e.pay_postage);return{$orig:o,l0:r,m0:i,m1:a}}));return{$orig:o,l1:r}})));t.$mp.data=Object.assign({},{$root:{l2:n}})},i=[]},c8cb:function(t,e,n){"use strict";(function(t){n("5935");o(n("66fd"));var e=o(n("e665"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},e665:function(t,e,n){"use strict";n.r(e);var o=n("a961"),r=n("0887");for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("7f3c");var a,d=n("f0c5"),c=Object(d["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);e["default"]=c.exports}},[["c8cb","common/runtime","common/vendor"]]]);