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
4.9 KiB
1 lines
4.9 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/refund/refund"],{"1bf1":function(t,e,s){"use strict";s.r(e);var i=s("42d9"),n=s("bf52");for(var o in n)"default"!==o&&function(t){s.d(e,t,(function(){return n[t]}))}(o);s("fa95");var l,r=s("f0c5"),u=Object(r["a"])(n["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],l);e["default"]=u.exports},2738:function(t,e,s){},"42d9":function(t,e,s){"use strict";var i;s.d(e,"b",(function(){return n})),s.d(e,"c",(function(){return o})),s.d(e,"a",(function(){return i}));var n=function(){var t=this,e=t.$createElement,s=(t._self._c,t.__map(t.buylist,(function(e,s){var i=t.__get_orig(e),n=t._f("toFixeds")(e.dj*e.dinghl);return{$orig:i,f0:n}}))),i=t._f("toFixeds")(t.goodsPrice);t.$mp.data=Object.assign({},{$root:{l0:s,f1:i}})},o=[]},"4a30":function(t,e,s){"use strict";(function(t){s("8d0c");i(s("66fd"));var e=i(s("1bf1"));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=s,t(e.default)}).call(this,s("543d")["createPage"])},"55b6":function(t,e,s){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(s("a34a"));function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e,s,i,n,o,l){try{var r=t[o](l),u=r.value}catch(c){return void s(c)}r.done?e(u):Promise.resolve(u).then(i,n)}function l(t){return function(){var e=this,s=arguments;return new Promise((function(i,n){var l=t.apply(e,s);function r(t){o(l,i,n,r,u,"next",t)}function u(t){o(l,i,n,r,u,"throw",t)}r(void 0)}))}}var r={data:function(){return{buylist:[],goodsPrice:0,note:"",cpids:"",dhid:0,sqmoney:0,index:0,isAllselected:!1,selectedList:[],gids:"",tktype:0}},onLoad:function(t){this.dhid=parseInt(t.dhid),this.tktype=t.tktype,this.index=parseInt(t.index)},onShow:function(){this.orderdetail(this.dhid)},onHide:function(){},filters:{toFixeds:function(t){return parseFloat(t).toFixed(2)}},methods:{orderdetail:function(e){var s=this;return l(i.default.mark((function n(){var o,l,r,u;return i.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,s.$api.orderdetail({action:"orderdetail",dhid:e});case 2:if(o=i.sent,1==o.code){for(s.buylist=o.data,l=o.data.length,r=0,u=0;u<l;u++)s.buylist[u].selected=!1,r=Number(r)+Number(s.buylist[u].shisje);s.goodsPrice=r,console.log(s.buylist,"数据")}else t.showToast({title:"暂无数据",icon:"none"});case 4:case"end":return i.stop()}}),n)})))()},sqtuik:function(e){var s=this;return l(i.default.mark((function n(){var o;return i.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,s.$api.sqtuik({action:"sqtuik",dhid:e,bz:s.note,sqmoney:s.sqmoney,gids:s.gids,isAllselected:s.isAllselected,tktype:s.tktype});case 2:o=i.sent,1==o.code?(t.showToast({title:o.msg,icon:"none"}),t.redirectTo({url:"/pages/orderlist/orderlist?state="+s.index})):t.showToast({title:o.msg,icon:"none"}),t.hideLoading();case 5:case"end":return i.stop()}}),n)})))()},tosq:function(){var e=this;return console.log(Number((parseFloat(100*this.sqmoney)/100).toFixed(2))+"---"+Number((parseFloat(100*this.goodsPrice)/100).toFixed(2))),Number((parseFloat(100*this.sqmoney)/100).toFixed(2))>Number((parseFloat(100*this.goodsPrice)/100).toFixed(2))?(t.showToast({title:"申请金额:"+Number((parseFloat(100*this.sqmoney)/100).toFixed(2))+",最多申请"+Number((parseFloat(100*this.goodsPrice)/100).toFixed(2))+"元",icon:"none"}),!1):this.sqmoney<=0?(t.showToast({title:"请填申请金额",icon:"none"}),!1):""==this.gids?(t.showToast({title:"请选择商品",icon:"none"}),!1):void t.showModal({title:"温馨提示",content:"是否申请退款"+e.sqmoney+"元?",success:function(s){s.confirm?(t.showLoading({title:"正在申请..."}),e.sqtuik(e.dhid)):s.cancel&&console.log(e.gids,"用户点击取消")}})},selected:function(t){this.buylist[t].selected=!this.buylist[t].selected;var e=this.selectedList.indexOf(this.buylist[t].cpid);console.log(e,"i是"),e>-1?this.selectedList.splice(e,1):this.selectedList.push(this.buylist[t].cpid),this.isAllselected=this.selectedList.length==this.buylist.length,this.sum(),console.log(this.selectedList,"selectedList数组")},allSelect:function(){for(var t=this.buylist.length,e=[],s=0;s<t;s++)this.buylist[s].selected=!this.isAllselected,e.push(this.buylist[s].cpid);console.log(e,"选择"),this.selectedList=this.isAllselected?[]:e,this.isAllselected=!this.isAllselected&&0!=this.buylist.length,this.sum()},sum:function(){this.sqmoney=0;for(var t=this.buylist.length,e="",s=0;s<t;s++)this.buylist[s].selected&&(this.sqmoney=parseFloat(100*this.sqmoney)/100+parseFloat(100*this.buylist[s].shisje)/100,e+=","+this.buylist[s].cpid);this.sqmoney=parseFloat(this.sqmoney).toFixed(2),e=e.substr(1),this.gids=e}}};e.default=r}).call(this,s("543d")["default"])},bf52:function(t,e,s){"use strict";s.r(e);var i=s("55b6"),n=s.n(i);for(var o in i)"default"!==o&&function(t){s.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},fa95:function(t,e,s){"use strict";var i=s("2738"),n=s.n(i);n.a}},[["4a30","common/runtime","common/vendor"]]]);
|