Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-4f690157.d6ed1881.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
22 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4f690157"],{"0c41":function(t,e,o){},"0e8e":function(t,e,o){"use strict";o("d605")},"254b":function(t,e,o){"use strict";var a=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:"选择商品",visible:t.dialogVisible,width:"80%",top:"5vh"},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("div",{staticClass:"filter-container"},[e("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"输入商品信息名称",clearable:""},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.handleFilter.apply(null,arguments)}},model:{value:t.searchQuery,callback:function(e){t.searchQuery=e},expression:"searchQuery"}}),e("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:t.handleFilter}},[t._v(" 查询 ")])],1),e("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.products,border:""}},[e("el-table-column",{attrs:{prop:"productId",label:"商品编号",align:"center"}}),e("el-table-column",{attrs:{prop:"categoryName",label:"商品大类",align:"center"}}),e("el-table-column",{attrs:{label:"商品图片",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("el-image",{staticStyle:{width:"60px",height:"60px","border-radius":"5px"},attrs:{src:t.row.coverPhoto,fit:"cover"}})]}}])}),e("el-table-column",{attrs:{prop:"prodName",label:"商品名称",align:"center"}}),e("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(e){return t.handleChoose(o.row)}}},[t._v(" 选择 ")])]}}])})],1),e("div",{staticClass:"pagination-container"},[e("el-pagination",{attrs:{"current-page":t.currentPage,"page-sizes":[10,20,30,50],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1)},r=[],l=o("2a7f"),s={name:"ChooseProduct",data(){return{dialogVisible:!1,products:[],searchQuery:"",currentPage:1,pageSize:10,total:0}},methods:{open(){this.dialogVisible=!0,this.getProducts()},async getProducts(){try{const t={page:this.currentPage,row:this.pageSize,name:this.searchQuery},e=await Object(l["d"])(t);this.products=e.data,this.total=e.total}catch(t){console.error("获取商品列表失败:",t)}},handleFilter(){this.currentPage=1,this.getProducts()},handleSizeChange(t){this.pageSize=t,this.getProducts()},handleCurrentChange(t){this.currentPage=t,this.getProducts()},handleChoose(t){this.$emit("choose",t),this.dialogVisible=!1}}},c=s,n=(o("640c"),o("2877")),i=Object(n["a"])(c,a,r,!1,null,"51309485",null);e["a"]=i.exports},"2a7f":function(t,e,o){"use strict";o.d(e,"c",(function(){return l})),o.d(e,"d",(function(){return s})),o.d(e,"b",(function(){return c})),o.d(e,"e",(function(){return n})),o.d(e,"f",(function(){return i})),o.d(e,"a",(function(){return u}));var a=o("b775"),r=o("7323");function l(t){return new Promise((e,o)=>{Object(a["a"])({url:"/groupBuy/queryGroupBuyProduct",method:"get",params:{...t,shopId:Object(r["f"])()}}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function s(t){return new Promise((e,o)=>{Object(a["a"])({url:"/product.queryProduct",method:"get",params:t}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function c(t){return new Promise((e,o)=>{Object(a["a"])({url:"/groupBuy/queryGroupBuyProduct",method:"get",params:{...t,shopId:Object(r["f"])()}}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function n(t){return new Promise((e,o)=>{Object(a["a"])({url:"/groupBuy/saveGroupBuyProduct",method:"post",data:{...t,shopId:Object(r["f"])()}}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function i(t){return new Promise((e,o)=>{Object(a["a"])({url:"/groupBuy/updateGroupBuyProduct",method:"post",data:{...t,shopId:Object(r["f"])()}}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function u(t){return new Promise((e,o)=>{Object(a["a"])({url:"/groupBuy/deleteGroupBuyProduct",method:"post",data:{...t,shopId:Object(r["f"])()}}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}},"2d7a":function(t,e,o){"use strict";o("0c41")},4241:function(t,e,o){"use strict";o("7afa")},"640c":function(t,e,o){"use strict";o("c395")},"7afa":function(t,e,o){},"7c94":function(t,e,o){},"85e9":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t._self._c;return e("div",["groupBuyProductManage"===t.componentShow?e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("查询条件")])]),e("div",{staticClass:"card-body"},[e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:6}},[e("el-input",{attrs:{placeholder:"请输入商品名称",clearable:""},model:{value:t.conditions.prodName,callback:function(e){t.$set(t.conditions,"prodName",e)},expression:"conditions.prodName"}})],1),e("el-col",{attrs:{span:8}},[e("el-input",{attrs:{placeholder:"请输入关键字",clearable:""},model:{value:t.conditions.keyword,callback:function(e){t.$set(t.conditions,"keyword",e)},expression:"conditions.keyword"}})],1),e("el-col",{attrs:{span:6}},[e("el-input",{attrs:{placeholder:"请输入产品条码",clearable:""},model:{value:t.conditions.barCode,callback:function(e){t.$set(t.conditions,"barCode",e)},expression:"conditions.barCode"}})],1),e("el-col",{attrs:{span:4}},[e("el-button",{attrs:{type:"primary"},on:{click:t.queryProductMethod}},[e("i",{staticClass:"el-icon-search"}),t._v(" 查询 ")]),e("el-button",{on:{click:t.resetProductMethod}},[e("i",{staticClass:"el-icon-refresh"}),t._v(" 重置 ")])],1)],1)],1)])],1)],1):t._e(),"groupBuyProductManage"===t.componentShow?e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("拼团商品")]),e("div",{staticStyle:{float:"right"}},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.openAddProductModal}},[e("i",{staticClass:"el-icon-plus"}),t._v("添加 ")])],1)]),e("div",{staticClass:"card-body"},[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.products,border:""}},[e("el-table-column",{attrs:{prop:"batchId",label:"当前批次",align:"center"}}),e("el-table-column",{attrs:{prop:"productId",label:"商品ID",align:"center"}}),e("el-table-column",{attrs:{label:"商品图片",align:"center"},scopedSlots:t._u([{key:"default",fn:function(t){return[e("el-image",{staticStyle:{width:"60px",height:"60px","border-radius":"5px"},attrs:{src:t.row.coverPhoto,fit:"cover"}})]}}],null,!1,4106875313)}),e("el-table-column",{attrs:{prop:"groupProdName",label:"拼团名称",align:"center"}}),e("el-table-column",{attrs:{prop:"userCount",label:"拼团人数",align:"center"}}),e("el-table-column",{attrs:{prop:"stock",label:"库存",align:"center"}}),e("el-table-column",{attrs:{prop:"groupBuyCount",label:"参与人数",align:"center"}}),e("el-table-column",{attrs:{prop:"sort",label:"排序",align:"center"}}),e("el-table-column",{attrs:{label:"状态",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s("1001"===e.row.state?"开启":"关闭")+" ")]}}],null,!1,2677916195)}),e("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.openEditProductModel(o.row)}}},[t._v("修改")]),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.openDeleteProductModel(o.row)}}},[t._v("删除")])]}}],null,!1,3315932674)})],1),e("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"right"},attrs:{"current-page":t.currentPage,"page-size":t.pageSize,layout:"total, prev, pager, next, jumper",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)])],1)],1):t._e(),"addGroupBuyProduct"===t.componentShow?e("add-group-buy-product",{ref:"addGroupBuyProduct",on:{close:t.handleCloseAddProduct}}):t._e(),"editGroupBuyProduct"===t.componentShow?e("edit-group-buy-product",{ref:"editGroupBuyProduct",attrs:{"product-data":t.currentProduct},on:{close:t.handleCloseEditProduct}}):t._e(),e("delete-group-buy-product",{ref:"deleteGroupBuyProduct",on:{close:t.handleCloseDeleteProduct}})],1)},r=[],l=o("2a7f"),s=function(){var t=this,e=t._self._c;return e("div",[e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("拼团信息")])]),e("div",{staticClass:"card-body"},[e("el-form",{attrs:{"label-width":"100px"}},[e("el-form-item",{attrs:{label:"商品"}},[e("el-col",{attrs:{span:18}},[e("el-input",{attrs:{disabled:"",placeholder:"必填,请填写商品名称"},model:{value:t.formData.prodName,callback:function(e){t.$set(t.formData,"prodName",e)},expression:"formData.prodName"}})],1),e("el-col",{attrs:{span:6}},[e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.openChooseProductModal}},[e("i",{staticClass:"el-icon-plus"}),t._v("选择商品 ")])],1)],1),e("el-form-item",{attrs:{label:"拼团名称"}},[e("el-col",{attrs:{span:11}},[e("el-input",{attrs:{placeholder:"必填,请填写拼团名称"},model:{value:t.formData.groupProdName,callback:function(e){t.$set(t.formData,"groupProdName",e)},expression:"formData.groupProdName"}})],1),e("el-col",{attrs:{span:11,offset:2}},[e("el-input",{attrs:{placeholder:"必填,请填写拼团排序"},model:{value:t.formData.sort,callback:function(e){t.$set(t.formData,"sort",e)},expression:"formData.sort"}})],1)],1),e("el-form-item",{attrs:{label:"拼团简介"}},[e("el-col",{attrs:{span:23}},[e("el-input",{attrs:{type:"textarea",placeholder:"必填,请填写拼团简介",maxlength:"250","show-word-limit":"",rows:"4"},model:{value:t.formData.groupProdDesc,callback:function(e){t.$set(t.formData,"groupProdDesc",e)},expression:"formData.groupProdDesc"}})],1)],1)],1)],1)])],1)],1),e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("商品规格")])]),e("div",{staticClass:"card-body"},[e("el-table",{attrs:{data:t.formData.productSpecs,border:""}},[e("el-table-column",{attrs:{prop:"specName",label:"规格名称",align:"center"}}),e("el-table-column",{attrs:{label:"规格值",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("span",{domProps:{innerHTML:t._s(o.row.specValue)}})]}}])}),e("el-table-column",{attrs:{prop:"stock",label:"库存",align:"center"}}),e("el-table-column",{attrs:{prop:"sales",label:"销量",align:"center"}}),e("el-table-column",{attrs:{prop:"price",label:"金额",align:"center"}}),e("el-table-column",{attrs:{prop:"costPrice",label:"成本价",align:"center"}}),e("el-table-column",{attrs:{label:"拼团价",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-input-number",{attrs:{min:0,precision:2,"controls-position":"right"},model:{value:o.row.groupPrice,callback:function(e){t.$set(o.row,"groupPrice",e)},expression:"scope.row.groupPrice"}})]}}])}),e("el-table-column",{attrs:{label:"拼团库存",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-input-number",{attrs:{min:0,precision:0,"controls-position":"right"},model:{value:o.row.groupStock,callback:function(e){t.$set(o.row,"groupStock",e)},expression:"scope.row.groupStock"}})]}}])})],1)],1)])],1)],1),e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("商品扩展")])]),e("div",{staticClass:"card-body"},[e("el-form",{attrs:{"label-width":"100px"}},[e("el-form-item",{attrs:{label:"活动状态"}},[e("el-col",{attrs:{span:11}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"选填,请选择状态"},model:{value:t.formData.state,callback:function(e){t.$set(t.formData,"state",e)},expression:"formData.state"}},[e("el-option",{attrs:{label:"开启",value:"1001"}}),e("el-option",{attrs:{label:"关闭",value:"2002"}})],1)],1),e("el-col",{attrs:{span:11,offset:2}},[e("el-input",{attrs:{placeholder:"必填,请填写拼团人数"},model:{value:t.formData.userCount,callback:function(e){t.$set(t.formData,"userCount",e)},expression:"formData.userCount"}})],1)],1),e("el-form-item",{attrs:{label:"商品详情"}},[e("el-col",{attrs:{span:23}},[e("tinymce",{attrs:{height:300},model:{value:t.formData.content,callback:function(e){t.$set(t.formData,"content",e)},expression:"formData.content"}})],1)],1)],1),e("div",{staticClass:"footer-buttons"},[e("el-button",{attrs:{type:"warning"},on:{click:t.closeAddProduct}},[e("i",{staticClass:"el-icon-close"}),t._v("取消 ")]),e("el-button",{attrs:{type:"primary"},on:{click:t.saveProductInfo}},[e("i",{staticClass:"el-icon-check"}),t._v("保存 ")])],1)],1)])],1)],1),e("choose-product",{ref:"chooseProduct",on:{choose:t.handleChooseProduct}})],1)},c=[],n=o("7323"),i=o("254b"),u={name:"AddGroupBuyProduct",components:{ChooseProduct:i["a"]},props:{callBackListener:String,callBackFunction:String},data(){return{formData:{productId:"",groupProdName:"",prodName:"",groupProdDesc:"",sort:"",content:"",state:"",userCount:"3",productSpecs:[]}}},methods:{open(){this.resetForm()},resetForm(){this.formData={productId:"",groupProdName:"",prodName:"",groupProdDesc:"",sort:"",content:"",state:"",userCount:"3",productSpecs:[]}},openChooseProductModal(){this.$refs.chooseProduct.open()},handleChooseProduct(t){this.formData.productId=t.productId,this.formData.prodName=t.prodName,this.formData.groupProdName=t.prodName,this.formData.groupProdDesc=t.prodDesc,this.formData.productSpecs=t.productSpecValues.map(t=>({...t,groupPrice:0,groupStock:0,specValue:t.productSpecDetails.map(t=>t.detailValue).join("/")}))},validateForm(){return this.formData.groupProdName?this.formData.groupProdDesc?this.formData.productId?this.formData.state?!!this.formData.userCount||(this.$message.error("拼团人数不能为空"),!1):(this.$message.error("请选择活动状态"),!1):(this.$message.error("请选择商品"),!1):(this.$message.error("拼团简介不能为空"),!1):(this.$message.error("拼团名称不能为空"),!1)},async saveProductInfo(){if(this.validateForm())try{const t={...this.formData,shopId:Object(n["f"])()};await Object(l["e"])(t),this.$message.success("添加成功"),this.closeAddProduct(),this.$emit("close")}catch(t){console.error("添加拼团商品失败:",t)}},closeAddProduct(){this.resetForm(),this.$emit("close")}}},d=u,p=(o("2d7a"),o("2877")),m=Object(p["a"])(d,s,c,!1,null,"325f484c",null),h=m.exports,f=function(){var t=this,e=t._self._c;return e("div",[e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("拼团信息")])]),e("div",{staticClass:"card-body"},[e("el-form",{attrs:{"label-width":"100px"}},[e("el-form-item",{attrs:{label:"商品"}},[e("el-col",{attrs:{span:23}},[e("el-input",{attrs:{disabled:"",placeholder:"必填,请填写商品名称"},model:{value:t.formData.prodName,callback:function(e){t.$set(t.formData,"prodName",e)},expression:"formData.prodName"}})],1)],1),e("el-form-item",{attrs:{label:"拼团名称"}},[e("el-col",{attrs:{span:11}},[e("el-input",{attrs:{placeholder:"必填,请填写拼团名称"},model:{value:t.formData.groupProdName,callback:function(e){t.$set(t.formData,"groupProdName",e)},expression:"formData.groupProdName"}})],1),e("el-col",{attrs:{span:11,offset:2}},[e("el-input",{attrs:{placeholder:"必填,请填写拼团排序"},model:{value:t.formData.sort,callback:function(e){t.$set(t.formData,"sort",e)},expression:"formData.sort"}})],1)],1),e("el-form-item",{attrs:{label:"拼团简介"}},[e("el-col",{attrs:{span:23}},[e("el-input",{attrs:{type:"textarea",placeholder:"必填,请填写拼团简介",maxlength:"250","show-word-limit":"",rows:"4"},model:{value:t.formData.groupProdDesc,callback:function(e){t.$set(t.formData,"groupProdDesc",e)},expression:"formData.groupProdDesc"}})],1)],1)],1)],1)])],1)],1),e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("商品规格")])]),e("div",{staticClass:"card-body"},[e("el-table",{attrs:{data:t.formData.productSpecs,border:""}},[e("el-table-column",{attrs:{prop:"specName",label:"规格名称",align:"center"}}),e("el-table-column",{attrs:{label:"规格值",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("span",{domProps:{innerHTML:t._s(o.row.specValue)}})]}}])}),e("el-table-column",{attrs:{prop:"stock",label:"库存",align:"center"}}),e("el-table-column",{attrs:{prop:"sales",label:"销量",align:"center"}}),e("el-table-column",{attrs:{prop:"price",label:"金额",align:"center"}}),e("el-table-column",{attrs:{prop:"costPrice",label:"成本价",align:"center"}}),e("el-table-column",{attrs:{label:"拼团价",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-input-number",{attrs:{min:0,precision:2,"controls-position":"right"},model:{value:o.row.groupPrice,callback:function(e){t.$set(o.row,"groupPrice",e)},expression:"scope.row.groupPrice"}})]}}])}),e("el-table-column",{attrs:{label:"拼团库存",align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-input-number",{attrs:{min:0,precision:0,"controls-position":"right"},model:{value:o.row.groupStock,callback:function(e){t.$set(o.row,"groupStock",e)},expression:"scope.row.groupStock"}})]}}])})],1)],1)])],1)],1),e("el-row",[e("el-col",{attrs:{span:24}},[e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v("商品扩展")])]),e("div",{staticClass:"card-body"},[e("el-form",{attrs:{"label-width":"100px"}},[e("el-form-item",{attrs:{label:"活动状态"}},[e("el-col",{attrs:{span:11}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"选填,请选择状态"},model:{value:t.formData.state,callback:function(e){t.$set(t.formData,"state",e)},expression:"formData.state"}},[e("el-option",{attrs:{label:"开启",value:"1001"}}),e("el-option",{attrs:{label:"关闭",value:"2002"}})],1)],1),e("el-col",{attrs:{span:11,offset:2}},[e("el-input",{attrs:{placeholder:"必填,请填写拼团人数"},model:{value:t.formData.userCount,callback:function(e){t.$set(t.formData,"userCount",e)},expression:"formData.userCount"}})],1)],1),e("el-form-item",{attrs:{label:"商品详情"}},[e("el-col",{attrs:{span:23}},[e("tinymce",{attrs:{height:300},model:{value:t.formData.content,callback:function(e){t.$set(t.formData,"content",e)},expression:"formData.content"}})],1)],1)],1),e("div",{staticClass:"footer-buttons"},[e("el-button",{attrs:{type:"warning"},on:{click:t.closeEditProduct}},[e("i",{staticClass:"el-icon-close"}),t._v("取消 ")]),e("el-button",{attrs:{type:"primary"},on:{click:t.updateProductInfo}},[e("i",{staticClass:"el-icon-check"}),t._v("保存 ")])],1)],1)])],1)],1)],1)},b=[],g={name:"EditGroupBuyProduct",props:{productData:{type:Object,default:()=>({})}},data(){return{formData:{groupId:"",productId:"",groupProdName:"",prodName:"",groupProdDesc:"",sort:"",content:"",state:"",userCount:"3",productSpecs:[]}}},methods:{open(t){console.log(t),this.loadProductDetail(t.groupId)},async loadProductDetail(t){try{const e=await Object(l["b"])({groupId:t});this.formData={...e.data,productSpecs:e.data.groupBuyProductSpecs.map(t=>({...t,specValue:t.productSpecDetails.map(t=>t.detailValue).join("/")}))}}catch(e){console.error("获取拼团商品详情失败:",e)}},validateForm(){return this.formData.groupProdName?this.formData.groupProdDesc?!!this.formData.userCount||(this.$message.error("拼团人数不能为空"),!1):(this.$message.error("拼团简介不能为空"),!1):(this.$message.error("拼团名称不能为空"),!1)},async updateProductInfo(){if(this.validateForm())try{const t={...this.formData,shopId:Object(n["f"])()};await Object(l["f"])(t),this.$message.success("修改成功"),this.closeEditProduct(),this.$emit("close")}catch(t){console.error("修改拼团商品失败:",t)}},closeEditProduct(){this.$emit("close")}}},P=g,y=(o("0e8e"),Object(p["a"])(P,f,b,!1,null,"4dc99f48",null)),v=y.exports,D=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:"请确认您的操作!",visible:t.dialogVisible,width:"500px"},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("div",{staticClass:"dialog-body",attrs:{align:"center"}},[e("p",[t._v("确定删除拼团商品信息")])]),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.closeDialog}},[t._v("点错了")]),e("el-button",{attrs:{type:"primary"},on:{click:t.confirmDelete}},[t._v("确认删除")])],1)])},w=[],k={name:"DeleteGroupBuyProduct",data(){return{dialogVisible:!1,deleteData:{}}},methods:{open(t){this.deleteData=t,this.dialogVisible=!0},async confirmDelete(){try{const t={groupId:this.deleteData.groupId,shopId:Object(n["f"])()};await Object(l["a"])(t),this.$message.success("删除成功"),this.closeDialog(),this.$emit("close")}catch(t){console.error("删除拼团商品失败:",t)}},closeDialog(){this.dialogVisible=!1,this.deleteData={}}}},C=k,x=(o("c90c"),Object(p["a"])(C,D,w,!1,null,"0b3e4587",null)),S=x.exports,_={name:"GroupBuyProductManage",components:{AddGroupBuyProduct:h,EditGroupBuyProduct:v,DeleteGroupBuyProduct:S},data(){return{componentShow:"groupBuyProductManage",products:[],conditions:{prodName:"",keyword:"",barCode:""},currentPage:1,pageSize:10,total:0,currentProduct:null}},created(){this.getProductList()},methods:{async getProductList(){try{const t={...this.conditions,page:this.currentPage,row:this.pageSize},e=await Object(l["c"])(t);this.products=e.data,this.total=e.total}catch(t){console.error("获取拼团商品列表失败:",t)}},queryProductMethod(){this.currentPage=1,this.getProductList()},resetProductMethod(){this.conditions={prodName:"",keyword:"",barCode:""},this.currentPage=1,this.getProductList()},openAddProductModal(){this.componentShow="addGroupBuyProduct"},openEditProductModel(t){this.currentProduct=t,this.componentShow="editGroupBuyProduct",this.$nextTick(()=>{this.$refs.editGroupBuyProduct.open(t)})},openDeleteProductModel(t){this.$refs.deleteGroupBuyProduct.open(t)},handleCurrentChange(t){this.currentPage=t,this.getProductList()},handleCloseAddProduct(){this.componentShow="groupBuyProductManage",this.getProductList()},handleCloseEditProduct(){this.componentShow="groupBuyProductManage",this.getProductList()},handleCloseDeleteProduct(){this.getProductList()}}},$=_,j=(o("4241"),Object(p["a"])($,a,r,!1,null,"649689f0",null));e["default"]=j.exports},c395:function(t,e,o){},c90c:function(t,e,o){"use strict";o("7c94")},d605:function(t,e,o){}}]);
//# sourceMappingURL=chunk-4f690157.d6ed1881.js.map