| 1 |
- require('common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesPurchase/gathering"],{"0e11":function(t,e,n){"use strict";var i=n("ce87"),r=n.n(i);r.a},"41fb":function(t,e,n){"use strict";n.r(e);var i=n("f625"),r=n("9c61");for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("0e11");var c,a=n("8261"),s=Object(a["a"])(r["default"],i["b"],i["c"],!1,null,"f12cd448",null,!1,i["a"],c);e["default"]=s.exports},"9c61":function(t,e,n){"use strict";n.r(e);var i=n("ed06"),r=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=r.a},a815:function(t,e,n){"use strict";(function(t){n("6cdc");i(n("b5e3"));var e=i(n("41fb"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("934e")["createPage"])},ce87:function(t,e,n){},ed06:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("a075");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return c=t.done,t},e:function(t){a=!0,o=t},f:function(){try{c||null==n.return||n.return()}finally{if(a)throw o}}}}function s(t,e){if(t){if("string"===typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var l=function(){n.e("pagesPurchase/components/gatheringList").then(function(){return resolve(n("324f"))}.bind(null,n)).catch(n.oe)},f=function(){n.e("components/app-wrapper-empty").then(function(){return resolve(n("c078"))}.bind(null,n)).catch(n.oe)},h={components:{gatheringList:l,AppWrapperEmpty:f},data:function(){return{checkShow:!0,detailsList:[],num:"",customInfo:{},totalAmount:"",isAllCheck:!1}},onPullDownRefresh:function(){this.initData().then((function(e){t.stopPullDownRefresh()})),this.getClient().then((function(e){t.stopPullDownRefresh()}))},computed:{selectList:function(){var t=[];if(this.detailsList){var e,n=a(this.detailsList);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.checked&&t.push(i)}}catch(r){n.e(r)}finally{n.f()}}return console.log(t),t},selectTotalAmount:function(){var t=0;if(this.detailsList){var e,n=a(this.detailsList);try{for(n.s();!(e=n.n()).done;){var i=e.value;i.checked&&(t+=Number(i.realPrice))}}catch(r){n.e(r)}finally{n.f()}}return t.toFixed(2)}},watch:{selectList:function(){this.selectList.length===this.detailsList.length?this.isAllCheck=!0:this.isAllCheck=!1}},methods:{allCheck:function(){this.isAllCheck=!this.isAllCheck,this.isAllCheck?this.detailsList.map((function(t){t.checked=!0})):this.detailsList.map((function(t){t.checked=!1}))},init:function(){this.initData(),this.getClient()},initData:function(){var t=this;return(0,i.purchaseDebtList)({id:this.option.id}).then((function(e){console.log(e),t.detailsList=e.data.list.map((function(t){return o(o({},t),{},{checked:!1})}))})).catch((function(t){console.log(t)}))},getClient:function(){var t=this;return(0,i.ghsDetail)({id:this.option.id}).then((function(e){console.log("res",e),t.customInfo=e.data})).catch((function(t){console.log("err",t)}))},checkItemEvent:function(t){for(var e=0;e<this.detailsList.length;e++){var n=this.detailsList[e].id;if(n==t.id){this.$set(this.detailsList,e,o(o({},this.detailsList[e]),{},{checked:!this.detailsList[e].checked}));break}}},batchConfirm:function(){var t=this,e=[];this.selectList.length>0&&(this.selectList.forEach((function(t){e.push(t.id)})),(0,i.purchaseClearCreateOrder)({purchaseIds:e.join(","),ghsId:this.option.id}).then((function(e){console.log("res ===>",e),1==e.code&&t.pageTo({url:"/pagesPurchase/gatherPay?orderSn="+e.data.orderSn+"&actPrice="+e.data.actPrice+"&remainSecond="+e.data.remainSecond,type:2})})).catch((function(t){console.log("err===>",t)})))},back:function(){t.navigateBack({})}}};e.default=h}).call(this,n("934e")["default"])},f625:function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var r=function(){var t=this,e=t.$createElement,n=(t._self._c,t.$util.isEmpty(t.detailsList)),i=n?t.$util.isEmpty(t.detailsList):null;t.$mp.data=Object.assign({},{$root:{g0:n,g1:i}})},o=[]}},[["a815","common/runtime","common/vendor"]]]);
|