徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
3.4 KiB

require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/admin/goods/specs"],{1268:function(t,i,e){"use strict";e.d(i,"b",(function(){return n})),e.d(i,"c",(function(){return s})),e.d(i,"a",(function(){}));var n=function(){var t=this.$createElement;this._self._c},s=[]},3483:function(t,i,e){"use strict";var n=e("99d7"),s=e.n(n);s.a},"4da9":function(t,i,e){"use strict";e.r(i);var n=e("1268"),s=e("d390");for(var c in s)["default"].indexOf(c)<0&&function(t){e.d(i,t,(function(){return s[t]}))}(c);e("3483");var o=e("828b"),r=Object(o["a"])(s["default"],n["b"],n["c"],!1,null,"065580a8",null,!1,n["a"],void 0);i["default"]=r.exports},"99d7":function(t,i,e){},"9ee6":function(t,i,e){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n=e("e727"),s={components:{editPrice:function(){e.e("pages/admin/goods/components/editPrice/index").then(function(){return resolve(e("b14c"))}.bind(null,e)).catch(e.oe)}},data:function(){return{attrsList:[],id:0,administer:!1,isAllSelect:!1,visiblePrice:!1,goodsInfo:{id:0,spec_type:1,attr_value:{}},storeNum:1}},onShow:function(){},onLoad:function(t){this.id=t.id,this.storeNum=parseInt(t.storeNum),this.getAttrsList()},methods:{getIds:function(){var t=[];return this.attrsList.forEach((function(i){i.checked&&t.push(i.id)})),t},batchEdit:function(){this.getIds().length?(this.goodsInfo.id=this.id,this.goodsInfo.attr_value={cost:"",price:"",ot_price:"",stock:""},this.visiblePrice=!0):this.$util.Tips({title:"请选择商品规格"})},define:function(){var i=this,e={attr_value:[],type:"price"};this.attrsList.forEach((function(t){var n={cost:t.cost,price:t.price,ot_price:t.ot_price,unique:t.unique};i.storeNum&&(n.stock=t.stock),e.attr_value.push(n)}));var s="";s=this.storeNum?n.postUpdateAttrs:n.postStoreUpdateAttrs,s(this.id,e).then((function(e){i.$util.Tips({title:e.msg},(function(){t.navigateTo({url:"/pages/admin/goods/index"})}))})).catch((function(t){i.$util.Tips({title:t})}))},getAttrsList:function(){var t=this,i="";i=this.storeNum?n.getGetAttrs:n.getStoreGetAttrs,i(this.id).then((function(i){var e=i.data;e.forEach((function(t){t.checked=!1})),t.attrsList=e})).catch((function(i){t.$util.Tips({title:i})}))},checkboxChange:function(t){var i=t.detail.value;this.attrsList.forEach((function(t){-1!==i.indexOf(t.id+"")?t.checked=!0:t.checked=!1})),i.length==this.attrsList.length?this.isAllSelect=!0:this.isAllSelect=!1},forGoods:function(t){this.attrsList.length&&this.attrsList.forEach((function(i){i.checked=!!t}))},checkboxAllChange:function(t){var i=t.detail.value;i.length?(this.isAllSelect=!0,this.forGoods(1)):(this.isAllSelect=!1,this.forGoods(0))},manageTap:function(){this.administer=!this.administer},priceCloseDrawer:function(){this.visiblePrice=!1},successChange:function(t){this.visiblePrice=!1;var i=t;this.attrsList.forEach((function(t){t.checked&&(i.cost&&(t.cost=i.cost),i.price&&(t.price=i.price),i.ot_price&&(t.ot_price=i.ot_price),i.stock&&(t.stock=i.stock))})),this.manageTap()}}};i.default=s}).call(this,e("df3c")["default"])},d390:function(t,i,e){"use strict";e.r(i);var n=e("9ee6"),s=e.n(n);for(var c in n)["default"].indexOf(c)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(c);i["default"]=s.a},f63c:function(t,i,e){"use strict";(function(t,i){var n=e("47a9");e("7561");n(e("3240"));var s=n(e("4da9"));t.__webpack_require_UNI_MP_PLUGIN__=e,i(s.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])}},[["f63c","common/runtime","common/vendor"]]]);