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

2 lines
7.1 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4d5de3e4","chunk-fcd760a4"],{"3b06":function(t,e,l){},"455c":function(t,e,l){"use strict";var o=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.$t("deleteProduct.confirmOperation")+"!",visible:t.dialogVisible,width:"30%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("div",{attrs:{align:"center"}},[e("span",[t._v(t._s(t.$t("deleteProduct.confirmDeleteProduct")))])]),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.closeDeleteProductModel}},[t._v(t._s(t.$t("deleteProduct.cancel")))]),e("el-button",{attrs:{type:"primary"},on:{click:t.deleteProduct}},[t._v(t._s(t.$t("deleteProduct.confirmDelete")))])],1)])},i=[],a=l("b775");function n(t){return new Promise((e,l)=>{Object(a["a"])({url:"/product.deleteProduct",method:"post",data:t}).then(t=>{const l=t.data;e(l)}).catch(t=>{l(t)})})}var s={name:"DeleteProduct",data(){return{dialogVisible:!1,deleteProductInfo:{}}},methods:{open(t){this.deleteProductInfo=t,this.dialogVisible=!0},handleClose(t){this.closeDeleteProductModel(),t()},async deleteProduct(){try{const t=await n(this.deleteProductInfo);0===t.code?(this.$message.success(t.msg),this.dialogVisible=!1,this.$emit("product-deleted")):this.$message.error(t.msg)}catch(t){console.error("删除商品失败:",t),this.$message.error("删除商品失败")}},closeDeleteProductModel(){this.dialogVisible=!1}}},c=s,r=(l("57dc"),l("2877")),d=Object(r["a"])(c,o,i,!1,null,"8c735c08",null);e["a"]=d.exports},"57dc":function(t,e,l){"use strict";l("cd4f")},9418:function(t,e,l){"use strict";l("cd80")},a493:function(t,e,l){"use strict";l("3b06")},c962:function(t,e,l){"use strict";l.r(e);var o=function(){var t=this,e=t._self._c;return e("el-card",{staticClass:"list-selector"},[e("ul",{staticClass:"list-selector-list"},["Y"==t.showAll?e("li",{class:{selected:""===t.adminShopInfo.shopId},on:{click:function(e){return t.swatchAdminShopId({shopId:"",shopName:"全部"})}}},[t._v(" "+t._s(t.$t("common.all"))+" ")]):t._e(),t._l(t.adminShopInfo.shops,(function(l,o){return e("li",{key:o,class:{selected:t.adminShopInfo.shopId===l.shopId},on:{click:function(e){return t.swatchAdminShopId(l)}}},[t._v(" "+t._s(l.shopName)+" ")])}))],2)])},i=[],a=l("7323"),n={name:"AdminShop",data(){return{adminShopInfo:{shops:[],shopId:""}}},props:{showAll:{type:String,default:"Y"}},created(){this._listAdminShops()},methods:{async _listAdminShops(){try{const t=await Object(a["k"])({page:1,row:100});this.adminShopInfo.shops=t.data,"N"==this.showAll&&this.adminShopInfo.shops.length>0&&this.swatchAdminShopId(this.adminShopInfo.shops[0])}catch(t){console.error("获取店铺列表失败:",t)}},swatchAdminShopId(t){this.adminShopInfo.shopId=t.shopId,this.$emit("shop-change",t)}}},s=n,c=(l("9418"),l("2877")),r=Object(c["a"])(s,o,i,!1,null,"177c0c26",null);e["default"]=r.exports},cd4f:function(t,e,l){},cd80:function(t,e,l){},ef22:function(t,e,l){"use strict";l.r(e);var o=function(){var t=this,e=t._self._c;return e("div",[e("el-row",{attrs:{gutter:20}},[e("el-col",{staticClass:"padding-r-0",attrs:{span:4}},[e("admin-shop",{on:{"shop-change":t.handleShopChange}})],1),e("el-col",{attrs:{span:20}},[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v(t._s(t.$t("adminSeckill.queryCondition")))])]),e("el-row",{attrs:{gutter:20}},[e("el-col",{attrs:{span:6}},[e("el-input",{attrs:{placeholder:t.$t("adminSeckill.inputProductName"),clearable:""},model:{value:t.adminSeckillInfo.conditions.prodName,callback:function(e){t.$set(t.adminSeckillInfo.conditions,"prodName",e)},expression:"adminSeckillInfo.conditions.prodName"}})],1),e("el-col",{attrs:{span:2}},[e("el-button",{attrs:{type:"primary"},on:{click:t._queryProductMethod}},[t._v(" "+t._s(t.$t("adminSeckill.query"))+" ")])],1)],1)],1),e("el-card",{staticClass:"margin-top-sm"},[e("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v(t._s(t.$t("adminSeckill.shopSeckill")))])]),e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.adminSeckillInfo.productSeckills,border:""}},[e("el-table-column",{attrs:{prop:"prodName",label:t.$t("aShopDetailSeckill.productName"),align:"center"}}),e("el-table-column",{attrs:{prop:"killHours",label:t.$t("aShopDetailSeckill.killHours"),align:"center"}}),e("el-table-column",{attrs:{prop:"continueHours",label:t.$t("aShopDetailSeckill.continueHours"),align:"center"}}),e("el-table-column",{attrs:{prop:"totalCount",label:t.$t("aShopDetailSeckill.totalCount"),align:"center"}}),e("el-table-column",{attrs:{prop:"oneCount",label:t.$t("aShopDetailSeckill.oneCount"),align:"center"}}),e("el-table-column",{attrs:{prop:"killPrice",label:t.$t("aShopDetailSeckill.killPrice"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" ¥"+t._s(e.row.killPrice)+" ")]}}])}),e("el-table-column",{attrs:{prop:"price",label:t.$t("aShopDetailSeckill.price"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" ¥"+t._s(e.row.price)+" ")]}}])}),e("el-table-column",{attrs:{prop:"killStock",label:t.$t("aShopDetailSeckill.killStock"),align:"center"}}),e("el-table-column",{attrs:{prop:"state",label:t.$t("aShopDetailSeckill.state"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s("1001"==e.row.state?t.$t("aShopDetailSeckill.open"):t.$t("aShopDetailSeckill.close"))+" ")]}}])}),e("el-table-column",{attrs:{label:t.$t("aShopDetailSeckill.validity"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(e.row.startTime)+"~"+t._s(e.row.endTime)+" ")]}}])})],1),e("el-pagination",{staticClass:"pagination",attrs:{"current-page":t.adminSeckillInfo.conditions.page,"page-size":t.adminSeckillInfo.conditions.row,layout:"total, prev, pager, next",total:t.adminSeckillInfo.total},on:{"current-change":t.handleCurrentChange}})],1)],1)],1),e("delete-product",{ref:"deleteProduct"})],1)},i=[],a=l("b775");function n(t){return new Promise((e,l)=>{Object(a["a"])({url:"/productSeckill.listAdminSeckill",method:"get",params:t}).then(t=>{const l=t.data;e(l)}).catch(t=>{l(t)})})}var s=l("c962"),c=l("455c"),r={name:"AdminSeckill",components:{AdminShop:s["default"],DeleteProduct:c["a"]},data(){return{adminSeckillInfo:{productSeckills:[],total:0,conditions:{page:1,row:10,prodName:"",shopId:""}}}},created(){this._listAdminSeckills()},methods:{handleShopChange(t){this.adminSeckillInfo.conditions.shopId=t.shopId,this._listAdminSeckills()},handleCurrentChange(t){this.adminSeckillInfo.conditions.page=t,this._listAdminSeckills()},async _listAdminSeckills(){try{const t=await n(this.adminSeckillInfo.conditions);this.adminSeckillInfo.productSeckills=t.data,this.adminSeckillInfo.total=t.total}catch(t){console.error("获取秒杀列表失败:",t)}},_queryProductMethod(){this.adminSeckillInfo.conditions.page=1,this._listAdminSeckills()},_openDeleteProductModel(t){console.log(t),this.$refs.deleteProduct.open(t)}}},d=r,u=(l("a493"),l("2877")),p=Object(u["a"])(d,o,i,!1,null,"a1ce2a5a",null);e["default"]=p.exports}}]);
//# sourceMappingURL=chunk-4d5de3e4.14b50485.js.map