1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["content~goods"],{"19d3":function(t,e,r){"use strict";r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return u})),r.d(e,"d",(function(){return d})),r.d(e,"c",(function(){return c}));var n=r("b775"),i={list:"/goods.service/list",all:"/goods.service/all",add:"/goods.service/add",edit:"/goods.service/edit",delete:"/goods.service/delete"};function a(t){return Object(n["b"])({url:i.list,method:"get",params:t})}function o(t){return Object(n["b"])({url:i.all,method:"get",params:t})}function u(t){return Object(n["b"])({url:i.add,method:"post",data:t})}function d(t){return Object(n["b"])({url:i.edit,method:"post",data:t})}function c(t){return Object(n["b"])({url:i.delete,method:"post",data:t})}},"24b0":function(t,e,r){"use strict";r.d(e,"f",(function(){return a})),r.d(e,"b",(function(){return o})),r.d(e,"d",(function(){return u})),r.d(e,"a",(function(){return d})),r.d(e,"e",(function(){return c})),r.d(e,"c",(function(){return s}));var n=r("b775"),i={list:"/provider/list",all:"/provider/all",detail:"/provider/detail",add:"/provider/add",edit:"/provider/edit",delete:"/provider/delete"};function a(t){return Object(n["b"])({url:i.list,method:"get",params:t})}function o(t){return Object(n["b"])({url:i.all,method:"get",params:t})}function u(t){return Object(n["b"])({url:i.detail,method:"get",params:t})}function d(t){return Object(n["b"])({url:i.add,method:"post",data:t})}function c(t){return Object(n["b"])({url:i.edit,method:"post",data:t})}function s(t){return Object(n["b"])({url:i.delete,method:"post",data:t})}},"2a66":function(t,e,r){"use strict";r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return u})),r.d(e,"d",(function(){return d})),r.d(e,"c",(function(){return c}));var n=r("b775"),i={list:"/setting.express/list",all:"/setting.express/all",add:"/setting.express/add",edit:"/setting.express/edit",delete:"/setting.express/delete"};function a(t){return Object(n["b"])({url:i.list,method:"get",params:t})}function o(t){return Object(n["b"])({url:i.all,method:"get",params:t})}function u(t){return Object(n["b"])({url:i.add,method:"post",data:t})}function d(t){return Object(n["b"])({url:i.edit,method:"post",data:t})}function c(t){return Object(n["b"])({url:i.delete,method:"post",data:t})}},"2e1c":function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r("b775"),i={list:"/user.grade/list",all:"/user.grade/all",add:"/user.grade/add",edit:"/user.grade/edit",delete:"/user.grade/delete"};function a(t){return Object(n["b"])({url:i.all,method:"get",params:t})}},"85ee":function(t,e,r){(function(e){var r=1/0,n=9007199254740991,i="[object Arguments]",a="[object Function]",o="[object GeneratorFunction]",u="[object Symbol]",d="object"==typeof e&&e&&e.Object===Object&&e,c="object"==typeof self&&self&&self.Object===Object&&self,s=d||c||Function("return this")();function l(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function f(t,e){var r=-1,n=t?t.length:0,i=Array(n);while(++r<n)i[r]=e(t[r],r,t);return i}function b(t,e){var r=-1,n=e.length,i=t.length;while(++r<n)t[i+r]=e[r];return t}var g=Object.prototype,m=g.hasOwnProperty,h=g.toString,p=s.Symbol,v=g.propertyIsEnumerable,j=p?p.isConcatSpreadable:void 0,y=Math.max;function O(t,e,r,n,i){var a=-1,o=t.length;r||(r=_),i||(i=[]);while(++a<o){var u=t[a];e>0&&r(u)?e>1?O(u,e-1,r,n,i):b(i,u):n||(i[i.length]=u)}return i}function D(t,e){return t=Object(t),C(t,e,(function(e,r){return r in t}))}function C(t,e,r){var n=-1,i=e.length,a={};while(++n<i){var o=e[n],u=t[o];r(u,o)&&(a[o]=u)}return a}function L(t,e){return e=y(void 0===e?t.length-1:e,0),function(){var r=arguments,n=-1,i=y(r.length-e,0),a=Array(i);while(++n<i)a[n]=r[e+n];n=-1;var o=Array(e+1);while(++n<e)o[n]=r[n];return o[e]=a,l(t,this,o)}}function _(t){return x(t)||w(t)||!!(j&&t&&t[j])}function k(t){if("string"==typeof t||U(t))return t;var e=t+"";return"0"==e&&1/t==-r?"-0":e}function w(t){return I(t)&&m.call(t,"callee")&&(!v.call(t,"callee")||h.call(t)==i)}var x=Array.isArray;function E(t){return null!=t&&S(t.length)&&!P(t)}function I(t){return G(t)&&E(t)}function P(t){var e=R(t)?h.call(t):"";return e==a||e==o}function S(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}function R(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function G(t){return!!t&&"object"==typeof t}function U(t){return"symbol"==typeof t||G(t)&&h.call(t)==u}var A=L((function(t,e){return null==t?{}:D(t,f(O(e,1),k))}));t.exports=A}).call(this,r("f20b"))},"967a":function(t,e,r){"use strict";r.d(e,"h",(function(){return a})),r.d(e,"b",(function(){return o})),r.d(e,"d",(function(){return u})),r.d(e,"a",(function(){return d})),r.d(e,"e",(function(){return c})),r.d(e,"c",(function(){return s})),r.d(e,"f",(function(){return l})),r.d(e,"g",(function(){return f}));var n=r("b775"),i={list:"/setting.delivery/list",all:"/setting.delivery/all",detail:"/setting.delivery/detail",add:"/setting.delivery/add",edit:"/setting.delivery/edit",delete:"/setting.delivery/delete",limitAdd:"/setting.deliverylimit/add",limitEdit:"/setting.deliverylimit/edit",limitDetail:"/setting.deliverylimit/detail"};function a(t){return Object(n["b"])({url:i.list,method:"get",params:t})}function o(t){return Object(n["b"])({url:i.all,method:"get",params:t})}function u(t){return Object(n["b"])({url:i.detail,method:"get",params:t})}function d(t){return Object(n["b"])({url:i.add,method:"post",data:t})}function c(t){return Object(n["b"])({url:i.edit,method:"post",data:t})}function s(t){return Object(n["b"])({url:i.delete,method:"post",data:t})}function l(t){return Object(n["b"])({url:i.limitDetail,method:"get",params:t})}function f(t){return Object(n["b"])({url:i.limitEdit,method:"post",data:t})}},d130:function(t,e,r){"use strict";r.d(e,"n",(function(){return a})),r.d(e,"g",(function(){return o})),r.d(e,"m",(function(){return u})),r.d(e,"f",(function(){return d})),r.d(e,"d",(function(){return c})),r.d(e,"e",(function(){return s})),r.d(e,"r",(function(){return l})),r.d(e,"s",(function(){return f})),r.d(e,"t",(function(){return b})),r.d(e,"q",(function(){return g})),r.d(e,"a",(function(){return m})),r.d(e,"h",(function(){return h})),r.d(e,"c",(function(){return p})),r.d(e,"p",(function(){return v})),r.d(e,"i",(function(){return j})),r.d(e,"k",(function(){return y})),r.d(e,"j",(function(){return O})),r.d(e,"l",(function(){return D})),r.d(e,"o",(function(){return C})),r.d(e,"b",(function(){return L}));var n=r("b775"),i={list:"/card.riceCard/list",frozen:"/coupon/frozen",detail:"/card.riceCard/detail",createcoupon:"/coupon/createcoupon",addcard:"/coupon/addcard",cashDetail:"/card.riceCard/cashDetail",cardlist:"/coupon/cardlist",skulist:"/goods/skulist",sms:"/home/sms",state:"/card.riceCard/state",skuPickerList:"/goods/skuPickerList",addCash:"/card.riceCard/addCash",editCash:"/card.riceCard/editCash",addExchange:"/card.RiceCard/addExchange",editExchange:"/card.RiceCard/editExchange",selectList:"/card.RiceCard/selectList",entityCardCodes:"/card.RealRiceCard/genCardCodes",entityList:"/card.RealRiceCard/list",entityDetail:"/card.RealRiceCard/listDetail",freezeCard:"/card.RealRiceCard/freezeCard",redeemCodesExport:"/card.RealRiceCard/redeemCodesExport",addEntityCash:"/card.riceCard/addEntityCash"};function a(t){return Object(n["b"])({url:i.list,method:"get",params:t})}function o(t){return Object(n["b"])({url:i.detail,method:"get",params:t})}function u(t){return Object(n["b"])({url:i.frozen,method:"post",data:t})}function d(t){return Object(n["b"])({url:i.createcoupon,method:"post",data:t})}function c(t){return Object(n["b"])({url:i.addcard,method:"post",data:t})}function s(t){return Object(n["b"])({url:i.cashDetail,method:"get",params:t})}function l(t){return Object(n["b"])({url:i.skulist,method:"get",params:t})}function f(t){return Object(n["b"])({url:i.sms,method:"post",data:t})}function b(t){return Object(n["b"])({url:i.state,method:"post",data:t})}function g(t){return Object(n["b"])({url:i.skuPickerList,method:"get",params:t})}function m(t){return Object(n["b"])({url:i.addCash,method:"post",data:t})}function h(t){return Object(n["b"])({url:i.editCash,method:"post",data:t})}function p(t){return Object(n["b"])({url:i.addExchange,method:"post",data:t})}function v(t){return Object(n["b"])({url:i.selectList,method:"get",params:t})}function j(t){return Object(n["b"])({url:i.entityCardCodes,method:"post",data:t})}function y(t){return Object(n["b"])({url:i.entityList,method:"get",params:t})}function O(t){return Object(n["b"])({url:i.entityDetail,method:"get",params:t})}function D(t){return Object(n["b"])({url:i.freezeCard,method:"get",params:t})}function C(t){return Object(n["b"])({url:i.redeemCodesExport,method:"post",data:t})}function L(t){return Object(n["b"])({url:i.addEntityCash,method:"post",data:t})}},e1fe:function(t,e,r){"use strict";var n=r("753f"),i=(r("9f29"),r("fa6d"),r("9b73"),r("210a"),r("a815"),r("b505"),r("0528"),r("7c98")),a=r.n(i),o=r("8243"),u=r("d084"),d=r("2e1c"),c=r("19d3"),s=r("967a"),l=r("b775"),f={list:"/setting.unit/list",all:"/setting.unit/all",detail:"/setting.unit/detail",add:"/setting.unit/add",edit:"/setting.unit/edit",delete:"/setting.unit/delete"};function b(t){return Object(l["b"])({url:f.all,method:"get",params:t})}var g=r("24b0");e["a"]={goodsId:null,formData:{goods:{},categoryList:[],deliveryList:[],serviceList:[],defaultServiceIds:[],userGradeList:[],defaultUserGradeValue:{},providerList:[],unitList:[],packageSkuData:[]},getFromData:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.goodsId=e,new Promise((function(r,n){Promise.all([t.getGoodsDetail(e),t.getCategoryList(),t.getDeliveryList(),t.getServiceList(),t.getUserGradeList(),t.getProviderList(),t.getUnitList()]).then((function(){t.setDefaultData(),r({formData:t.formData})}))}))},getGoodsDetail:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!!e&&new Promise((function(r,n){u["c"]({goodsId:e}).then((function(e){t.formData.goods=e.data.goodsInfo,t.formData.packageSkuData=e.data.goodsInfo.packageSkuData||[],r()}))}))},getFieldsValue:function(){var t=this.formData.goods,e=a.a.pick(t,["goods_name","categoryIds","goods_no","delivery_type","sort","goods_type","supplier","delivery_id","status","spec_type","deduct_stock_type","content","selling_point","serviceIds","sales_initial","provider_id","unit","brand","cascader","storage","goods_barcode"]);e.goods_type=e.goods_type.toString();var r=a.a.pick(t.skuList[0],["goods_price","line_price","stock_num","goods_weight","alarm_stock_num","goods_gross_weight","goods_sku_no","specs"]);return Object(n["a"])(Object(n["a"])({},e),r)},formatCategoryIds:function(t){return t.map((function(t){return{value:t}}))},getCategoryList:function(){var t=this;return new Promise((function(e,r){o["a"].getCategoryTreeSelect().then((function(r){t.formData.categoryList=r,e()}))}))},getDeliveryList:function(){var t=this;return new Promise((function(e,r){s["b"]().then((function(r){t.formData.deliveryList=r.data.list,e()}))}))},getProviderList:function(){var t=this;return new Promise((function(e,r){g["b"]().then((function(r){t.formData.providerList=r.data.list,e()}))}))},getUnitList:function(){var t=this;return new Promise((function(e,r){b().then((function(r){t.formData.unitList=r.data.list,e()}))}))},getServiceList:function(){var t=this;return new Promise((function(e,r){c["b"]().then((function(r){t.formData.serviceList=r.data.list,e()}))}))},getUserGradeList:function(){var t=this;return new Promise((function(e,r){d["a"]({status:1}).then((function(r){t.formData.userGradeList=r.data.list,e()}))}))},setDefaultData:function(){this.setDefaultServiceIds(),this.setDefaultUserGradeValue()},setDefaultServiceIds:function(){var t=this.formData.serviceList;if(!this.goodsId){var e=t.filter((function(t){return t.is_default}));this.formData.defaultServiceIds=e.map((function(t){return t.service_id}))}},setDefaultUserGradeValue:function(){var t=this.formData.userGradeList,e=this.goodsId&&this.formData.goods.alone_grade_equity?this.formData.goods.alone_grade_equity:{},r={};t.forEach((function(t){r[t.grade_id]=e[t.grade_id]||t.equity.discount})),this.formData.defaultUserGradeValue=Object(n["a"])({},r)}}},f585:function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return u}));var n=r("753f"),i=r("b775"),a={detail:"/setting/detail",update:"/setting/update"};function o(t){return Object(i["b"])({url:a.detail,method:"get",params:{key:t}})}function u(t,e){return Object(i["b"])({url:a.update,method:"post",data:Object(n["a"])({key:t},e)})}}}]);
|