| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesOrder/select"],{"4f28":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).bigCount>0||t.getSelectClassById(n.classId).smallCount>0,c=a?t.getSelectClassById(n.classId).bigCount>0||t.getSelectClassById(n.classId).smallCount>0:null,i=a&&c?t.getSelectClassById(n.classId):null,u=a?t.getSelectClassById(n.classId):null,l=a?t.getSelectClassById(n.classId):null,s=a&&l.smallCount>0?t.getSelectClassById(n.classId):null;return{$orig:o,m0:a,m1:c,m2:i,m3:u,m4:l,m5:s}}))),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),i=t.getSelectItemById(e.id,n.classId);return{$orig:a,m6:c,m7:i}}));return{$orig:o,l1:a}})),c=0==t.tabIndex&&o?t.$util.isEmpty(t.filterProductInfo):null;t._isMounted||(t.e0=function(n){return n.stopPropagation(),t.swichClass(n)}),t.$mp.data=Object.assign({},{$root:{l0:e,g0:o,l2:a,g1:c}})},c=[]},"7bd7":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=u(e("7da1")),a=e("7602"),c=e("3a10"),i=u(e("e350"));function u(t){return t&&t.__esModule?t:{default:t}}function l(t,n,e,o,a,c,i){try{var u=t[c](i),l=u.value}catch(s){return void e(s)}u.done?n(l):Promise.resolve(l).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 i(t){l(c,o,a,i,u,"next",t)}function u(t){l(c,o,a,i,u,"throw",t)}i(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:[i.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,i=e.bigUnit,u=e.smallNum,l=e.smallUnit,s=e.ratio,r=Number(s);Number(o)*r+Number(a)>Number(c)*r+Number(u)?(t.showToast({title:"库存只有".concat(c).concat(i).concat(u).concat(l),icon:"none"}),this.customData.bigCount=c,this.customData.smallCount=u):(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("255a")["default"])},8857:function(t,n,e){"use strict";var o=e("ecd7"),a=e.n(o);a.a},9549:function(t,n,e){"use strict";e.r(n);var o=e("4f28"),a=e("9d0d");for(var c in a)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return a[t]}))}(c);e("8857");var i,u=e("7702"),l=Object(u["a"])(a["default"],o["b"],o["c"],!1,null,"738aa76c",null,!1,o["a"],i);n["default"]=l.exports},"9d0d":function(t,n,e){"use strict";e.r(n);var o=e("7bd7"),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("dda7"));var n=o(e("9549"));function o(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,e("255a")["createPage"])},ecd7:function(t,n,e){}},[["dfce","common/runtime","common/vendor"]]]);
|