| 12345678910 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/module/app-commodity"],{"5ada":function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i("7602"),o=i("7adc"),r=c(i("fca4")),u=c(i("f01d"));function c(e){return e&&e.__esModule?e:{default:e}}function s(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function l(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?s(Object(i),!0).forEach((function(t){f(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function f(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}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:[r.default,u.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},autoPrice:{},offPrice:{type:Boolean,default:!1},offVerifyRepertory:{type:Boolean,default:!1},isDiscounts:{type:Boolean,default:!1}},data:function(){return{COMMODITY_TYPE:n.COMMODITY_TYPE,isAlterMoney:!1,isAloneAllActive:!1,isAloneAllFocus:!1,isShowSucceed:!1,changeAutoPrice:"",showPrice:0,oldPrice:0,ifFocus:!1}},created:function(){},mounted:function(){2==this.info.priceLabel&&(this.changeAutoPrice=this.info.price),this.showPrice=this.info.price,this.oldPrice=(Number(this.info.cost)+Number(this.info.addPrice)).toFixed(2)},methods:{deleteInputVal:function(){this.isAloneAllActive=!1,this.changeAutoPrice=""},moveAllInput:function(e){var t=this;this.isAloneAllActive=!1,this.isAloneAllFocus=!1,this.changeAutoPrice=e||0,this.isAlterMoney&&(this.isAlterMoney=!1,(0,o.changePriceByIdApi)({productId:this.info.id,price:this.changeAutoPrice}).then((function(e){1==e.code?(t.showPrice=e.data.price,t.isShowSucceed=!0,setTimeout((function(){t.isShowSucceed=!1}),1e3)):t.$msg(e.msg)})))},addEvents:function(){var t=Number(this.info.ratio);if(this.offVerifyRepertory){if(this.info.stock<=0)return void e.showToast({title:"库存不足",icon:"none"});if(Number(this.bigCount)*t+Number(this.smallCount)>Number(this.info.bigNum)*t+Number(this.info.smallNum))return void this.$msg("库存不足")}this.animationFun("add"),this.$emit("add",this.info)},delEvent:function(){this.animationFun("del"),console.log(this.info,"this.info"),this.$emit("del",this.info)},changePriceEvent:function(e){this.isFocus=!1,this.isAlterMoney=!0},customNum:function(){if(this.info.stock<=0)e.showToast({title:"库存不足",icon:"none"});else{if(!this.bigCount&&!this.smallCount){var t=l(l({},this.info),{},{bigCount:this.bigCount,smallCount:this.smallCount});this.$emit("addOneEvent",this.info,t)}this.$emit("customNum",l(l({},this.info),{},{bigCount:this.bigCount,smallCount:this.smallCount}))}}}};t.default=h}).call(this,i("f3be")["default"])},"6e0a":function(e,t,i){},d6fe:function(e,t,i){"use strict";var n=i("6e0a"),o=i.n(n);o.a},e36c:function(e,t,i){"use strict";i.r(t);var n=i("ed9d"),o=i("e9ab");for(var r in o)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return o[e]}))}(r);i("d6fe");var u,c=i("0095"),s=Object(c["a"])(o["default"],n["b"],n["c"],!1,null,"f8c58f48",null,!1,n["a"],u);t["default"]=s.exports},e9ab:function(e,t,i){"use strict";i.r(t);var n=i("5ada"),o=i.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(r);t["default"]=o.a},ed9d:function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return o})),i.d(t,"c",(function(){return r})),i.d(t,"a",(function(){return n}));var o=function(){var e=this,t=e.$createElement,i=(e._self._c,e.type!=e.COMMODITY_TYPE.COMMON||e.offPrice?null:Number(e.oldPrice)),n=e.type!=e.COMMODITY_TYPE.COMMON||e.offPrice?null:Number(e.info.price),o=e.type==e.COMMODITY_TYPE.COMMON&&!e.offPrice&&e.isDiscounts&&i>n?(10*(Number(e.info.price)/Number(e.oldPrice)).toFixed(2)).toFixed(1):null;e.$mp.data=Object.assign({},{$root:{m0:i,m1:n,g0:o}})},r=[]}}]);
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'components/module/app-commodity-create-component',
- {
- 'components/module/app-commodity-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('f3be')['createComponent'](__webpack_require__("e36c"))
- })
- },
- [['components/module/app-commodity-create-component']]
- ]);
|