list.js 4.9 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/changePrice/list"],{"0526":function(t,e,n){"use strict";n.r(e);var i=n("3cc9"),o=n.n(i);for(var c in i)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(c);e["default"]=o.a},"3cc9":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("7602"),o=u(n("e350")),c=u(n("fcdb")),r=n("1b62"),a=n("7736"),s=n("7adc");function u(t){return t&&t.__esModule?t:{default:t}}function l(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 f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?l(Object(n),!0).forEach((function(e){d(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var p=function(){n.e("components/module/app-search").then(function(){return resolve(n("80f2"))}.bind(null,n)).catch(n.oe)},h=function(){n.e("components/app-wrapper-empty").then(function(){return resolve(n("c078"))}.bind(null,n)).catch(n.oe)},b=function(){n.e("admin/changePrice/components/Item").then(function(){return resolve(n("9edd"))}.bind(null,n)).catch(n.oe)},m=function(){n.e("components/module/shopSelect").then(function(){return resolve(n("868a"))}.bind(null,n)).catch(n.oe)},g={name:"item_list",components:{AppSearchModule:p,AppWrapperEmpty:h,ItemComponent:b,DorpdownSelect:m},mixins:[o.default,r.selectShop,c.default],data:function(){return{STOCK_TYPE:i.STOCK_TYPE,autoLoad:!1,pageType:"stock",tabIndex:0,priceArr:[]}},computed:f({},(0,a.mapGetters)(["getMyShopInfo","getLoginInfo"])),onLoad:function(){this.initProduct()},methods:{downloadTable:function(){var e=0,n=["大众价","标准价","黄金价","钻石价"];t.showActionSheet({itemList:n,success:function(n){e=n.tapIndex,t.showLoading({title:"下载中",mask:!0}),(0,s.generatePriceTable)({level:e}).then((function(e){if(1==e.code){t.hideLoading();var n=e.data.file,i=e.data.shortFile;t.downloadFile({url:n,header:{"Content-Type":"application/vnd.ms-excel"},filePath:"".concat(wx.env.USER_DATA_PATH,"/").concat(i),success:function(t){200===t.statusCode&&wx.saveFileToDisk({filePath:t.filePath,success:function(t){console.log(t)},fail:function(t){console.log(t)}})},fail:function(){t.showToast({title:"请用电脑打开小程序下载",mask:!0,icon:"none"})}})}}))}})},initProduct:function(){this.shopId=this.getMyShopInfo.id;var t="";this.initData({type:t,shopId:this.shopId,status:0})},commitPrice:function(){var e=this;if(0!=this.priceArr.length){var n=JSON.stringify(this.priceArr);(0,s.batchChangePrice)({data:n}).then((function(t){1==t.code&&(e.priceArr=[],e.initProduct()),e.$msg(t.msg)}))}else t.showToast({title:"没有修改",icon:"none"})},savePrice:function(t,e){console.log("price",t,e),this.priceArr.length>0&&this.priceArr.forEach((function(t,n,i){t.id==e&&i.splice(n,1)})),this.priceArr.push({id:e,price:t}),console.log(this.priceArr,"price")},affirm:function(t){0===t.index&&this.modalCancel()},change:function(e){if(this.tabIndex==e.index)return!1;t.showLoading({title:"加载中"}),this.tabIndex=e.index,this.tabs[this.tabIndex].key;var n="";this.initData({type:n,shopId:this.shopId})},scrollTop:function(){},initProductInfo:function(){this.filterProductInfoContrapose=[],this.page=1,this.isMore=!0},selectSussess:function(e){t.showLoading({title:"加载中"}),this.initProductInfo();var n="";this.shopId=e.selectItem.id,this.initData({type:n,shopId:this.shopId})}}};e.default=g}).call(this,n("f3be")["default"])},"894b":function(t,e,n){"use strict";(function(t){n("6cdc");i(n("4a15"));var e=i(n("9bc8"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("f3be")["createPage"])},"897f":function(t,e,n){},"9bc8":function(t,e,n){"use strict";n.r(e);var i=n("c8e4"),o=n("0526");for(var c in o)["default"].indexOf(c)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(c);n("faa5");var r,a=n("0095"),s=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,"09a2ceb4",null,!1,i["a"],r);e["default"]=s.exports},c8e4:function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return i}));var o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.$util.isEmpty(t.filterProductInfo)),i=n?null:t.__map(t.filterProductInfo,(function(e,n){var i=t.__get_orig(e),o=t.$util.isEmpty(e.child),c=t.$util.isEmpty(e.child);return{$orig:i,g1:o,g2:c}})),o=n?t.$util.isEmpty(t.filterProductInfo):null;t.$mp.data=Object.assign({},{$root:{g0:n,l0:i,g3:o}})},c=[]},faa5:function(t,e,n){"use strict";var i=n("897f"),o=n.n(i);o.a}},[["894b","common/runtime","common/vendor"]]]);