select.js 5.5 KB

1
  1. require('common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesOrder/select"],{"71b5":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=l(e("4838")),c=e("7602"),a=e("3a10"),u=l(e("e350"));function l(t){return t&&t.__esModule?t:{default:t}}function i(t,n,e,o,c,a,u){try{var l=t[a](u),i=l.value}catch(s){return void e(s)}l.done?n(i):Promise.resolve(i).then(o,c)}function s(t){return function(){var n=this,e=arguments;return new Promise((function(o,c){var a=t.apply(n,e);function u(t){i(a,o,c,u,l,"next",t)}function l(t){i(a,o,c,u,l,"throw",t)}u(void 0)}))}}var r=function(){e.e("components/module/app-search").then(function(){return resolve(e("80f2"))}.bind(null,e)).catch(e.oe)},d=function(){e.e("components/plugin/tabs").then(function(){return resolve(e("f58d"))}.bind(null,e)).catch(e.oe)},f=function(){e.e("components/app-wrapper-empty").then(function(){return resolve(e("c078"))}.bind(null,e)).catch(e.oe)},m=function(){Promise.all([e.e("common/vendor"),e.e("components/module/app-commodity")]).then(function(){return resolve(e("e36c"))}.bind(null,e)).catch(e.oe)},p=function(){e.e("components/module/app-footer-cart").then(function(){return resolve(e("a9f2"))}.bind(null,e)).catch(e.oe)},h=function(){e.e("components/plugin/modal").then(function(){return resolve(e("3a8f"))}.bind(null,e)).catch(e.oe)},b={name:"Billing",components:{AppTabs:d,AppSearchModule:r,AppWrapperEmpty:f,Commondity:m,ModalModule:h,FooterCart:p},mixins:[u.default],data:function(){return{pageType:"order_change",COMMODITY_TYPE:c.COMMODITY_TYPE,tabIndex:0,tabs:[{name:"花材"},{name:"成品"}],isModel:!1,customData:{bigCount:0,smallCount:0},showSubmitModel:!1}},computed:{confirmContent:function(){var t="确认下一步?";return this.hasNoStock&&(t="有花材库存不足,确认下一步?"),t}},onUnload:function(){this.resetSelectInfoByType(this.pageType)},methods:{customNum:function(t){this.isModel=!0,this.customData=t},modalCancel:function(){this.isModel=!1,this.customData={}},affirm:function(n){if(0===n.index)this.modalCancel();else{var e=this.customData,o=e.bigCount,c=e.smallCount,a=e.bigNum,u=e.bigUnit,l=e.smallNum,i=e.smallUnit,s=e.ratio,r=Number(s);Number(o)*r+Number(c)>Number(a)*r+Number(l)?(t.showToast({title:"库存只有".concat(a).concat(u).concat(l).concat(i),icon:"none"}),this.customData.bigCount=a,this.customData.smallCount=l):(this.updateItemEvent(this.customData),this.modalCancel())}},cancelEvent:function(){this.showSubmitModel=!1},submitEvent:function(n){0===n.index||(console.log(444,this.selectList),t.navigateBack({delta:1})),this.cancelEvent()},confirmSelectEvent:function(){var n=s(o.default.mark((function n(){var e,c;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(n.prev=0,!(this.selectList.length>0)){n.next=10;break}return e=this.selectList.map((function(t){return{classId:t.classId,productId:t.id,bigNum:t.bigCount,smallNum:t.smallCount}})),c={id:this.option.id,product:JSON.stringify(e)},n.next=6,(0,a.chooseOrderProductApi)(c);case 6:this.$msg("修改成功"),t.navigateBack({delta:1}),n.next=11;break;case 10:this.$msg("请选择花材");case 11:n.next=15;break;case 13:n.prev=13,n.t0=n["catch"](0);case 15:case"end":return n.stop()}}),n,this,[[0,13]])})));function e(){return n.apply(this,arguments)}return e}(),change:function(t){if(this.tabIndex==t.index)return!1;this.tabIndex=t.index},scrollTop:function(){}}};n.default=b}).call(this,e("f3be")["default"])},9549:function(t,n,e){"use strict";e.r(n);var o=e("c13c"),c=e("9d0d");for(var a in c)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return c[t]}))}(a);e("e963");var u,l=e("0095"),i=Object(l["a"])(c["default"],o["b"],o["c"],!1,null,"cf0f1056",null,!1,o["a"],u);n["default"]=i.exports},"9d0d":function(t,n,e){"use strict";e.r(n);var o=e("71b5"),c=e.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=c.a},bef2:function(t,n,e){},c13c:function(t,n,e){"use strict";var o;e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return o}));var c=function(){var t=this,n=t.$createElement,e=(t._self._c,t.__map(t.filterProductInfo,(function(n,e){var o=t.__get_orig(n),c=t.getSelectClassById(n.classId),a=t.getSelectClassById(n.classId),u=c.bigCount>0||a.smallCount>0?t.getSelectClassById(n.classId):null,l=c.bigCount>0||a.smallCount>0?t.getSelectClassById(n.classId):null,i=(c.bigCount>0||a.smallCount>0)&&(u.bigCount>0||l.smallCount>0)?t.getSelectClassById(n.classId):null,s=c.bigCount>0||a.smallCount>0?t.getSelectClassById(n.classId):null,r=c.bigCount>0||a.smallCount>0?t.getSelectClassById(n.classId):null,d=(c.bigCount>0||a.smallCount>0)&&r.smallCount>0?t.getSelectClassById(n.classId):null;return{$orig:o,m0:c,m1:a,m2:u,m3:l,m4:i,m5:s,m6:r,m7:d}}))),o=0==t.tabIndex?t.$util.isEmpty(t.filterProductInfo):null,c=0!=t.tabIndex||o?null:t.__map(t.filterProductInfo,(function(n,e){var o=t.__get_orig(n),c=t.__map(n.child,(function(e,o){var c=t.__get_orig(e),a=t.getSelectItemById(e.id,n.classId),u=t.getSelectItemById(e.id,n.classId);return{$orig:c,m8:a,m9:u}}));return{$orig:o,l1:c}})),a=0==t.tabIndex&&o?t.$util.isEmpty(t.filterProductInfo):null;t.$mp.data=Object.assign({},{$root:{l0:e,g0:o,l2:c,g1:a}})},a=[]},dfce:function(t,n,e){"use strict";(function(t){e("6cdc");o(e("4a15"));var n=o(e("9549"));function o(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("f3be")["createPage"])},e963:function(t,n,e){"use strict";var o=e("bef2"),c=e.n(o);c.a}},[["dfce","common/runtime","common/vendor"]]]);