| 12345678910 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/module/app-commodity"],{"022f":function(t,e,i){},"12a6":function(t,e,i){"use strict";var n;i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return u})),i.d(e,"a",(function(){return n}));var o=function(){var t=this,e=t.$createElement,i=(t._self._c,t.type!=t.COMMODITY_TYPE.COMMON||t.offPrice?null:Number(t.info.discountPrice)),n=t.type==t.COMMODITY_TYPE.COMMON&&!t.offPrice&&i>0?(10*(Number(t.info.discountPrice)/Number(t.info.prePrice)).toFixed(2)).toFixed(1):null,o=t.type==t.COMMODITY_TYPE.COMMON&&!t.offPrice&&t.discount<1&&t.discount>0?Number(t.info.discountPrice):null,u=t.type==t.COMMODITY_TYPE.COMMON&&!t.offPrice&&t.discount<1&&t.discount>0&&o>0?parseFloat((Number(t.info.discountPrice)*Number(t.discount)).toFixed(2)):null,r=t.type==t.COMMODITY_TYPE.COMMON&&!t.offPrice&&t.discount<1&&t.discount>0&&!(o>0)?parseFloat((Number(t.info.price)*Number(t.discount)).toFixed(2)):null,c=t.type!=t.COMMODITY_TYPE.COMMON||t.offPrice?null:Number(t.info.discountPrice);t.$mp.data=Object.assign({},{$root:{m0:i,g0:n,m1:o,m2:u,m3:r,m4:c}})},u=[]},b38f:function(t,e,i){"use strict";var n=i("022f"),o=i.n(n);o.a},ca51:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("7602"),o=i("7adc"),u=c(i("fca4")),r=c(i("f01d"));function c(t){return t&&t.__esModule?t:{default:t}}function s(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function f(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach((function(e){l(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function l(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var a=function(){Promise.all([i.e("common/vendor"),i.e("components/app-img")]).then(function(){return resolve(i("cb3c"))}.bind(null,i)).catch(i.oe)},d=function(){i.e("components/module/allSelectInput").then(function(){return resolve(i("2d69"))}.bind(null,i)).catch(i.oe)},h={name:"Commodity",components:{AppImg:a,allSelectInput:d},mixins:[u.default,r.default],props:{info:{required:!0,type:Object,default:function(){return{}}},type:{type:String,default:n.COMMODITY_TYPE.COMMON},bigCount:{type:Number,default:0},scrollTop:{type:Number,default:0},smallCount:{type:Number,default:0},discount:{type:Number,default:1},autoPrice:{},offPrice:{type:Boolean,default:!1},offVerifyRepertory:{type:Boolean,default:!1}},data:function(){return{COMMODITY_TYPE:n.COMMODITY_TYPE,isImg:!1,isAlterMoney:!1,isAloneAllActive:!1,isAloneAllFocus:!1,isShowSucceed:!1,changeAutoPrice:"",showPrice:0,ifFocus:!1,showMaxStock:230}},created:function(){},mounted:function(){var t=this;setTimeout((function(){t.isImg=!0}),100),2==this.info.priceLabel&&(this.changeAutoPrice=this.info.price),this.showPrice=this.info.price},methods:{deleteInputVal:function(){this.isAloneAllActive=!1,this.changeAutoPrice=""},moveAllInput:function(t){var e=this;this.isAloneAllActive=!1,this.isAloneAllFocus=!1,this.changeAutoPrice=t||0,this.isAlterMoney&&(this.isAlterMoney=!1,(0,o.changePriceByIdApi)({productId:this.info.id,price:this.changeAutoPrice}).then((function(t){1==t.code?(e.showPrice=t.data.price,e.isShowSucceed=!0,setTimeout((function(){e.isShowSucceed=!1}),1e3)):e.$msg(t.msg)})))},showBigImg:function(){this.$emit("showBigCover",this.info)},addEvents:function(e){if(0==e){var i=Number(this.info.ratio);if(this.offVerifyRepertory){if(this.info.stock<=0)return void t.showToast({title:"没有货了",icon:"none"});if(Number(this.bigCount)*i+Number(this.smallCount)>Number(this.info.bigNum)*i+Number(this.info.smallNum))return void this.$msg("库存只剩"+this.info.bigNum)}this.animationFun("add"),this.$emit("add",this.info)}else this.$emit("goToSpecialVariety",this.info)},delEvent:function(t){0==t?(this.animationFun("del"),console.log(this.info,"this.info"),this.$emit("del",this.info)):this.$emit("goToSpecialVariety",this.info)},changePriceEvent:function(t){this.isFocus=!1,this.isAlterMoney=!0},customNum:function(e){if(0==e){if(this.info.stock<=0)return void t.showToast({title:"没有货了",icon:"none"});if(!this.bigCount&&!this.smallCount){var i=f(f({},this.info),{},{bigCount:this.bigCount,smallCount:this.smallCount});this.$emit("addOneEvent",this.info,i)}this.$emit("customNum",f(f({},this.info),{},{bigCount:this.bigCount,smallCount:this.smallCount}))}else this.$emit("goToSpecialVariety",this.info)}}};e.default=h}).call(this,i("934e")["default"])},e36c:function(t,e,i){"use strict";i.r(e);var n=i("12a6"),o=i("e9ab");for(var u in o)["default"].indexOf(u)<0&&function(t){i.d(e,t,(function(){return o[t]}))}(u);i("b38f");var r,c=i("8261"),s=Object(c["a"])(o["default"],n["b"],n["c"],!1,null,"3b6ee9e3",null,!1,n["a"],r);e["default"]=s.exports},e9ab:function(t,e,i){"use strict";i.r(e);var n=i("ca51"),o=i.n(n);for(var u in n)["default"].indexOf(u)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(u);e["default"]=o.a}}]);
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'components/module/app-commodity-create-component',
- {
- 'components/module/app-commodity-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('934e')['createComponent'](__webpack_require__("e36c"))
- })
- },
- [['components/module/app-commodity-create-component']]
- ]);
|