| 12 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/page/refundAdmin"],{308:function(e,n,t){"use strict";(function(e){var n=t(3);t(25);n(t(24));var o=n(t(309));wx.__webpack_require_UNI_MP_PLUGIN__=t,e(o.default)}).call(this,t(1)["createPage"])},309:function(e,n,t){"use strict";t.r(n);var o=t(310),r=t(312);for(var i in r)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(i);t(314);var a,d=t(39),c=Object(d["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,"dbb51246",null,!1,o["components"],a);c.options.__file="user/page/refundAdmin.vue",n["default"]=c.exports},310:function(e,n,t){"use strict";t.r(n);var o=t(311);t.d(n,"render",(function(){return o["render"]})),t.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(n,"components",(function(){return o["components"]}))},311:function(e,n,t){"use strict";var o;t.r(n),t.d(n,"render",(function(){return r})),t.d(n,"staticRenderFns",(function(){return a})),t.d(n,"recyclableRender",(function(){return i})),t.d(n,"components",(function(){return o}));try{o={uniLoadMore:function(){return t.e("components/uni-load-more/uni-load-more").then(t.bind(null,322))},uniPopup:function(){return t.e("components/uni-popup/uni-popup").then(t.bind(null,241))}}}catch(d){if(-1===d.message.indexOf("Cannot find module")||-1===d.message.indexOf(".vue"))throw d;console.error(d.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var e=this,n=e.$createElement,t=(e._self._c,e.__map(e.navList,(function(n,t){var o=e.__get_orig(n),r=e.__map(n.orderList,(function(n,t){var o=e.__get_orig(n),r=e.__map(n._info,(function(n,t){var o=e.__get_orig(n),r=e._f("moneyNum")(n.cart_info.productInfo.price);return{$orig:o,f0:r}})),i=0==e.tabCurrentIndex?e.moneyNum(n.pay_price):null;return{$orig:o,l0:r,m0:i}}));return{$orig:o,l1:r}})));e.$mp.data=Object.assign({},{$root:{l2:t}})},i=!1,a=[];r._withStripped=!0},312:function(e,n,t){"use strict";t.r(n);var o=t(313),r=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=r.a},313:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=t(51),r=function(){t.e("components/uni-load-more/uni-load-more").then(function(){return resolve(t(322))}.bind(null,t)).catch(t.oe)},i=function(){t.e("components/empty").then(function(){return resolve(t(631))}.bind(null,t)).catch(t.oe)},a=function(){t.e("components/uni-popup/uni-popup").then(function(){return resolve(t(241))}.bind(null,t)).catch(t.oe)},d={components:{uniLoadMore:r,empty:i,uniPopup:a},onReady:function(){var n=this;e.getSystemInfo({success:function(t){var o=e.createSelectorQuery();o.select(".swiper-box").boundingClientRect(),o.exec((function(e){console.log(e,"ddddddddddddd"),n.height=t.windowHeight-e[0].top+"px",console.log("打印页面的剩余高度",n.height)}))},fail:function(e){}})},data:function(){return{agreeItem:{},height:0,currentIndex:0,refList:[],navList:[{state:-1,text:"待退款",loadingType:"more",orderList:[],page:1,limit:10},{state:-2,text:"已退款",loadingType:"more",orderList:[],page:1,limit:10}],tabCurrentIndex:0,orderId:"",backMaxNum:0,backNum:"",backIndex:"",userphone:"",keyword:""}},filters:{moneyNum:function(e){return+e}},onLoad:function(e){console.log(e),this.isUser=e.isUser,console.log(this.isUser),this.tabCurrentIndex=+e.state,0==e.state&&this.loadData()},methods:{moneyNum:function(e){return+e},orderTake:function(n,t){var r=this;e.showModal({title:"是否确认收货?",success:function(){(0,o.orderTake)({uni:n.order_id}).then((function(n){r.navList[r.tabCurrentIndex].orderList.splice(t,1),e.showToast({title:"收货成功"})})).catch((function(e){console.log(e)}))}})},goToOrderDetail:function(n){console.log("dddd"),e.navigateTo({url:"/user/page/orderDetail?id="+n.order_id})},orderRefund:function(n){e.navigateTo({url:"/pages/order/orderRefund?id="+n.order_id})},orderPay:function(n){e.navigateTo({url:"/pages/money/pay?type=1&ordid="+n.order_id+"&money="+n.pay_price})},loadData:function(n){var t=this,r=this,i=this.tabCurrentIndex,a=this.navList[i],d=a.state;"tabChange"===n&&!0===a.loaded||"loading"!==a.loadingType&&"noMore"!==a.loadingType&&(a.loadingType="loading",console.log("jiazai+++++++++++++++"),(0,o.GetAdminOrderList)({status:d,page:a.page,limit:a.limit,user_phone:r.keyword}).then((function(n){var o=n.data;console.log(o,"data+++++++++++++++++++++++++++");var r=o.map((function(e){return e}));console.log(o),a.orderList=a.orderList.concat(r),console.log(o.length,"ddddddddddddddddddd"),a.page++,a.limit!=o.length?(a.loadingType="noMore",console.log(a.loadingType),e.hideLoading(),t.$set(a,"loaded",!0)):a.loadingType="more"})).catch((function(e){console.log(e)})))},changeTab:function(e){this.tabCurrentIndex=e.target.current,this.loadData("tabChange")},tabClick:function(e){this.tabCurrentIndex=e},deleteOrder:function(n){var t=this;e.showLoading({title:"请稍后"}),setTimeout((function(){t.navList[t.tabCurrentIndex].orderList.splice(n,1),e.hideLoading()}),600)},cancelOrder:function(n){var t=this;e.showModal({title:"订单取消",content:"是否取消订单?",success:function(r){if(r.confirm){e.showLoading({title:"请稍后"}),(0,o.orderCancel)({id:n.order_id}).then((function(n){e.showToast({title:"取消成功",duration:2e3,position:"top"})})).catch((function(e){console.log(e)}));var i=t.navList[t.tabCurrentIndex].orderList,a=i.findIndex((function(e){return e.id===n.id}));-1!==a&&i.splice(a,1),e.hideLoading()}}})},orderStateExp:function(e){var n="",t="#fa436a";switch(+e){case 0:n="待付款";break;case 1:n="待发货";break;case 2:n="待收货";break;case 3:n="待评价";break;case 4:n="已完成",t="#901b21";break;case 9:n="订单已关闭",t="#909399";break}return{stateTip:n,stateTipColor:t}},agreeRefund:function(e){this.agreeItem=e,console.log("同意"),this.$refs.popupagree.open()},search:function(){var e=this;if(""==e.userphone)e.keyword="";else{var n=/^(\+?0?86-?)?1[\d]\d{9}$/;if(!n.test(e.userphone))return void e.$api.msg("请填写正确的手机号码")}e.keyword=e.userphone,e.navList[e.tabCurrentIndex].orderList=[],e.navList[e.tabCurrentIndex].loadingType="more",e.navList[e.tabCurrentIndex].page=1,e.loadData()},cansel:function(){this.$refs.popupagree.close()},agree:function(){var e=this;(0,o.aOrderRefund)({order_id:this.agreeItem.order_id,price:1*this.agreeItem.pay_price,type:1}).then((function(n){console.log(n),e.$api.msg("退款成功");var t=e.navList[e.tabCurrentIndex].orderList.indexOf(e.agreeItem);e.navList[e.tabCurrentIndex].orderList.splice(t,1)})).catch((function(e){console.log(e)})),this.$refs.popupagree.close()},backdeposit:function(e){var n=this;n.orderId=e.order_id,n.backMaxNum=1*e.deposit-1*e.deposit_back,this.$refs.popupadmin.open(),n.backIndex=n.navList[n.tabCurrentIndex].orderList.indexOf(e),console.log(e,"ddddddddddddddddddddd",n.backIndex)},backClose:function(){var e=this;e.$refs.popupadmin.close(),e.orderId="",e.backMaxNum="",e.backNum=""},qrbackDeposit:function(){var n=this;""!=n.backNum?1*n.backNum>1*n.backMaxNum?n.$api.msg("退还金额大于押金"):""!=n.orderId?(0,o.backDeposit)({order_id:n.orderId,refund_price:n.backNum}).then((function(t){e.showToast({title:"退还成功",duration:2e3}),console.log(t),n.navList[n.tabCurrentIndex].orderList[n.backIndex].deposit_back=1*n.backNum+1*n.navList[n.tabCurrentIndex].orderList[n.backIndex].deposit_back,n.$refs.popupadmin.close(),n.orderId="",n.backMaxNum="",n.backNum=""})):n.$api.msg("请选择订单"):n.$api.msg("请输入退还押金")}}};n.default=d}).call(this,t(1)["default"])},314:function(e,n,t){"use strict";t.r(n);var o=t(315),r=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=r.a},315:function(e,n,t){}},[[308,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../../.sourcemap/mp-weixin/user/page/refundAdmin.js.map
|