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