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/goods.3b488fea.js

3 lines
149 KiB

8 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["goods"],{"0151":function(e,a,t){},"0c5a":function(e,a,t){},1788:function(e,a,t){"use strict";t.r(a);var r=function(){var e=this,a=e._self._c;return a("a-card",{attrs:{bordered:!1}},[a("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),a("div",{staticClass:"table-operator"},[a("a-row",{staticClass:"row-item-search"},[a("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[a("a-form-item",{attrs:{label:"商品名称"}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsName"],expression:"['goodsName']"}],attrs:{placeholder:"请输入商品名称"}})],1),a("a-form-item",{attrs:{label:"商品编码"}},[a("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsNo"],expression:"['goodsNo']"}],attrs:{placeholder:"请输入商品编码"}})],1),a("a-form-item",{attrs:{label:"商品分类"}},[a("a-tree-select",{directives:[{name:"decorator",rawName:"v-decorator",value:["categoryId",{initialValue:0}],expression:"['categoryId', { initialValue: 0 }]"}],attrs:{treeData:e.categoryListTree,dropdownStyle:{maxHeight:"500px",overflow:"auto"},allowClear:""}})],1),a("a-form-item",{staticClass:"search-btn"},[a("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),a("div",{staticClass:"row-item-tab clearfix"},[a("div",{staticClass:"tab-list fl-l"},[a("a-radio-group",{attrs:{defaultValue:e.queryParam.listType},on:{change:e.handleTabs}},[a("a-radio-button",{attrs:{value:"all"}},[e._v("全部")]),a("a-radio-button",{attrs:{value:"on_sale"}},[e._v("出售中")]),a("a-radio-button",{attrs:{value:"off_sale"}},[e._v("已下架")]),a("a-radio-button",{attrs:{value:"sold_out"}},[e._v("已售罄")])],1)],1),e.$auth("/goods/create")?a("a-button",{staticClass:"fl-l",attrs:{type:"primary",icon:"plus"},on:{click:function(a){return e.handleCreate()}}},[e._v("创建商品")]):e._e(),e.$module("goods-import")&&e.$auth("/goods/import/batch")?a("a-button",{staticClass:"fl-l",attrs:{icon:"arrow-up"},on:{click:function(a){return e.handleImport()}}},[e._v("批量导入")]):e._e(),e.selectedRowKeys.length?a("div",{staticClass:"button-group"},[a("a-button-group",{staticClass:"ml-10"},[a("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-up"},on:{click:function(a){return e.handleUpdateStatus(e.selectedRowKeys,!0)}}},[e._v("上架")]),a("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-down"},on:{click:function(a){return e.handleUpdateStatus(e.selectedRowKeys,!1)}}},[e._v("下架")]),a("a-button",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],attrs:{icon:"delete"},on:{click:function(a){return e.handleDelete(e.selectedRowKeys)}}},[e._v("删除")])],1)],1):e._e()],1)],1),a("s-table",{ref:"table",attrs:{rowKey:"goods_id",loading:e.isLoading,columns:e.columns,data:e.loadData,rowSelection:e.rowSelection,pageSize:15,pagination:e.pagination,scroll:{x:1450}},scopedSlots:e._u([{key:"goods_image",fn:function(e){return a("span",{},[a("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[a("img",{attrs:{width:"50",height:"50",src:e,alt:"商品图片"}})])])}},{key:"goods_name",fn:function(t){return a("span",{},[a("p",{staticClass:"twoline-hide",staticStyle:{width:"270px"}},[e._v(e._s(t))])])}},{key:"status",fn:function(t,r){return a("span",{},[a("a-tag",{staticClass:"cur-p",attrs:{color:10==t?"green":"red"},on:{click:function(a){return e.handleUpdateStatus([r.goods_id],10!=t)}}},[e._v(e._s(10==t?"上架":"下架"))])],1)}},{key:"action",fn:function(t,r){return a("div",{staticClass:"actions"},[e.$auth("/goods/update")?a("router-link",{attrs:{to:{path:"/goods/update",query:{goodsId:r.goods_id}}}},[e._v("编辑")]):e._e(),e.$module("goods-copy")&&e.$auth("/goods/copy")?a("router-link",{attrs:{to:{path:"/goods/copy",query:{goodsId:r.goods_id}}}},[e._v("复制")]):e._e(),a("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"d
/*! 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",u=l.asyncIterator||"@@asyncIterator",d=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 m(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:q(e,t,l)}),o}function p(e,a,t){try{return{type:"normal",arg:e.call(a,t)}}catch(e){return{type:"throw",arg:e}}}a.wrap=m;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,S=x&&x(x($([])));S&&S!==t&&o.call(S,n)&&(y=S);var L=w.prototype=b.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(a){c(e,a,(function(e){return this._invoke(a,e)}))}))}function V(e,a){function t(i,s,l,n){var u=p(e[i],e,s);if("throw"!==u.type){var d=u.arg,c=d.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){d.value=e,l(d)}),(function(e){return t("throw",e,l,n)}))}n(u.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 q(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 u=p(a,t,r);if("normal"===u.type){if(i=r.done?g:f,u.arg===_)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=g,r.method="throw",r.arg=u.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=p(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(L,"constructor",{value:w,configurable:!0}),s(w,"constructor",{value:C,configurable:!0}),C.displayName=c(w,d,"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,d,"GeneratorFunction")),e.prototype=Object.create(L),e},a.awrap=function(e){return{__await:e}},k(V.prototype),c(V.prototype,u,(function(){return this})),a.AsyncIterator=V,a.async=function(e,t,r,i,o){void 0===o&&(o=Promise);var s=new V(m(e,t,r,i),o);return a.isGeneratorFunction(t)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},k(L),c(L,d,"Generat