app-commodity.js 4.2 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/module/app-commodity"],{"0406":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var o=function(){var t=this,e=t.$createElement;t._self._c},r=[]},"5ada":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("7602"),o=n("7adc"),r=c(n("fca4")),u=c(n("f01d"));function c(t){return t&&t.__esModule?t:{default:t}}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var f=function(){Promise.all([n.e("common/vendor"),n.e("components/app-img")]).then(function(){return resolve(n("cb3c"))}.bind(null,n)).catch(n.oe)},d=function(){n.e("components/module/allSelectInput").then(function(){return resolve(n("2d69"))}.bind(null,n)).catch(n.oe)},h={name:"Commodity",components:{AppImg:f,allSelectInput:d},mixins:[r.default,u.default],props:{info:{required:!0,type:Object,default:function(){return{}}},type:{type:String,default:i.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}},data:function(){return{COMMODITY_TYPE:i.COMMODITY_TYPE,isAlterMoney:!1,isAloneAllActive:!1,isAloneAllFocus:!1,isShowSucceed:!1,changeAutoPrice:"",showPrice:0,ifFocus:!1}},created:function(){},mounted:function(){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)})))},addEvents:function(){var t=Number(this.info.ratio);this.offVerifyRepertory&&Number(this.bigCount)*t+Number(this.smallCount)>Number(this.info.bigNum)*t+Number(this.info.smallNum)?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(t){this.isFocus=!1,this.isAlterMoney=!0},customNum:function(){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}))}}};e.default=h},"98da":function(t,e,n){"use strict";var i=n("e5cf"),o=n.n(i);o.a},e36c:function(t,e,n){"use strict";n.r(e);var i=n("0406"),o=n("e9ab");for(var r in o)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(r);n("98da");var u,c=n("0095"),s=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"7179e880",null,!1,i["a"],u);e["default"]=s.exports},e5cf:function(t,e,n){},e9ab:function(t,e,n){"use strict";n.r(e);var i=n("5ada"),o=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=o.a}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/module/app-commodity-create-component',
  4. {
  5. 'components/module/app-commodity-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('f3be')['createComponent'](__webpack_require__("e36c"))
  7. })
  8. },
  9. [['components/module/app-commodity-create-component']]
  10. ]);