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/public/store/js/sharp.3843acca.js

3 lines
51 KiB

11 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["sharp"],{"06ac":function(t,e,a){"use strict";a("2951")},"1bdd":function(t,e,a){"use strict";a.d(e,"a",(function(){return k}));var r=function(){var t=this,e=t._self._c;return e("div",[e("a-form-item",{directives:[{name:"show",rawName:"v-show",value:t.multiSpecData.skuList.length,expression:"multiSpecData.skuList.length"}],attrs:{label:"商品SKU",labelCol:t.labelCol,wrapperCol:t.wrapperCol,required:""}},[t.multiSpecData.skuList.length>1?e("div",{staticClass:"sku-batch"},[e("span",{staticClass:"title"},[t._v("批量设置:")]),e("a-input-number",{attrs:{placeholder:"秒杀价格",min:.01,precision:2},model:{value:t.multiSpecData.skuBatchForm.seckill_price,callback:function(e){t.$set(t.multiSpecData.skuBatchForm,"seckill_price",e)},expression:"multiSpecData.skuBatchForm.seckill_price"}}),e("a-input-number",{attrs:{placeholder:"秒杀库存",min:0,precision:0},model:{value:t.multiSpecData.skuBatchForm.seckill_stock,callback:function(e){t.$set(t.multiSpecData.skuBatchForm,"seckill_stock",e)},expression:"multiSpecData.skuBatchForm.seckill_stock"}}),e("a-button",{on:{click:t.handleSkuBatch}},[t._v("立即设置")])],1):t._e(),e("a-table",{staticClass:"sku-list",attrs:{columns:t.multiSpecData.skuColumns,dataSource:t.multiSpecData.skuList,scroll:{x:!0},pagination:!1,bordered:""},scopedSlots:t._u([{key:"goods_sku_no",fn:function(a){return[e("span",[t._v(t._s(a||"--"))])]}},{key:"seckill_price",fn:function(a,r){return[e("a-input-number",{attrs:{size:"small",min:.01,precision:2},model:{value:r.seckill_price,callback:function(e){t.$set(r,"seckill_price",e)},expression:"item.seckill_price"}})]}},{key:"seckill_stock",fn:function(a,r){return[e("a-input-number",{attrs:{size:"small",min:0,precision:0},model:{value:r.seckill_stock,callback:function(e){t.$set(r,"seckill_stock",e)},expression:"item.seckill_stock"}})]}}])})],1)],1)},i=[],n=a("4d91"),o=a("5530"),s=a("d4ec"),l=a("bee2"),c=(a("d3b7"),a("159b"),a("a15b"),a("d81d"),a("99af"),a("7db0"),a("b64b"),a("a434"),a("b0c0"),a("2ef0")),u=a.n(c),d=a("ca00"),p=[{title:"SKU编码",dataIndex:"goods_sku_no",width:150,scopedSlots:{customRender:"goods_sku_no"}},{title:"商品价格",dataIndex:"goods_price",width:150,scopedSlots:{customRender:"goods_price"}},{title:"商品库存",dataIndex:"stock_num",width:150,scopedSlots:{customRender:"stock_num"}},{title:"秒杀价格",dataIndex:"seckill_price",width:150,scopedSlots:{customRender:"seckill_price"}},{title:"秒杀库存",dataIndex:"seckill_stock",width:150,scopedSlots:{customRender:"seckill_stock"}}],f={goods_sku_id:"",goods_sku_no:"",goods_price:"",stock_num:"",seckill_price:"",seckill_stock:""},m=function(){function t(){Object(s["a"])(this,t),this.multiSpecData={},this.error="",this.multiSpecData={specList:[],skuList:[],skuColumns:u.a.cloneDeep(p),skuBatchForm:u.a.cloneDeep(f)}}return Object(l["a"])(t,[{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];t.length&&(this.multiSpecData.specList=u.a.cloneDeep(t),this.multiSpecData.skuList=u.a.cloneDeep(e));var a=this.specGroupArr(),r=v(a),i=this.rowSpanArr(a,r);return this.buildSkuColumns(i),this.buildSkuList(r),this.multiSpecData}},{key:"isEmpty",value:function(){return 0===this.multiSpecData.specList.length}},{key:"getError",value:function(){return this.error}},{key:"specGroupArr",value:function(){var t=[];return this.multiSpecData.specList.forEach((function(e){var a=[];e.valueList.forEach((function(t){a.push(t)})),t.push(a)})),t}},{key:"rowSpanArr",value:function(t,e){for(var a=[],r=e.length,i=0;i<t.length;i++)a[i]=parseInt(r/t[i].length),r=a[i];return a}},{key:"buildSkuList",value:function(t){for(var e=[],a=function(){var a=Object(o["a"])(Object(o["a"])({},f),{},{key:r,skuKey:t[r].map((function(t){return t.key})).join("_"),skuKeys:t[r].map((function(t){return{groupKey:t.groupKey,valueKey:t.key}}))});t[r].forEach((function(t,e){a["spec_value_".concat(e)]=t.spec_value})),e.push(a)},r=0;r<t.length;r++)a();this.multiSpecData.skuList=this.
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
i=function(){return t};var t={},e=Object.prototype,a=e.hasOwnProperty,n=Object.defineProperty||function(t,e,a){t[e]=a.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(I){u=function(t,e,a){return t[e]=a}}function d(t,e,a,r){var i=e&&e.prototype instanceof m?e:m,o=Object.create(i.prototype),s=new O(r||[]);return n(o,"_invoke",{value:C(t,a,s)}),o}function p(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(I){return{type:"throw",arg:I}}}t.wrap=d;var f={};function m(){}function h(){}function v(){}var b={};u(b,s,(function(){return this}));var g=Object.getPrototypeOf,_=g&&g(g(j([])));_&&_!==e&&a.call(_,s)&&(b=_);var y=v.prototype=m.prototype=Object.create(b);function k(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function i(n,o,s,l){var c=p(t[n],t,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Object(r["a"])(d)&&a.call(d,"__await")?e.resolve(d.__await).then((function(t){i("next",t,s,l)}),(function(t){i("throw",t,s,l)})):e.resolve(d).then((function(t){u.value=t,s(u)}),(function(t){return i("throw",t,s,l)}))}l(c.arg)}var o;n(this,"_invoke",{value:function(t,a){function r(){return new e((function(e,r){i(t,a,e,r)}))}return o=o?o.then(r,r):r()}})}function C(t,e,a){var r="suspendedStart";return function(i,n){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw n;return D()}for(a.method=i,a.arg=n;;){var o=a.delegate;if(o){var s=S(o,a);if(s){if(s===f)continue;return s}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var l=p(t,e,a);if("normal"===l.type){if(r=a.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:a.done}}"throw"===l.type&&(r="completed",a.method="throw",a.arg=l.arg)}}}function S(t,e){var a=e.method,r=t.iterator[a];if(void 0===r)return e.delegate=null,"throw"===a&&t.iterator["return"]&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==a&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+a+"' method")),f;var i=p(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,f;var n=i.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function L(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function j(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(a.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:D}}function D(){return{value:void 0,done:!0}}return h.prototype=v,n(y,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:h,configurable:!0}),h.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},k(w.prototype),u(w.prototype,l,(function(){return this})),t.AsyncIterator=w,t.async=function(e,a,r,i,n){void 0===n&&(n=Promise);var o=new w(d(e,a,r,i),n);return t.isGeneratorFunction(a)?o:o.next().then((function(t){return t.done?t.val