erp/public/dist/js/984.afbbd0d9.js

2 lines
5.0 KiB
JavaScript
Raw Permalink Normal View History

2024-08-19 16:55:32 +08:00
"use strict";(self["webpackChunkerp"]=self["webpackChunkerp"]||[]).push([[984],{9851:function(t,e,a){a.r(e),a.d(e,{default:function(){return u}});var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"pageBox"},[e("el-card",[e("div",{staticClass:"opaBox"},[e("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:t.handAdd}},[t._v("新增")])],1),e("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{border:"",data:t.tableData,"tooltip-effect":"dark"},on:{"selection-change":t.handleSelectionChange}},[e("el-table-column",{attrs:{prop:"name",label:"商品品牌"}}),e("el-table-column",{attrs:{prop:"",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.handEdit(a.row.id,a.row)}}},[t._v("编辑")]),e("el-button",{attrs:{type:"danger"},on:{click:function(e){return t.handdel(a.row.id)}}},[t._v("删除")])]}}])})],1),e("div",{staticClass:"page-pagination"},[e("el-pagination",{attrs:{"current-page":t.current_page,"page-sizes":[15,50,100],"page-size":t.per_page,layout:"total, sizes, prev, pager, next, jumper",total:t.Paginationdata.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1),e("el-dialog",{attrs:{title:"新增品牌",visible:t.dialogFormVisible,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[e("el-form",{attrs:{model:t.form}},[e("el-form-item",{attrs:{label:"商品品牌","label-width":t.formLabelWidth}},[e("el-input",{model:{value:t.form.kindName,callback:function(e){t.$set(t.form,"kindName",e)},expression:"form.kindName"}})],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.addSubmit}},[t._v("确 定")])],1)],1),e("el-dialog",{attrs:{title:"编辑",visible:t.dialogFormVisible1,"close-on-click-modal":!1},on:{"update:visible":function(e){t.dialogFormVisible1=e}}},[e("el-form",{attrs:{model:t.form1}},[e("el-form-item",{attrs:{label:"编辑品牌","label-width":t.formLabelWidth1}},[e("el-input",{model:{value:t.form1.kindName1,callback:function(e){t.$set(t.form1,"kindName1",e)},expression:"form1.kindName1"}})],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.dialogFormVisible1=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.EditSubmit}},[t._v("确 定")])],1)],1)],1)},o=[],n=a(2346),r={data(){return{id:"",tableData:[],multipleSelection:[],dialogFormVisible:!1,dialogFormVisible1:!1,form:{kindName:""},form1:{kindName1:""},formLabelWidth:"120px",formLabelWidth1:"120px",newKind:[],Paginationdata:{},current_page:1,per_page:15}},created(){this.getGoods_types()},methods:{handleSelectionChange(t){this.multipleSelection=t},handleSizeChange(t){this.per_page=t,this.getGoods_types()},handleCurrentChange(t){this.current_page=t,this.getGoods_types()},handAdd(){this.form.kindName="",this.dialogFormVisible=!0},addSubmit(){var t;t=this.form.kindName.replace(/\s/g,",").split(","),(0,n.Mr)({names:t}).then((t=>{this.$message({type:"success",message:"添加成功"}),this.getGoods_types()})),this.dialogFormVisible=!1},handEdit(t,e){this.id=t,this.form1.kindName1=e.name,this.dialogFormVisible1=!0},EditSubmit(){(0,n.yq)(this.id,{name:this.form1.kindName1}).then((t=>{this.$message({type:"success",message:"编辑成功"}),this.getGoods_types()})),this.dialogFormVisible1=!1},handdel(t){this.$confirm("确定删除此条商品品牌吗?","确认删除",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((()=>{(0,n.e9)(t).then((t=>{this.getGoods_types()})),this.$message({type:"success",message:"删除成功!"})})).catch((()=>{this.$message({type:"info",message:"已取消删除"})}))},getGoods_types(){let t={page:this.current_page,per_page:this.per_page};(0,n.ar)(t).then((t=>{this.tableData=t.data.data,this.Paginationdata=t.data.meta}))}}},s=r,l=a(1001),d=(0,l.Z)(s,i,o,!
//# sourceMappingURL=984.afbbd0d9.js.map