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

2 lines
6.8 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e3b8ac66"],{"5fa4":function(t,s,o){},"8eda":function(t,s,o){"use strict";o("5fa4")},"9dbf":function(t,s,o){},b493:function(t,s,o){"use strict";o.r(s);var e=function(){var t=this,s=t._self._c;return s("div",[s("el-card",{staticClass:"margin-top-sm"},[s("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[s("div",[t._v(t._s(t.$t("aShopSms.queryCondition")))])]),s("div",{},[s("el-row",{attrs:{gutter:20}},[s("el-col",{attrs:{span:4}},[s("el-input",{attrs:{placeholder:t.$t("aShopSms.shopNamePlaceholder"),clearable:""},model:{value:t.aShopSmsInfo.conditions.shopNameLike,callback:function(s){t.$set(t.aShopSmsInfo.conditions,"shopNameLike",s)},expression:"aShopSmsInfo.conditions.shopNameLike"}})],1),s("el-col",{attrs:{span:2}},[s("el-button",{attrs:{type:"primary",size:"small"},on:{click:t._queryAShopSmsMethod}},[t._v(" "+t._s(t.$t("aShopSms.query"))+" ")])],1)],1)],1)]),s("el-card",{staticClass:"margin-top-sm"},[s("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[s("div",[t._v(t._s(t.$t("aShopSms.shopSms")))])]),s("div",{},[s("el-table",{staticStyle:{width:"100%"},attrs:{data:t.aShopSmsInfo.smses,border:""}},[s("el-table-column",{attrs:{prop:"shopName",label:t.$t("aShopSms.shopName"),align:"center"}}),s("el-table-column",{attrs:{prop:"smsCount",label:t.$t("aShopSms.smsCount"),align:"center"}}),s("el-table-column",{attrs:{prop:"smsSwitch",label:t.$t("aShopSms.smsSwitch"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(s){return[t._v(" "+t._s("ON"===s.row.smsSwitch?t.$t("aShopSms.on"):t.$t("aShopSms.off"))+" ")]}}])}),s("el-table-column",{attrs:{label:t.$t("aShopSms.operation"),align:"center",width:"180"},scopedSlots:t._u([{key:"default",fn:function(o){return[s("el-button",{attrs:{type:"text",size:"small"},on:{click:function(s){return t._openEditAShopSmsModel(o.row)}}},[t._v(" "+t._s(t.$t("aShopSms.edit"))+" ")])]}}])})],1),s("el-pagination",{attrs:{"current-page":t.aShopSmsInfo.conditions.page,"page-size":t.aShopSmsInfo.conditions.row,layout:"total, prev, pager, next",total:t.aShopSmsInfo.total},on:{"current-change":t.handleCurrentChange}})],1)]),s("edit-a-shop-sms",{ref:"editAShopSms",on:{refresh:t.queryAShopSms}})],1)},i=[],a=o("b5b1"),n=function(){var t=this,s=t._self._c;return s("el-dialog",{attrs:{title:t.$t("editAShopSms.edit"),visible:t.dialogVisible,width:"50%"},on:{"update:visible":function(s){t.dialogVisible=s},close:t.handleClose}},[s("div",{staticClass:"modal-body"},[s("div",{staticClass:"ibox-content"},[s("el-form",{attrs:{model:t.editAShopSmsInfo,"label-width":"120px"}},[s("el-form-item",{attrs:{label:t.$t("editAShopSms.smsCount"),prop:"smsCount"}},[s("el-input",{attrs:{placeholder:t.$t("editAShopSms.smsCountPlaceholder")},model:{value:t.editAShopSmsInfo.smsCount,callback:function(s){t.$set(t.editAShopSmsInfo,"smsCount",s)},expression:"editAShopSmsInfo.smsCount"}})],1),s("el-form-item",{attrs:{label:t.$t("editAShopSms.smsSwitch"),prop:"smsSwitch"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("editAShopSms.smsSwitchPlaceholder")},model:{value:t.editAShopSmsInfo.smsSwitch,callback:function(s){t.$set(t.editAShopSmsInfo,"smsSwitch",s)},expression:"editAShopSmsInfo.smsSwitch"}},t._l(t.options,(function(t){return s("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1)],1)],1)]),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(s){t.dialogVisible=!1}}},[t._v(t._s(t.$t("common.cancel")))]),s("el-button",{attrs:{type:"primary"},on:{click:t.editAShopSms}},[t._v(t._s(t.$t("common.save")))])],1)])},h=[],r={name:"EditAShopSms",data(){return{dialogVisible:!1,editAShopSmsInfo:{smsId:"",shopId:"",smsSwitch:"",smsCount:""},options:[{value:"ON",label:this.$t("editAShopSms.on")},{value:"OFF",label:this.$t("editAShopSms.off")}]}},methods:{open(t){this.editAShopSmsInfo={...t},this.dialogVisible=!0},handleClose(){this.resetForm()},resetForm(){this.editAShopSmsInfo={smsId:"",shopId:"",smsSwitch:"",smsCount:""}},async editAShopSms(){if(this.validateForm())try{const t=await Object(a["e"])(this.editAShopSmsInfo);0===t.code?(this.$message.success(this.$t("editAShopSms.updateSuccess")),this.dialogVisible=!1,this.$emit("refresh")):this.$message.error(t.msg)}catch(t){console.error("更新店铺短信失败:",t),this.$message.error(this.$t("editAShopSms.updateFailed"))}},validateForm(){return this.editAShopSmsInfo.shopId?this.editAShopSmsInfo.smsId?this.editAShopSmsInfo.smsCount?!!this.editAShopSmsInfo.smsSwitch||(this.$message.error(this.$t("editAShopSms.smsSwitchRequired")),!1):(this.$message.error(this.$t("editAShopSms.smsCountRequired")),!1):(this.$message.error(this.$t("editAShopSms.smsIdRequired")),!1):(this.$message.error(this.$t("editAShopSms.shopIdRequired")),!1)}}},l=r,S=(o("8eda"),o("2877")),m=Object(S["a"])(l,n,h,!1,null,"4bf7f699",null),c=m.exports,p={name:"AShopSms",components:{EditAShopSms:c},data(){return{aShopSmsInfo:{smses:[],total:0,conditions:{shopNameLike:"",page:1,row:10}}}},created(){this._listAShopSmss(this.aShopSmsInfo.conditions.page,this.aShopSmsInfo.conditions.row)},methods:{queryAShopSms(){this._listAShopSmss(1,10)},async _listAShopSmss(t,s){this.aShopSmsInfo.conditions.page=t,this.aShopSmsInfo.conditions.row=s;try{const t=await Object(a["c"])(this.aShopSmsInfo.conditions);this.aShopSmsInfo.total=t.total,this.aShopSmsInfo.smses=t.data}catch(o){console.error("获取店铺短信列表失败:",o)}},_openEditAShopSmsModel(t){this.$refs.editAShopSms.open(t)},_queryAShopSmsMethod(){this._listAShopSmss(1,this.aShopSmsInfo.conditions.row)},handleCurrentChange(t){this._listAShopSmss(t,this.aShopSmsInfo.conditions.row)}}},d=p,u=(o("fec1"),Object(S["a"])(d,e,i,!1,null,"61342ea4",null));s["default"]=u.exports},b5b1:function(t,s,o){"use strict";o.d(s,"b",(function(){return i})),o.d(s,"d",(function(){return a})),o.d(s,"c",(function(){return n})),o.d(s,"e",(function(){return h})),o.d(s,"f",(function(){return r}));var e=o("b775");function i(t){return new Promise((s,o)=>{Object(e["a"])({url:"/shopSms.listShopSms",method:"get",params:t}).then(t=>{const o=t.data;s(o)}).catch(t=>{o(t)})})}function a(t){return new Promise((s,o)=>{Object(e["a"])({url:"/shopSms.listShopSmsDetail",method:"get",params:t}).then(t=>{const o=t.data;s(o)}).catch(t=>{o(t)})})}function n(t){return new Promise((s,o)=>{Object(e["a"])({url:"/shopSms.listAShopSms",method:"get",params:t}).then(t=>{const o=t.data;s(o)}).catch(t=>{o(t)})})}function h(t){return new Promise((s,o)=>{Object(e["a"])({url:"/shopSms.updateAShopSms",method:"post",data:t}).then(t=>{const o=t.data;s(o)}).catch(t=>{o(t)})})}function r(t){return new Promise((s,o)=>{Object(e["a"])({url:"/shopSms.updateShopSmsSwitch",method:"post",data:t}).then(t=>{const o=t.data;s(o)}).catch(t=>{o(t)})})}},fec1:function(t,s,o){"use strict";o("9dbf")}}]);
//# sourceMappingURL=chunk-e3b8ac66.b1ed2ad1.js.map