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.69355d87.js

1 line
140 KiB

9 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["goods"],{"03eb":function(e,a,t){},"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:[{nam