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/sharp.d1d4d40c.js

3 lines
51 KiB

1 month ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["sharp"],{"074e":function(t,e,a){},"07c4":function(t,e,a){},"130c":function(t,e,a){"use strict";a("074e")},"1bdd":function(t,e,a){"use strict";a.d(e,"a",(function(){return C}));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("99af"),a("7db0"),a("a15b"),a("d81d"),a("a434"),a("b0c0"),a("b64b"),a("d3b7"),a("159b"),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
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
i=function(){return e};var t,e={},a=Object.prototype,n=a.hasOwnProperty,o=Object.defineProperty||function(t,e,a){t[e]=a.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function d(t,e,a){return Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{d({},"")}catch(t){d=function(t,e,a){return t[e]=a}}function p(t,e,a,r){var i=e&&e.prototype instanceof _?e:_,n=Object.create(i.prototype),s=new $(r||[]);return o(n,"_invoke",{value:j(t,a,s)}),n}function f(t,e,a){try{return{type:"normal",arg:t.call(e,a)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var m="suspendedStart",h="suspendedYield",v="executing",b="completed",g={};function _(){}function y(){}function C(){}var k={};d(k,l,(function(){return this}));var w=Object.getPrototypeOf,S=w&&w(w(F([])));S&&S!==a&&n.call(S,l)&&(k=S);var L=C.prototype=_.prototype=Object.create(k);function x(t){["next","throw","return"].forEach((function(e){d(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function a(i,o,s,l){var c=f(t[i],t,o);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Object(r["a"])(d)&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){a("next",t,s,l)}),(function(t){a("throw",t,s,l)})):e.resolve(d).then((function(t){u.value=t,s(u)}),(function(t){return a("throw",t,s,l)}))}l(c.arg)}var i;o(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,i){a(t,r,e,i)}))}return i=i?i.then(n,n):n()}})}function j(e,a,r){var i=m;return function(n,o){if(i===v)throw Error("Generator is already running");if(i===b){if("throw"===n)throw o;return{value:t,done:!0}}for(r.method=n,r.arg=o;;){var s=r.delegate;if(s){var l=D(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===m)throw i=b,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var c=f(e,a,r);if("normal"===c.type){if(i=r.done?b:h,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=b,r.method="throw",r.arg=c.arg)}}}function D(e,a){var r=a.method,i=e.iterator[r];if(i===t)return a.delegate=null,"throw"===r&&e.iterator["return"]&&(a.method="return",a.arg=t,D(e,a),"throw"===a.method)||"return"!==r&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var n=f(i,e.iterator,a.arg);if("throw"===n.type)return a.method="throw",a.arg=n.arg,a.delegate=null,g;var o=n.arg;return o?o.done?(a[e.resultName]=o.value,a.next=e.nextLoc,"return"!==a.method&&(a.method="next",a.arg=t),a.delegate=null,g):o:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,g)}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 q(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function F(e){if(e||""===e){var a=e[l];if(a)return a.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function a(){for(;++i<e.length;)if(n.call(e,i))return a.value=e[i],a.done=!1,a;return a.value=t,a.done=!0,a};return o.next=o}}throw new TypeError(Object(r["a"])(e)+" is not iterable")}return y.prototype=C,o(L,"constructor",{value:C,configurable:!0}),o(C,"constructor",{value:y,configurable:!0}),y.displayName=d(C,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,C):(t.__proto__=C,d(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},x(O.prototype),d(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,a,r,i,n){void 0===n&&(n=Promise);var o=new O(p(t,a,r,i),n);return e.isGeneratorFunction(a)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},x(L),d(L,u,"Generator")