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.
1 lines
7.4 KiB
1 lines
7.4 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3643f555"],{"6b68":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-container"},[e("div",{staticClass:"main-content"},[e("el-card",{staticClass:"filter-container",attrs:{shadow:"never"}},[e("div",[e("i",{staticClass:"el-icon-search"}),e("span",[t._v("筛选搜索")]),e("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",size:"small"},on:{click:function(e){return t.searchBrandList()}}},[t._v(" 查询结果 ")])],1),e("div",{staticStyle:{"margin-top":"15px"}},[e("el-form",{attrs:{inline:!0,model:t.queryParams,size:"small","label-width":"140px"}},[e("el-form-item",{attrs:{label:"输入搜索:"}},[e("el-input",{staticStyle:{width:"203px"},attrs:{placeholder:"名称/关键字"},model:{value:t.queryParams.params.name,callback:function(e){t.$set(t.queryParams.params,"name",e)},expression:"queryParams.params.name"}})],1)],1)],1)]),e("el-card",{staticClass:"operate-container",attrs:{shadow:"never"}},[e("i",{staticClass:"el-icon-tickets",staticStyle:{"margin-top":"5px"}}),e("span",{staticStyle:{"margin-top":"5px"}},[t._v("数据列表")]),e("el-button",{staticClass:"btn-add",attrs:{size:"mini"},on:{click:function(e){return t.handleAddProductCate()}}},[t._v(" 添加 ")])],1),e("div",{staticClass:"table-container"},[e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"productCateTable",staticStyle:{width:"100%"},attrs:{data:t.list,border:""}},[e("el-table-column",{attrs:{label:"序号",width:"100",type:"index",index:t.index+1,align:"center"}}),e("el-table-column",{attrs:{label:"分类名称",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(t._s(e.row.name))]}}])}),e("el-table-column",{attrs:{label:"是否显示",width:"100",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:function(e){return t.handleShowStatusChange(a.$index,a.row)}},model:{value:a.row.showStatus,callback:function(e){t.$set(a.row,"showStatus",e)},expression:"scope.row.showStatus"}})]}}])}),e("el-table-column",{attrs:{label:"操作",width:"200",align:"center"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.handleUpdate(a.$index,a.row)}}},[t._v("编辑 ")]),e("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(e){return t.handleDelete(a.$index,a.row)}}},[t._v("删除 ")])]}}])})],1)],1),e("div",{staticClass:"pagination-container"},[e("el-pagination",{attrs:{background:"",layout:"total, sizes,prev, pager, next,jumper","page-size":t.queryParams.size,"page-sizes":[5,10,15],"current-page":t.queryParams.current,total:t.queryParams.total},on:{"update:currentPage":function(e){return t.$set(t.queryParams,"current",e)},"update:current-page":function(e){return t.$set(t.queryParams,"current",e)},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)])},r=[],s=a("d1f3"),i={name:"ProductCateList",filters:{levelFilter:function(t){return 0===t?"一级":1===t?"二级":void 0},disableNextLevel:function(t){return 0!==t}},data:function(){return{list:null,total:null,listLoading:!0,listQuery:{pageNum:1,pageSize:5},queryParams:{current:1,size:10,total:0,params:{name:"",menuUrl:"",orgPath:"",userSid:""}},parentId:0,index:0}},watch:{$route:function(t){this.resetParentId(),this.getList()}},created:function(){this.resetParentId(),this.getList()},methods:{resetParentId:function(){console.log("parentId>>>",this.$route.query.parentId),null!=this.$route.query.parentId?this.parentId=this.$route.query.parentId:this.parentId=0},handleAddProductCate:function(){this.$router.push({path:"/pms/addProductCate"})},getList:function(){var t=this;this.listLoading=!0,console.log("parentId>>>",this.parentId),console.log("listQuery>>>",this.listQuery),this.queryParams.params.userSid=window.sessionStorage.getItem("userSid"),this.queryParams.params.orgPath=window.sessionStorage.getItem("orgSidPath"),this.queryParams.params.menuUrl=this.$route.path,Object(s["d"])(this.queryParams).then((function(e){t.listLoading=!1,console.log("list>>>",e.records),t.list=e.data.records,t.queryParams.total=e.data.total}))},handleSizeChange:function(t){this.queryParams.current=1,this.queryParams.size=t,this.getList()},handleCurrentChange:function(t){this.queryParams.current=t,this.getList()},searchBrandList:function(){this.queryParams.current=1,this.getList()},handleNavStatusChange:function(t,e){var a=this,n=new URLSearchParams,r=[];r.push(e.sid),n.append("ids",r),n.append("navStatus",e.navStatus),Object(s["h"])(n).then((function(t){t.success&&a.$message({message:"修改成功",type:"success",duration:1e3})}))},handleShowStatusChange:function(t,e){var a=this,n=new URLSearchParams,r=[];r.push(e.sid),n.append("sid",r),n.append("showStatus",e.showStatus),Object(s["j"])(n).then((function(t){t.success&&a.$message({message:"修改成功",type:"success",duration:1e3})}))},handleIndexStatusChange:function(t,e){var a=this,n=new URLSearchParams,r=[];r.push(e.sid),n.append("ids",r),n.append("indexStatus",e.indexStatus),Object(s["g"])(n).then((function(t){t.success&&a.$message({message:"修改成功",type:"success",duration:1e3})}))},handleShowNextLevel:function(t,e){this.listQuery={pageNum:1,pageSize:5},this.$router.push({path:"/pms/productCate",query:{parentId:e.sid}})},handleTransferProduct:function(t,e){console.log("handleAddProductCate")},handleUpdate:function(t,e){console.log("handleUpdate",e.sid),this.$router.push({path:"/pms/updateProductCate",query:{sid:e.sid}})},handleDelete:function(t,e){var a=this;this.$confirm("是否要删除该分类","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(s["b"])([e.sid]).then((function(t){t.success&&(a.$message({message:"删除成功",type:"success",duration:1e3}),a.getList())}))}))}}},u=i,o=a("2877"),c=Object(o["a"])(u,n,r,!1,null,"0814f776",null);e["default"]=c.exports},d1f3:function(t,e,a){"use strict";a.d(e,"d",(function(){return r})),a.d(e,"c",(function(){return s})),a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return u})),a.d(e,"i",(function(){return o})),a.d(e,"f",(function(){return c})),a.d(e,"j",(function(){return l})),a.d(e,"g",(function(){return d})),a.d(e,"h",(function(){return h})),a.d(e,"e",(function(){return p}));var n=a("b775");function r(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/list",method:"post",data:t})}function s(t,e){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/list/"+t,method:"get",params:e})}function i(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/delete",method:"DELETE",data:t,headers:{"Content-Type":"application/json"}})}function u(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/create",method:"post",data:t})}function o(t,e){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/update/"+t,method:"post",data:e})}function c(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/"+t,method:"get"})}function l(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/update/showStatus",method:"post",data:t})}function d(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/update/indexStatus",method:"post",data:t})}function h(t){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/update/navStatus",method:"post",data:t})}function p(){return Object(n["a"])({url:"/mall/pms/PmsProductCategory/list/withChildren",method:"get"})}}}]);
|