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.
3 lines
198 KiB
3 lines
198 KiB
7 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["goods"],{"0151":function(e,a,t){},"0391":function(e,a,t){"use strict";t("3a9b66")},"05b9":function(e,a,t){"use strict";t.r(a);t("b0c0");var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[a("span",[e._v(e._s(e.$route.meta.pageTitle))])]),a("a-spin",{attrs:{spinning:e.isLoading}},[a("div",{staticClass:"container"},[a("div",{staticClass:"upload-dragger"},[a("a-upload-dragger",{attrs:{accept:".xls, .xlsx",multiple:!1,fileList:e.fileList,showUploadList:!1,beforeUpload:e.beforeUpload,remove:e.handleRemove}},[a("p",{staticClass:"ant-upload-drag-icon"},[a("a-icon",{attrs:{type:"cloud-upload"}})],1),e.fileList.length?a("div",[a("p",{staticClass:"ant-upload-text"},[a("span",[e._v(e._s(e.fileList[0].name))]),a("a",{staticClass:"ml-10",attrs:{href:"javascript:void(0);"},on:{click:function(a){return a.stopPropagation(),e.handleRemove(e.fileList[0])}}},[e._v("删除")])]),a("a-button",{staticClass:"mt-20",attrs:{type:"primary"},on:{click:function(a){return a.stopPropagation(),e.onFormSubmit.apply(null,arguments)}}},[e._v("立即导入")])],1):a("div",[a("p",{staticClass:"ant-upload-text"},[e._v("点击选择文件,或者将文件拖拽至此区域")]),a("p",{staticClass:"ant-upload-hint"},[e._v("仅支持.xls, .xlsx 格式的excel文件,限2M以内")])])])],1),a("div",{staticClass:"import-explain"},[a("h2",{staticClass:"title"},[e._v("导入说明")]),a("a-timeline",{staticClass:"timeline"},[a("a-timeline-item",{staticClass:"timeline-item"},[a("p",{staticClass:"name"},[e._v("使用模板")]),a("ul",{staticClass:"content"},[a("li",{staticClass:"content-li"},[a("span",[e._v("模板中最多不能超过500个商品,如超过500个商品,请分批导入")])]),a("li",{staticClass:"content-li"},[a("span",[e._v("模板中的字段含义以及填写规则,可查看模板文件中标题栏的标注")])])])])],1)],1),a("FilesModal",{ref:"FilesModal",attrs:{multiple:!0,maxNum:10,actions:["delete","move","copyIds"]}})],1)])],1)},i=[],o=(t("a434"),t("d3b7"),t("d084")),s=t("fd0d"),l={components:{FilesModal:s["e"]},data:function(){return{isLoading:!1,fileList:[],uploadSizeLimit:"2"}},created:function(){},methods:{handleSelectImage:function(){this.$refs.FilesModal.show()},beforeUpload:function(e){var a=e.size/1024/1024;return a>this.uploadSizeLimit?(this.$message.error("上传的文件大小不能超出".concat(this.uploadSizeLimit,"MB")),!1):(this.fileList=[e],!1)},handleRemove:function(e){var a=this.fileList,t=a.indexOf(e);t>-1&&a.splice(t,1)},onFormSubmit:function(){var e=this,a=this.fileList,t=new FormData;t.append("file",a[0]),this.isLoading=!0,o["f"](t).then((function(a){e.fileList=[],e.$message.success(a.message,1.8),setTimeout((function(){return e.$router.push("/goods/import/list")}),1500)})).finally((function(){return e.isLoading=!1}))}}},n=l,d=(t("3a44"),t("2877")),u=Object(d["a"])(n,r,i,!1,null,"7e6aec77",null);a["default"]=u.exports},"0d03":function(e,a,t){"use strict";t("dff8")},"11fa":function(e,a,t){"use strict";var r=function(){var e=this,a=e._self._c;return a("div",{staticClass:"goods-type"},e._l(e.list,(function(t,r){return a("div",{directives:[{name:"show",rawName:"v-show",value:!e.onlyShowChecked||e.value==t.value,expression:"!onlyShowChecked || value == item.value"}],key:r,staticClass:"type-item",class:{checked:e.value==t.value},on:{click:function(a){return e.handleItem(t.value)}}},[a("div",{staticClass:"type-title"},[e._v(e._s(t.title))]),a("div",{staticClass:"type-help"},[e._v(e._s(t.help))]),e.value==t.value?a("a-icon",{staticClass:"icon-checked",attrs:{type:"check"}}):e._e()],1)})),0)},i=[],o=(t("b0c0"),t("4d91")),s=t("59aa"),l={name:"GoodsType",model:{prop:"value",event:"change"},props:{value:o["a"].any,onlyShowChecked:o["a"].bool.def(!1)},data:function(){return{defaultValue:s["b"].PHYSICAL.value,list:[{title:s["b"].PHYSICAL.name,help:"物流发货",value:s["b"].PHYSICAL.value},{title:s["b"].VIRTUAL.name,help:"无需物流",value:s["b"].VIRTUAL.value}]}},methods:{handleItem:function(e){thi
|
||
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
|
i=function(){return a};var e,a={},t=Object.prototype,o=t.hasOwnProperty,s=Object.defineProperty||function(e,a,t){e[a]=t.value},l="function"==typeof Symbol?Symbol:{},n=l.iterator||"@@iterator",d=l.asyncIterator||"@@asyncIterator",u=l.toStringTag||"@@toStringTag";function c(e,a,t){return Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[a]}try{c({},"")}catch(e){c=function(e,a,t){return e[a]=t}}function p(e,a,t,r){var i=a&&a.prototype instanceof b?a:b,o=Object.create(i.prototype),l=new I(r||[]);return s(o,"_invoke",{value:V(e,t,l)}),o}function m(e,a,t){try{return{type:"normal",arg:e.call(a,t)}}catch(e){return{type:"throw",arg:e}}}a.wrap=p;var v="suspendedStart",f="suspendedYield",h="executing",g="completed",_={};function b(){}function C(){}function w(){}var y={};c(y,n,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x($([])));L&&L!==t&&o.call(L,n)&&(y=L);var k=w.prototype=b.prototype=Object.create(y);function S(e){["next","throw","return"].forEach((function(a){c(e,a,(function(e){return this._invoke(a,e)}))}))}function q(e,a){function t(i,s,l,n){var d=m(e[i],e,s);if("throw"!==d.type){var u=d.arg,c=u.value;return c&&"object"==Object(r["a"])(c)&&o.call(c,"__await")?a.resolve(c.__await).then((function(e){t("next",e,l,n)}),(function(e){t("throw",e,l,n)})):a.resolve(c).then((function(e){u.value=e,l(u)}),(function(e){return t("throw",e,l,n)}))}n(d.arg)}var i;s(this,"_invoke",{value:function(e,r){function o(){return new a((function(a,i){t(e,r,a,i)}))}return i=i?i.then(o,o):o()}})}function V(a,t,r){var i=v;return function(o,s){if(i===h)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw s;return{value:e,done:!0}}for(r.method=o,r.arg=s;;){var l=r.delegate;if(l){var n=N(l,r);if(n){if(n===_)continue;return n}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===v)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var d=m(a,t,r);if("normal"===d.type){if(i=r.done?g:f,d.arg===_)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(i=g,r.method="throw",r.arg=d.arg)}}}function N(a,t){var r=t.method,i=a.iterator[r];if(i===e)return t.delegate=null,"throw"===r&&a.iterator["return"]&&(t.method="return",t.arg=e,N(a,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),_;var o=m(i,a.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,_;var s=o.arg;return s?s.done?(t[a.resultName]=s.value,t.next=a.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,_):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,_)}function F(e){var a={tryLoc:e[0]};1 in e&&(a.catchLoc=e[1]),2 in e&&(a.finallyLoc=e[2],a.afterLoc=e[3]),this.tryEntries.push(a)}function D(e){var a=e.completion||{};a.type="normal",delete a.arg,e.completion=a}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function $(a){if(a||""===a){var t=a[n];if(t)return t.call(a);if("function"==typeof a.next)return a;if(!isNaN(a.length)){var i=-1,s=function t(){for(;++i<a.length;)if(o.call(a,i))return t.value=a[i],t.done=!1,t;return t.value=e,t.done=!0,t};return s.next=s}}throw new TypeError(Object(r["a"])(a)+" is not iterable")}return C.prototype=w,s(k,"constructor",{value:w,configurable:!0}),s(w,"constructor",{value:C,configurable:!0}),C.displayName=c(w,u,"GeneratorFunction"),a.isGeneratorFunction=function(e){var a="function"==typeof e&&e.constructor;return!!a&&(a===C||"GeneratorFunction"===(a.displayName||a.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,u,"GeneratorFunction")),e.prototype=Object.create(k),e},a.awrap=function(e){return{__await:e}},S(q.prototype),c(q.prototype,d,(function(){return this})),a.AsyncIterator=q,a.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var s=new q(p(e,t,r,i),o);return a.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},S(k),c(k,u,"Generat
|