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

2 lines
15 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0fc47230"],{"07c3":function(t,s,e){"use strict";e("9a18")},"176b":function(t,s,e){"use strict";e("ce78")},"3e47":function(t,s,e){},"43cb":function(t,s,e){"use strict";e("69ae")},"46e4":function(t,s,e){"use strict";e.r(s);var o=function(){var t=this,s=t._self._c;return s("div",[s("el-card",{staticClass:"ibox"},[s("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[s("div",[t._v(t._s(t.$t("shopConfig.basicSettings")))]),s("div",{staticClass:"ibox-tools",staticStyle:{top:"10px"}},[s("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.openEditShopConfigInfoModel}},[t._v(" "+t._s(t.$t("shopConfig.edit"))+" ")])],1)]),s("div",{},[s("el-row",[s("el-col",{attrs:{span:6}},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"col-form-label"},[t._v(t._s(t.$t("shopConfig.businessStartTime")))]),s("label",[t._v(t._s(t.shopConfigInfo.ostartTime))])])]),s("el-col",{attrs:{span:6}},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"col-form-label"},[t._v(t._s(t.$t("shopConfig.businessEndTime")))]),s("label",[t._v(t._s(t.shopConfigInfo.oendTime))])])]),s("el-col",{attrs:{span:6}},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"col-form-label"},[t._v(t._s(t.$t("shopConfig.deliveryMethod")))]),s("label",[t._v(t._s("SHOP"==t.shopConfigInfo.sendWay?t.$t("shopConfig.selfDelivery"):t.$t("shopConfig.storeVerification")))])])]),s("el-col",{attrs:{span:6}},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"col-form-label"},[t._v(t._s(t.$t("shopConfig.deliveryFee")))]),s("label",[t._v(t._s(t.shopConfigInfo.sendFee))])])])],1)],1)]),s("div",{},[s("shop-config-sms",{ref:"shopConfigSms"})],1),s("edit-shop-config",{ref:"editShopConfig",on:{refresh:function(s){return t._loadShopConfigInfoData()}}})],1)},i=[],n=e("b775"),a=e("7323");function l(t){return new Promise((s,e)=>{const o={shopId:Object(a["f"])(),...t};Object(n["a"])({url:"/shopConfig.listShopConfig",method:"get",params:o}).then(t=>{const e=t.data;s(e)}).catch(t=>{e(t)})})}function h(t){return new Promise((s,e)=>{t.shopId||(t.shopId=Object(a["f"])()),Object(n["a"])({url:"/shopConfig.updateShopConfig",method:"post",data:t}).then(t=>{const e=t.data;s(e)}).catch(t=>{e(t)})})}var r=function(){var t=this,s=t._self._c;return s("el-card",{staticClass:"ibox"},[s("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[s("div",[t._v(t._s(t.$t("shopSms.smsSettings")))]),s("div",{staticClass:"flex justify-end"},[s("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.openEditShopSmsSwitchModel}},[t._v(" "+t._s(t.$t("shopSms.edit"))+" ")]),s("el-button",{attrs:{plain:"",size:"small"},on:{click:t.toSmsDetail}},[t._v(" "+t._s(t.$t("shopSms.sendDetails"))+" ")])],1)]),s("div",{},[s("el-row",[s("el-col",{attrs:{span:8}},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"col-form-label"},[t._v(t._s(t.$t("shopSms.remainingSms")))]),s("label",[t._v(t._s(t.shopConfigSmsInfo.smsCount)+t._s(t.$t("shopSms.unit"))+" ("),s("a",{attrs:{href:"javascript:void(0)"},on:{click:t.openBuySmsModel}},[t._v(t._s(t.$t("shopSms.purchase")))]),t._v(")")])])]),s("el-col",{attrs:{span:8}},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"col-form-label"},[t._v(t._s(t.$t("shopSms.smsSwitch")))]),s("label",[t._v(t._s("ON"==t.shopConfigSmsInfo.smsSwitch?t.$t("shopSms.on"):t.$t("shopSms.off")))])])]),s("el-col",{attrs:{span:8}},[s("div",{staticClass:"form-group"},[s("label",{staticClass:"col-form-label"},[t._v(t._s(t.$t("shopSms.smsPrice")))]),s("label",[t._v(t._s(t.shopConfigSmsInfo.smsPrice)+t._s(t.$t("shopSms.yuan")))])])])],1)],1),s("edit-shop-sms-switch",{ref:"editShopSmsSwitch",on:{refresh:function(s){return t.loadShopConfigSms()}}}),s("buy-shop-sms",{ref:"buyShopSms"})],1)},c=[],m=e("b5b1"),d=function(){var t=this,s=t._self._c;return s("el-dialog",{attrs:{title:t.$t("shopSms.edit"),visible:t.dialogVisible,width:"50%","before-close":t.handleClose},on:{"update:visible":function(s){t.dialogVisible=s}}},[s("div",{},[s("div",{},[s("el-form",{attrs:{model:t.editShopSmsSwitchInfo,"label-width":"120px"}},[s("el-form-item",{attrs:{label:t.$t("shopSms.smsSwitch"),prop:"smsSwitch"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("shopSms.selectSmsSwitch")},model:{value:t.editShopSmsSwitchInfo.smsSwitch,callback:function(s){t.$set(t.editShopSmsSwitchInfo,"smsSwitch",s)},expression:"editShopSmsSwitchInfo.smsSwitch"}},[s("el-option",{attrs:{disabled:"",value:""}},[t._v(t._s(t.$t("shopSms.selectSmsSwitch")))]),s("el-option",{attrs:{value:"ON"}},[t._v(t._s(t.$t("shopSms.on")))]),s("el-option",{attrs:{value:"OFF"}},[t._v(t._s(t.$t("shopSms.off")))])],1)],1)],1),s("div",{staticClass:"text-right"},[s("el-button",{staticStyle:{"margin-right":"20px"},attrs:{type:"warning"},on:{click:t.handleClose}},[t._v(" "+t._s(t.$t("common.cancel"))+" ")]),s("el-button",{attrs:{type:"primary"},on:{click:t.editShopSmsSwitch}},[t._v(" "+t._s(t.$t("common.save"))+" ")])],1)],1)])])},p=[],f={name:"EditShopSmsSwitch",data(){return{dialogVisible:!1,editShopSmsSwitchInfo:{smsId:"",shopId:"",smsSwitch:""}}},methods:{open(t){this.resetForm(),this.editShopSmsSwitchInfo={...t},this.editShopSmsSwitchInfo.shopId=Object(a["f"])(),this.dialogVisible=!0},handleClose(){this.dialogVisible=!1},resetForm(){this.editShopSmsSwitchInfo={smsId:"",shopId:"",smsSwitch:""}},editShopSmsSwitch(){this.validateForm()&&Object(m["f"])(this.editShopSmsSwitchInfo).then(t=>{0===t.code?(this.$message.success(this.$t("common.saveSuccess")),this.handleClose(),this.$emit("refresh")):this.$message.error(t.msg)}).catch(t=>{console.error("请求失败:",t)})},validateForm(){return!!this.editShopSmsSwitchInfo.smsSwitch||(this.$message.warning(this.$t("shopSms.selectSmsSwitchRequired")),!1)}}},S=f,u=(e("7057"),e("2877")),b=Object(u["a"])(S,d,p,!1,null,"7224329a",null),g=b.exports,C=function(){var t=this,s=t._self._c;return s("el-dialog",{attrs:{title:t.$t("shopSms.purchaseSms"),visible:t.dialogVisible,width:"50%","before-close":t.handleClose},on:{"update:visible":function(s){t.dialogVisible=s}}},[s("div",{staticClass:"modal-body"},[s("div",{staticClass:"ibox-content"},[s("el-form",{attrs:{model:t.buyShopSmsInfo,"label-width":"120px"}},[s("el-form-item",{attrs:{label:t.$t("shopSms.unitPrice")}},[s("el-input",{attrs:{disabled:""},model:{value:t.buyShopSmsInfo.smsPrice,callback:function(s){t.$set(t.buyShopSmsInfo,"smsPrice",s)},expression:"buyShopSmsInfo.smsPrice"}})],1),s("el-form-item",{attrs:{label:t.$t("shopSms.purchaseQuantity"),prop:"buyCount"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("shopSms.selectPurchaseQuantity")},on:{change:t.computeSmsAmount},model:{value:t.buyShopSmsInfo.buyCount,callback:function(s){t.$set(t.buyShopSmsInfo,"buyCount",s)},expression:"buyShopSmsInfo.buyCount"}},[s("el-option",{attrs:{disabled:"",value:""}},[t._v(t._s(t.$t("shopSms.selectPurchaseQuantity")))]),s("el-option",{attrs:{value:"100"}},[t._v("100"+t._s(t.$t("shopSms.unit")))]),s("el-option",{attrs:{value:"200"}},[t._v("200"+t._s(t.$t("shopSms.unit")))]),s("el-option",{attrs:{value:"500"}},[t._v("500"+t._s(t.$t("shopSms.unit")))]),s("el-option",{attrs:{value:"1000"}},[t._v("1000"+t._s(t.$t("shopSms.unit")))]),s("el-option",{attrs:{value:"2000"}},[t._v("2000"+t._s(t.$t("shopSms.unit")))]),s("el-option",{attrs:{value:"5000"}},[t._v("5000"+t._s(t.$t("shopSms.unit")))])],1)],1),s("el-form-item",{attrs:{label:t.$t("shopSms.paymentAmount")}},[s("el-input",{attrs:{disabled:""},model:{value:t.buyShopSmsInfo.amount,callback:function(s){t.$set(t.buyShopSmsInfo,"amount",s)},expression:"buyShopSmsInfo.amount"}})],1),t.buyShopSmsInfo.qrCode?s("el-form-item",{attrs:{label:t.$t("shopSms.paymentQrCode")}},[s("div",{staticStyle:{width:"200px",height:"200px"},attrs:{id:"buySmsQrCodeDiv"}}),s("div",[t._v(t._s(t.buyShopSmsInfo.remark))])]):t._e()],1),s("div",{staticClass:"ibox-content text-right"},[s("el-button",{staticStyle:{"margin-right":"20px"},attrs:{type:"warning"},on:{click:t.finishBuySms}},[t._v(" "+t._s(t.$t("shopSms.purchased"))+" ")])],1)],1)])])},v=[],y=e("d044"),I=e.n(y),_={name:"BuyShopSms",data(){return{dialogVisible:!1,buyShopSmsInfo:{smsPrice:"",buyCount:"",amount:"0",qrCode:"",remark:""}}},methods:{open(t){this.resetForm(),this.buyShopSmsInfo={...t},this.buyShopSmsInfo.shopId=Object(a["f"])(),this.dialogVisible=!0},handleClose(){this.dialogVisible=!1},resetForm(){this.buyShopSmsInfo={smsPrice:"",buyCount:"",amount:"0",qrCode:"",remark:""}},computeSmsAmount(){this.validateForm()&&Object(m["computeSmsAmount"])(this.buyShopSmsInfo).then(t=>{0===t.code?(this.buyShopSmsInfo={...t.data},this.$nextTick(()=>{this.viewBuySmsQr()})):this.$message.error(t.msg)}).catch(t=>{console.error("请求失败:",t)})},viewBuySmsQr(){document.getElementById("buySmsQrCodeDiv").innerHTML="",new I.a(document.getElementById("buySmsQrCodeDiv"),{text:this.buyShopSmsInfo.qrCode,width:200,height:200,colorDark:"#000000",colorLight:"#ffffff",correctLevel:I.a.CorrectLevel.L})},finishBuySms(){this.handleClose(),this.$emit("refresh")},validateForm(){return!!this.buyShopSmsInfo.buyCount||(this.$message.warning(this.$t("shopSms.selectPurchaseQuantityRequired")),!1)}}},$=_,w=(e("43cb"),Object(u["a"])($,C,v,!1,null,"4d8e4c55",null)),x=w.exports,O={name:"ShopConfigSms",components:{EditShopSmsSwitch:g,BuyShopSms:x},data(){return{shopConfigSmsInfo:{smsId:"",shopId:"",smsCount:"0",smsSwitch:"",smsPrice:""}}},created(){this.loadShopConfigSms()},methods:{loadShopConfigSms(){const t={page:1,row:1,shopId:Object(a["f"])()};Object(m["b"])(t).then(t=>{t.data&&t.data.length>0&&(this.shopConfigSmsInfo={...t.data[0]})}).catch(t=>{console.error("请求失败:",t)})},openEditShopSmsSwitchModel(){this.$refs.editShopSmsSwitch.open(this.shopConfigSmsInfo)},openBuySmsModel(){this.$refs.buyShopSms.open(this.shopConfigSmsInfo)},toSmsDetail(){this.$router.push("/pages/shop/shopSmsDetail")}}},T=O,k=(e("07c3"),Object(u["a"])(T,r,c,!1,null,"215c424d",null)),F=k.exports,j=function(){var t=this,s=t._self._c;return s("el-dialog",{attrs:{title:t.$t("shopConfig.edit"),visible:t.dialogVisible,width:"50%","before-close":t.handleClose},on:{"update:visible":function(s){t.dialogVisible=s}}},[s("div",{staticClass:"modal-body"},[s("div",{staticClass:"ibox-content"},[s("el-form",{attrs:{model:t.editShopConfigInfo,"label-width":"120px"}},[s("el-form-item",{attrs:{label:t.$t("shopConfig.startTime"),prop:"ostartTime"}},[s("el-time-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("shopConfig.inputStartTime"),"value-format":"HH:mm:ss"},model:{value:t.editShopConfigInfo.ostartTime,callback:function(s){t.$set(t.editShopConfigInfo,"ostartTime",s)},expression:"editShopConfigInfo.ostartTime"}})],1),s("el-form-item",{attrs:{label:t.$t("shopConfig.endTime"),prop:"oendTime"}},[s("el-time-picker",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("shopConfig.inputEndTime"),"value-format":"HH:mm:ss"},model:{value:t.editShopConfigInfo.oendTime,callback:function(s){t.$set(t.editShopConfigInfo,"oendTime",s)},expression:"editShopConfigInfo.oendTime"}})],1),s("el-form-item",{attrs:{label:t.$t("shopConfig.deliveryMethod"),prop:"sendWay"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("shopConfig.selectDeliveryMethod")},model:{value:t.editShopConfigInfo.sendWay,callback:function(s){t.$set(t.editShopConfigInfo,"sendWay",s)},expression:"editShopConfigInfo.sendWay"}},[s("el-option",{attrs:{disabled:"",value:""}},[t._v(t._s(t.$t("shopConfig.selectDeliveryMethod")))]),s("el-option",{attrs:{value:"SHOP"}},[t._v(t._s(t.$t("shopConfig.selfDelivery")))]),s("el-option",{attrs:{value:"USER"}},[t._v(t._s(t.$t("shopConfig.storeVerification")))])],1)],1),"SHOP"==t.editShopConfigInfo.sendWay?s("el-form-item",{attrs:{label:t.$t("shopConfig.deliveryFee"),prop:"sendFee"}},[s("el-input",{attrs:{placeholder:t.$t("shopConfig.inputDeliveryFee")},model:{value:t.editShopConfigInfo.sendFee,callback:function(s){t.$set(t.editShopConfigInfo,"sendFee",s)},expression:"editShopConfigInfo.sendFee"}})],1):t._e()],1),s("div",{staticClass:"ibox-content text-right"},[s("el-button",{staticStyle:{"margin-right":"20px"},attrs:{type:"warning"},on:{click:t.handleClose}},[t._v(" "+t._s(t.$t("common.cancel"))+" ")]),s("el-button",{attrs:{type:"primary"},on:{click:t.editShopConfig}},[t._v(" "+t._s(t.$t("common.save"))+" ")])],1)],1)])])},P=[],D={name:"EditShopConfig",data(){return{dialogVisible:!1,editShopConfigInfo:{scId:"",shopId:"",ostartTime:"",oendTime:"",sendWay:"",sendFee:"0"}}},methods:{open(t){this.resetForm(),this.editShopConfigInfo={...t},this.editShopConfigInfo.shopId=Object(a["f"])(),this.dialogVisible=!0},handleClose(){this.dialogVisible=!1},resetForm(){this.editShopConfigInfo={scId:"",shopId:"",ostartTime:"",oendTime:"",sendWay:"",sendFee:"0"}},editShopConfig(){this.validateForm()&&h(this.editShopConfigInfo).then(t=>{0===t.code?(this.$message.success(this.$t("common.saveSuccess")),this.handleClose(),this.$emit("refresh")):this.$message.error(t.msg)}).catch(t=>{console.error("请求失败:",t)})},validateForm(){return this.editShopConfigInfo.ostartTime?this.editShopConfigInfo.oendTime?this.editShopConfigInfo.sendWay?!("SHOP"==this.editShopConfigInfo.sendWay&&!this.editShopConfigInfo.sendFee)||(this.$message.warning(this.$t("shopConfig.deliveryFeeRequired")),!1):(this.$message.warning(this.$t("shopConfig.deliveryMethodRequired")),!1):(this.$message.warning(this.$t("shopConfig.endTimeRequired")),!1):(this.$message.warning(this.$t("shopConfig.startTimeRequired")),!1)}}},V=D,E=(e("176b"),Object(u["a"])(V,j,P,!1,null,"16481778",null)),M=E.exports,W={name:"ShopConfig",components:{ShopConfigSms:F,EditShopConfig:M},data(){return{shopConfigInfo:{shopId:"",ostartTime:"",oendTime:"",sendWay:"",sendFee:""}}},created(){this.loadShopConfigInfoData()},methods:{openEditShopConfigInfoModel(){this.$refs.editShopConfig.open(this.shopConfigInfo)},loadShopConfigInfoData(){const t={page:1,row:1,shopId:Object(a["f"])()};l(t).then(t=>{t.data&&t.data.length>0&&(this.shopConfigInfo={...t.data[0]})}).catch(t=>{console.error("请求失败:",t)})}}},q=W,B=(e("4a8e"),Object(u["a"])(q,o,i,!1,null,"542bab64",null));s["default"]=B.exports},"4a42":function(t,s,e){},"4a8e":function(t,s,e){"use strict";e("4a42")},"69ae":function(t,s,e){},7057:function(t,s,e){"use strict";e("3e47")},"9a18":function(t,s,e){},b5b1:function(t,s,e){"use strict";e.d(s,"b",(function(){return i})),e.d(s,"d",(function(){return n})),e.d(s,"c",(function(){return a})),e.d(s,"e",(function(){return l})),e.d(s,"f",(function(){return h}));var o=e("b775");function i(t){return new Promise((s,e)=>{Object(o["a"])({url:"/shopSms.listShopSms",method:"get",params:t}).then(t=>{const e=t.data;s(e)}).catch(t=>{e(t)})})}function n(t){return new Promise((s,e)=>{Object(o["a"])({url:"/shopSms.listShopSmsDetail",method:"get",params:t}).then(t=>{const e=t.data;s(e)}).catch(t=>{e(t)})})}function a(t){return new Promise((s,e)=>{Object(o["a"])({url:"/shopSms.listAShopSms",method:"get",params:t}).then(t=>{const e=t.data;s(e)}).catch(t=>{e(t)})})}function l(t){return new Promise((s,e)=>{Object(o["a"])({url:"/shopSms.updateAShopSms",method:"post",data:t}).then(t=>{const e=t.data;s(e)}).catch(t=>{e(t)})})}function h(t){return new Promise((s,e)=>{Object(o["a"])({url:"/shopSms.updateShopSmsSwitch",method:"post",data:t}).then(t=>{const e=t.data;s(e)}).catch(t=>{e(t)})})}},ce78:function(t,s,e){}}]);
//# sourceMappingURL=chunk-0fc47230.bdbcaa21.js.map