select.js 5.5 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesOrder/select"],{"3c90":function(t,n,e){"use strict";var o;e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return o}));var a=function(){var t=this,n=t.$createElement,e=(t._self._c,t.__map(t.filterProductInfo,(function(n,e){var o=t.__get_orig(n),a=t.getSelectClassById(n.classId),c=t.getSelectClassById(n.classId),u=a.bigCount>0||c.smallCount>0?t.getSelectClassById(n.classId):null,l=a.bigCount>0||c.smallCount>0?t.getSelectClassById(n.classId):null,i=(a.bigCount>0||c.smallCount>0)&&(u.bigCount>0||l.smallCount>0)?t.getSelectClassById(n.classId):null,s=a.bigCount>0||c.smallCount>0?t.getSelectClassById(n.classId):null,r=a.bigCount>0||c.smallCount>0?t.getSelectClassById(n.classId):null,d=(a.bigCount>0||c.smallCount>0)&&r.smallCount>0?t.getSelectClassById(n.classId):null;return{$orig:o,m0:a,m1:c,m2:u,m3:l,m4:i,m5:s,m6:r,m7:d}}))),o=0==t.tabIndex?t.$util.isEmpty(t.filterProductInfo):null,a=0!=t.tabIndex||o?null:t.__map(t.filterProductInfo,(function(n,e){var o=t.__get_orig(n),a=t.__map(n.child,(function(e,o){var a=t.__get_orig(e),c=t.getSelectItemById(e.id,n.classId),u=t.getSelectItemById(e.id,n.classId);return{$orig:a,m8:c,m9:u}}));return{$orig:o,l1:a}})),c=0==t.tabIndex&&o?t.$util.isEmpty(t.filterProductInfo):null;t.$mp.data=Object.assign({},{$root:{l0:e,g0:o,l2:a,g1:c}})},c=[]},"4d40":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=l(e("644f")),a=e("7602"),c=e("3a10"),u=l(e("e350"));function l(t){return t&&t.__esModule?t:{default:t}}function i(t,n,e,o,a,c,u){try{var l=t[c](u),i=l.value}catch(s){return void e(s)}l.done?n(i):Promise.resolve(i).then(o,a)}function s(t){return function(){var n=this,e=arguments;return new Promise((function(o,a){var c=t.apply(n,e);function u(t){i(c,o,a,u,l,"next",t)}function l(t){i(c,o,a,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)},g={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:a.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,a=e.smallCount,c=e.bigNum,u=e.bigUnit,l=e.smallNum,i=e.smallUnit,s=e.ratio,r=Number(s);Number(o)*r+Number(a)>Number(c)*r+Number(l)?(t.showToast({title:"库存只有".concat(c).concat(u).concat(l).concat(i),icon:"none"}),this.customData.bigCount=c,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,a;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}})),a={id:this.option.id,product:JSON.stringify(e)},n.next=6,(0,c.chooseOrderProductApi)(a);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=g}).call(this,e("934e")["default"])},"4e44":function(t,n,e){"use strict";var o=e("7867"),a=e.n(o);a.a},7867:function(t,n,e){},9549:function(t,n,e){"use strict";e.r(n);var o=e("3c90"),a=e("9d0d");for(var c in a)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(c);e("4e44");var u,l=e("8261"),i=Object(l["a"])(a["default"],o["b"],o["c"],!1,null,"72b4b8e8",null,!1,o["a"],u);n["default"]=i.exports},"9d0d":function(t,n,e){"use strict";e.r(n);var o=e("4d40"),a=e.n(o);for(var c in o)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(c);n["default"]=a.a},dfce:function(t,n,e){"use strict";(function(t){e("6cdc");o(e("b5e3"));var n=o(e("9549"));function o(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("934e")["createPage"])}},[["dfce","common/runtime","common/vendor"]]]);