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
155 KiB
3 lines
155 KiB
8 months ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["goods"],{"00a8":function(e,t,a){},"0151":function(e,t,a){},1788:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e._self._c;return t("a-card",{attrs:{bordered:!1}},[t("div",{staticClass:"card-title"},[e._v(e._s(e.$route.meta.title))]),t("div",{staticClass:"table-operator"},[t("a-row",{staticClass:"row-item-search"},[t("a-form",{staticClass:"search-form",attrs:{form:e.searchForm,layout:"inline"},on:{submit:e.handleSearch}},[t("a-form-item",{attrs:{label:"商品名称"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsName"],expression:"['goodsName']"}],attrs:{placeholder:"请输入商品名称"}})],1),t("a-form-item",{attrs:{label:"商品编码"}},[t("a-input",{directives:[{name:"decorator",rawName:"v-decorator",value:["goodsNo"],expression:"['goodsNo']"}],attrs:{placeholder:"请输入商品编码"}})],1),t("a-form-item",{attrs:{label:"商品分类"}},[t("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),t("a-form-item",{staticClass:"search-btn"},[t("a-button",{attrs:{type:"primary",icon:"search","html-type":"submit"}},[e._v("搜索")])],1)],1)],1),t("div",{staticClass:"row-item-tab clearfix"},[t("div",{staticClass:"tab-list fl-l"},[t("a-radio-group",{attrs:{defaultValue:e.queryParam.listType},on:{change:e.handleTabs}},[t("a-radio-button",{attrs:{value:"all"}},[e._v("全部")]),t("a-radio-button",{attrs:{value:"on_sale"}},[e._v("出售中")]),t("a-radio-button",{attrs:{value:"off_sale"}},[e._v("已下架")]),t("a-radio-button",{attrs:{value:"sold_out"}},[e._v("已售罄")])],1)],1),e.$auth("/goods/create")?t("a-button",{staticClass:"fl-l",attrs:{type:"primary",icon:"plus"},on:{click:function(t){return e.handleCreate()}}},[e._v("创建商品")]):e._e(),e.$module("goods-import")&&e.$auth("/goods/import/batch")?t("a-button",{staticClass:"fl-l",attrs:{icon:"arrow-up"},on:{click:function(t){return e.handleImport()}}},[e._v("批量导入")]):e._e(),e.selectedRowKeys.length?t("div",{staticClass:"button-group"},[t("a-button-group",{staticClass:"ml-10"},[t("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-up"},on:{click:function(t){return e.handleUpdateStatus(e.selectedRowKeys,!0)}}},[e._v("上架")]),t("a-button",{directives:[{name:"action",rawName:"v-action:status",arg:"status"}],attrs:{icon:"arrow-down"},on:{click:function(t){return e.handleUpdateStatus(e.selectedRowKeys,!1)}}},[e._v("下架")]),t("a-button",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],attrs:{icon:"delete"},on:{click:function(t){return e.handleDelete(e.selectedRowKeys)}}},[e._v("删除")])],1)],1):e._e()],1)],1),t("s-table",{ref:"table",attrs:{rowKey:"goods_id",loading:e.isLoading,columns:e.columns,data:e.loadData,rowSelection:e.rowSelection,pagination:e.pagination,scroll:{x:1450}},scopedSlots:e._u([{key:"goods_image",fn:function(e){return t("span",{},[t("a",{attrs:{title:"点击查看原图",href:e,target:"_blank"}},[t("img",{attrs:{width:"50",height:"50",src:e,alt:"商品图片"}})])])}},{key:"goods_name",fn:function(a){return t("span",{},[t("p",{staticClass:"twoline-hide",staticStyle:{width:"270px"}},[e._v(e._s(a))])])}},{key:"status",fn:function(a,r){return t("span",{},[t("a-tag",{staticClass:"cur-p",attrs:{color:10==a?"green":"red"},on:{click:function(t){return e.handleUpdateStatus([r.goods_id],10!=a)}}},[e._v(e._s(10==a?"上架":"下架"))])],1)}},{key:"action",fn:function(a,r){return t("div",{staticClass:"actions"},[e.$auth("/goods/update")?t("router-link",{attrs:{to:{path:"/goods/update",query:{goodsId:r.goods_id}}}},[e._v("编辑")]):e._e(),e.$module("goods-copy")&&e.$auth("/goods/copy")?t("router-link",{attrs:{to:{path:"/goods/copy",query:{goodsId:r.goods_id}}}},[e._v("复制")]):e._e(),t("a",{directives:[{name:"action",rawName:"v-action:delete",arg:"delete"}],on:
|
||
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||
|
i=function(){return t};var e,t={},a=Object.prototype,o=a.hasOwnProperty,s=Object.defineProperty||function(e,t,a){e[t]=a.value},l="function"==typeof Symbol?Symbol:{},n=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",d=l.toStringTag||"@@toStringTag";function c(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,a){return e[t]=a}}function m(e,t,a,r){var i=t&&t.prototype instanceof _?t:_,o=Object.create(i.prototype),l=new I(r||[]);return s(o,"_invoke",{value:q(e,a,l)}),o}function p(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=m;var v="suspendedStart",f="suspendedYield",h="executing",g="completed",b={};function _(){}function C(){}function w(){}var y={};c(y,n,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x($([])));L&&L!==a&&o.call(L,n)&&(y=L);var S=w.prototype=_.prototype=Object.create(y);function k(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function V(e,t){function a(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")?t.resolve(c.__await).then((function(e){a("next",e,l,n)}),(function(e){a("throw",e,l,n)})):t.resolve(c).then((function(e){d.value=e,l(d)}),(function(e){return a("throw",e,l,n)}))}n(u.arg)}var i;s(this,"_invoke",{value:function(e,r){function o(){return new t((function(t,i){a(e,r,t,i)}))}return i=i?i.then(o,o):o()}})}function q(t,a,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===b)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(t,a,r);if("normal"===u.type){if(i=r.done?g:f,u.arg===b)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=g,r.method="throw",r.arg=u.arg)}}}function N(t,a){var r=a.method,i=t.iterator[r];if(i===e)return a.delegate=null,"throw"===r&&t.iterator["return"]&&(a.method="return",a.arg=e,N(t,a),"throw"===a.method)||"return"!==r&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+r+"' method")),b;var o=p(i,t.iterator,a.arg);if("throw"===o.type)return a.method="throw",a.arg=o.arg,a.delegate=null,b;var s=o.arg;return s?s.done?(a[t.resultName]=s.value,a.next=t.nextLoc,"return"!==a.method&&(a.method="next",a.arg=e),a.delegate=null,b):s:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,b)}function F(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(F,this),this.reset(!0)}function $(t){if(t||""===t){var a=t[n];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,s=function a(){for(;++i<t.length;)if(o.call(t,i))return a.value=t[i],a.done=!1,a;return a.value=e,a.done=!0,a};return s.next=s}}throw new TypeError(Object(r["a"])(t)+" is not iterable")}return C.prototype=w,s(S,"constructor",{value:w,configurable:!0}),s(w,"constructor",{value:C,configurable:!0}),C.displayName=c(w,d,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,c(e,d,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},k(V.prototype),c(V.prototype,u,(function(){return this})),t.AsyncIterator=V,t.async=function(e,a,r,i,o){void 0===o&&(o=Promise);var s=new V(m(e,a,r,i),o);return t.isGeneratorFunction(a)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},k(S),c(S,d,"Generat
|