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.
 
 
 
 
 
 
yanzong_vue_store/js/goods~server.43a5e31c.js

3 lines
14 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["goods~server"],{"19d3":function(t,e,r){"use strict";r.d(e,"e",(function(){return i})),r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return c})),r.d(e,"d",(function(){return u})),r.d(e,"c",(function(){return s}));var n=r("b775"),o={list:"/goods.service/list",all:"/goods.service/all",add:"/goods.service/add",edit:"/goods.service/edit",delete:"/goods.service/delete"};function i(t){return Object(n["b"])({url:o.list,method:"get",params:t})}function a(t){return Object(n["b"])({url:o.all,method:"get",params:t})}function c(t){return Object(n["b"])({url:o.add,method:"post",data:t})}function u(t){return Object(n["b"])({url:o.edit,method:"post",data:t})}function s(t){return Object(n["b"])({url:o.delete,method:"post",data:t})}},"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r("d3b7");function n(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function o(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}},"88bc":function(t,e,r){(function(e){var r=1/0,n=9007199254740991,o="[object Arguments]",i="[object Function]",a="[object GeneratorFunction]",c="[object Symbol]",u="object"==typeof e&&e&&e.Object===Object&&e,s="object"==typeof self&&self&&self.Object===Object&&self,l=u||s||Function("return this")();function f(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 d(t,e){var r=-1,n=t?t.length:0,o=Array(n);while(++r<n)o[r]=e(t[r],r,t);return o}function h(t,e){var r=-1,n=e.length,o=t.length;while(++r<n)t[o+r]=e[r];return t}var v=Object.prototype,y=v.hasOwnProperty,g=v.toString,p=l.Symbol,m=v.propertyIsEnumerable,b=p?p.isConcatSpreadable:void 0,_=Math.max;function w(t,e,r,n,o){var i=-1,a=t.length;r||(r=D),o||(o=[]);while(++i<a){var c=t[i];e>0&&r(c)?e>1?w(c,e-1,r,n,o):h(o,c):n||(o[o.length]=c)}return o}function L(t,e){return t=Object(t),j(t,e,(function(e,r){return r in t}))}function j(t,e,r){var n=-1,o=e.length,i={};while(++n<o){var a=e[n],c=t[a];r(c,a)&&(i[a]=c)}return i}function O(t,e){return e=_(void 0===e?t.length-1:e,0),function(){var r=arguments,n=-1,o=_(r.length-e,0),i=Array(o);while(++n<o)i[n]=r[e+n];n=-1;var a=Array(e+1);while(++n<e)a[n]=r[n];return a[e]=i,f(t,this,a)}}function D(t){return G(t)||E(t)||!!(b&&t&&t[b])}function x(t){if("string"==typeof t||N(t))return t;var e=t+"";return"0"==e&&1/t==-r?"-0":e}function E(t){return I(t)&&y.call(t,"callee")&&(!m.call(t,"callee")||g.call(t)==o)}var G=Array.isArray;function k(t){return null!=t&&S(t.length)&&!P(t)}function I(t){return A(t)&&k(t)}function P(t){var e=F(t)?g.call(t):"";return e==i||e==a}function S(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=n}function F(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function A(t){return!!t&&"object"==typeof t}function N(t){return"symbol"==typeof t||A(t)&&g.call(t)==c}var T=O((function(t,e){return null==t?{}:L(t,d(w(e,1),x))}));t.exports=T}).call(this,r("c8ba"))},"967a":function(t,e,r){"use strict";r.d(e,"f",(function(){return i})),r.d(e,"b",(function(){return a})),r.d(e,"d",(function(){return c})),r.d(e,"a",(function(){return u})),r.d(e,"e",(function(){return s})),r.d(e,"c",(function(){return l}));var n=r("b775"),o={list:"/setting.delivery/list",all:"/setting.delivery/all",detail:"/setting.delivery/detail",add:"/setting.delivery/add",edit:"/setting.delivery/edit",delete:"/setting.delivery/delete"};function i(t){return Object(n["b"])({url:o.list,method:"get",params:t})}function a(t){return Object(n["b"])({url:o.all,method:"get",params:t})}function c(t){return Object(n["b"])({url:o.detail,method:"get",params:t})}function u(t){return Object(n["b"])({url:o.add,method:"post",data:t})}function s(t){return Object(n["b"])({url:o.edit,method:"post",data:t})}function l(t){return Object(n["b"])({url:o.delete,method:"post",data:t})}},c7eb:function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));r("a4d3"),r("e01a"),r("b636"),r("d28b"),r("944a"),r("fb6a"),r("b0c0"),r("0c47"),r("23dc"),r("3410"),r("131a"),r("d3b7"),r("3ca3"),r("159b"),r("ddb0");var n=r("53ca");function o(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
o=function(){return e};var t,e={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),c=new S(n||[]);return a(i,"_invoke",{value:G(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var v="suspendedStart",y="suspendedYield",g="executing",p="completed",m={};function b(){}function _(){}function w(){}var L={};f(L,u,(function(){return this}));var j=Object.getPrototypeOf,O=j&&j(j(F([])));O&&O!==r&&i.call(O,u)&&(L=O);var D=w.prototype=b.prototype=Object.create(L);function x(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,a,c,u){var s=h(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==Object(n["a"])(f)&&i.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var o;a(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function G(e,r,n){var o=v;return function(i,a){if(o===g)throw Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var s=h(e,r,n);if("normal"===s.type){if(o=n.done?p:y,s.arg===m)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=p,n.method="throw",n.arg=s.arg)}}}function k(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=h(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(i.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Object(n["a"])(e)+" is not iterable")}return _.prototype=w,a(D,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:_,configurable:!0}),_.displayName=f(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,l,"GeneratorFunction")),t.prototype=Object.create(D),t},e.awrap=function(t){return{__await:t}},x(E.prototype),f(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(d(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(D),f(D,l,"Generator"),f(D,u,(function(){return this})),f(D,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}},e1fe:function(t,e,r){"use strict";var n=r("5530"),o=(r("4de4"),r("d81d"),r("d3b7"),r("3ca3"),r("159b"),r("ddb0"),r("2ef0")),i=r.n(o),a=r("8243"),c=r("d084"),u=r("2e1c"),s=r("19d3"),l=r("967a");e["a"]={goodsId:null,formData:{goods:{},categoryList:[],deliveryList:[],serviceList:[],defaultServiceIds:[],userGradeList:[],defaultUserGradeValue:{},dealer:{levelList:[{name:"一级佣金",value:"first_money"},{name:"二级佣金",value:"second_money"},{name:"三级佣金",value:"third_money"}]}},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()]).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){c["e"]({goodsId:e}).then((function(e){t.formData.goods=e.data.goodsInfo,r()}))}))},getFieldsValue:function(){var t=this.formData.goods;t.categorys=this.formatCategoryIds(t.categoryIds);var e=i.a.pick(t,["goods_type","goods_name","categorys","goods_no","sort","is_brand","is_new","paihang","remaizhishu","status","spec_type","deduct_stock_type","is_restrict","content","selling_point","serviceIds","sales_initial","is_points_gift","is_points_discount","is_enable_grade","is_alone_grade","is_ind_dealer","dealer_money_type","first_money","second_money","third_money","cmmdty_model","is_check","goods_source","delivery_time","is_in_store","remark","is_use_jd_stock"]);return Object(n["a"])({},e)},getFieldsValue2:function(){var t=this.formData.goods,e={};if(10==t.goods_type&&(e["delivery_id"]=t["delivery_id"],e["is_ind_delivery_type"]=t["is_ind_delivery_type"],e["delivery_type"]=t["delivery_type"]),10==t.spec_type){var r=i.a.pick(t.skuList[0],["goods_price","line_price","cost_price","stock_num","goods_weight"]);e=Object(n["a"])(Object(n["a"])({},e),r)}return 1==t.is_restrict&&(e["restrict_total"]=t["restrict_total"],e["restrict_single"]=t["restrict_single"]),e},formatCategoryIds:function(t){return t.map((function(t){return{value:t}}))},getCategoryList:function(){var t=this;return new Promise((function(e,r){a["a"].getCategoryTreeSelect().then((function(r){t.formData.categoryList=r,e()}))}))},getDeliveryList:function(){var t=this;return new Promise((function(e,r){l["b"]().then((function(r){t.formData.deliveryList=r.data.list,e()}))}))},getServiceList:function(){var t=this;return new Promise((function(e,r){s["b"]().then((function(r){t.formData.serviceList=r.data.list,e()}))}))},getUserGradeList:function(){var t=this;return new Promise((function(e,r){u["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)}}}}]);