徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
3.5 KiB

require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/admin/refund/index"],{"0b39":function(t,i,n){},31070:function(t,i,n){"use strict";n.r(i);var e=n("6173"),s=n("c6f6");for(var u in s)["default"].indexOf(u)<0&&function(t){n.d(i,t,(function(){return s[t]}))}(u);n("d082");var o=n("828b"),r=Object(o["a"])(s["default"],e["b"],e["c"],!1,null,"6e0a3a12",null,!1,e["a"],void 0);i["default"]=r.exports},4343:function(t,i,n){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var e=n("e727"),s={components:{splitOrder:function(){n.e("components/splitOrder/index").then(function(){return resolve(n("b530"))}.bind(null,n)).catch(n.oe)}},data:function(){return{refundMoney:0,isSplit:0,isAll:!1,splitGoods:[],goodsChecked:[],cart_ids:[]}},computed:{total:function(){var t=this;return this.goodsChecked.reduce((function(i,n){return t.$util.$h.Add(i,t.$util.$h.Mul(n.refundPrice,n.surplus_num))}),0)},numTotal:function(){var t=this;return this.goodsChecked.reduce((function(i,n){var e=n.surplus_num;return t.$util.$h.Add(i,e)}),0)}},watch:{total:function(t,i){this.refundMoney=t}},onLoad:function(t){this.order_id=t.id,this.listId=t.listId,this.getIndex()},methods:{allChange:function(){this.isAll=!this.isAll,this.cart_ids=[],this.goodsChecked=[];for(var t=0;t<this.splitGoods.length;t++)this.splitGoods[t].checked=this.isAll,this.splitGoods[t].checked&&(this.goodsChecked.push(this.splitGoods[t]),this.cart_ids.push(this.splitGoods[t].id))},refundTypeChange:function(t){this.isSplit=t,this.goodsChecked=t?[]:this.splitGoods},splitList:function(){var t=this;(0,e.orderSplitInfo)(this.listId).then((function(t){var i=t.data;i.forEach((function(t){t.checked=!1,t.numShow=t.surplus_num}))})).catch((function(i){return t.$util.Tips({title:i})}))},getIndex:function(){var t=this,i=this;(0,e.getAdminOrderDetail)(i.order_id).then((function(i){var n=i.data.cartInfo,e=n.map((function(i){return{id:i.id,checked:!1,numShow:i.cart_num-i.refund_num,surplus_num:i.cart_num-i.refund_num,cart_info:i,refundPrice:t.$util.$h.Div(i.refund_price,i.cart_num)}}));t.splitGoods=e,t.goodsChecked=e})).catch((function(t){i.$util.Tips({title:t.msg})}))},getList:function(t){for(var i=[],n=[],e=0;e<t.length;e++)t[e].checked&&(i.push(t[e]),n.push(t[e].id));this.goodsChecked=i,this.cart_ids=n,this.isAll=this.goodsChecked.length==this.splitGoods.length},openRefund:function(){var t,i=this,n={refund_price:this.refundMoney,type:1,is_split_order:this.isSplit};t=this.goodsChecked.map((function(t){var i=t.id,n=t.surplus_num;return{cart_id:i,cart_num:n}})),n.cart_ids=t,(0,e.openRefund)(this.listId,n).then((function(t){t.data.order_id?i.$util.Tips({title:t.msg},{tab:5,url:"/pages/admin/orderDetail/index?id="+t.data.order_id+"&types="}):i.$util.Tips({title:t.msg},{tab:3,url:1})})).catch((function(t){i.$util.Tips({title:t})}))}}};i.default=s},6173:function(t,i,n){"use strict";n.d(i,"b",(function(){return e})),n.d(i,"c",(function(){return s})),n.d(i,"a",(function(){}));var e=function(){var t=this.$createElement;this._self._c},s=[]},"979f":function(t,i,n){"use strict";(function(t,i){var e=n("47a9");n("7561");e(n("3240"));var s=e(n("31070"));t.__webpack_require_UNI_MP_PLUGIN__=n,i(s.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},c6f6:function(t,i,n){"use strict";n.r(i);var e=n("4343"),s=n.n(e);for(var u in e)["default"].indexOf(u)<0&&function(t){n.d(i,t,(function(){return e[t]}))}(u);i["default"]=s.a},d082:function(t,i,n){"use strict";var e=n("0b39"),s=n.n(e);s.a}},[["979f","common/runtime","common/vendor"]]]);