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

2 lines
15 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-b5f71524"],{"41b28":function(e,t,a){"use strict";a("43e9")},"43e9":function(e,t,a){},5398:function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("shopTypeManage.queryCondition")))])]),t("div",{},[t("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.shopTypeManageInfo.conditions}},[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("shopTypeManage.inputTypeName"),clearable:""},model:{value:e.shopTypeManageInfo.conditions.typeName,callback:function(t){e.$set(e.shopTypeManageInfo.conditions,"typeName",t)},expression:"shopTypeManageInfo.conditions.typeName"}})],1),t("el-form-item",[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("shopTypeManage.selectIsShow")},model:{value:e.shopTypeManageInfo.conditions.isShow,callback:function(t){e.$set(e.shopTypeManageInfo.conditions,"isShow",t)},expression:"shopTypeManageInfo.conditions.isShow"}},[t("el-option",{attrs:{label:e.$t("shopTypeManage.yes"),value:"Y"}}),t("el-option",{attrs:{label:e.$t("shopTypeManage.no"),value:"N"}})],1)],1),t("el-form-item",[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("shopTypeManage.selectIsDefault")},model:{value:e.shopTypeManageInfo.conditions.isDefault,callback:function(t){e.$set(e.shopTypeManageInfo.conditions,"isDefault",t)},expression:"shopTypeManageInfo.conditions.isDefault"}},[t("el-option",{attrs:{label:e.$t("shopTypeManage.custom"),value:"F"}}),t("el-option",{attrs:{label:e.$t("shopTypeManage.default"),value:"T"}})],1)],1),t("el-form-item",[t("el-button",{attrs:{type:"primary",icon:"el-icon-search"},on:{click:e._queryShopTypeMethod}},[e._v(" "+e._s(e.$t("shopTypeManage.query"))+" ")])],1)],1)],1)]),t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("shopTypeManage.shopType")))]),t("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",icon:"el-icon-plus"},on:{click:e._openAddShopTypeModal}},[e._v(" "+e._s(e.$t("shopTypeManage.add"))+" ")])],1),t("div",{staticClass:"card-body"},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.shopTypeManageInfo.shopTypes,border:""}},[t("el-table-column",{attrs:{prop:"typeName",label:e.$t("shopTypeManage.shopType"),align:"center"}}),t("el-table-column",{attrs:{prop:"isShow",label:e.$t("shopTypeManage.isShow"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("Y"===t.row.isShow?e.$t("shopTypeManage.yes"):e.$t("shopTypeManage.no"))+" ")]}}])}),t("el-table-column",{attrs:{prop:"isDefault",label:e.$t("shopTypeManage.isDefault"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("F"===t.row.isDefault?e.$t("shopTypeManage.custom"):e.$t("shopTypeManage.default"))+" ")]}}])}),t("el-table-column",{attrs:{prop:"seq",label:e.$t("shopTypeManage.seq"),align:"center"}}),t("el-table-column",{attrs:{prop:"serviceFee",label:e.$t("shopTypeManage.serviceFee"),align:"center"}}),t("el-table-column",{attrs:{prop:"remark",label:e.$t("shopTypeManage.remark"),align:"center"}}),t("el-table-column",{attrs:{prop:"createTime",label:e.$t("shopTypeManage.createTime"),align:"center"}}),t("el-table-column",{attrs:{label:e.$t("shopTypeManage.operation"),align:"center",width:"200"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._openEditShopTypeModel(a.row)}}},[e._v(" "+e._s(e.$t("shopTypeManage.edit"))+" ")]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e._openDeleteShopTypeModel(a.row)}}},[e._v(" "+e._s(e.$t("shopTypeManage.delete"))+" ")])]}}])})],1),t("el-pagination",{attrs:{"current-page":e.shopTypeManageInfo.conditions.page,"page-sizes":[10,20,30,50],"page-size":e.shopTypeManageInfo.conditions.row,layout:"total, sizes, prev, pager, next, jumper",total:e.shopTypeManageInfo.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)]),t("add-shop-type",{ref:"addShopType",on:{refresh:e._listShopTypes}}),t("edit-shop-type",{ref:"editShopType",on:{refresh:e._listShopTypes}}),t("delete-shop-type",{ref:"deleteShopType",on:{refresh:e._listShopTypes}})],1)},o=[],r=a("ff56"),i=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("shopTypeManage.add"),visible:e.dialogVisible,width:"50%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.resetForm}},[t("el-form",{ref:"form",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:e.$t("shopTypeManage.shopType"),prop:"typeName"}},[t("el-input",{attrs:{placeholder:e.$t("shopTypeManage.inputTypeNameRequired")},model:{value:e.formData.typeName,callback:function(t){e.$set(e.formData,"typeName",t)},expression:"formData.typeName"}})],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.isShow"),prop:"isShow"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("shopTypeManage.selectIsShowRequired")},model:{value:e.formData.isShow,callback:function(t){e.$set(e.formData,"isShow",t)},expression:"formData.isShow"}},[t("el-option",{attrs:{label:e.$t("shopTypeManage.yes"),value:"Y"}}),t("el-option",{attrs:{label:e.$t("shopTypeManage.no"),value:"N"}})],1)],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.isDefault"),prop:"isDefault"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("shopTypeManage.selectIsDefaultRequired")},model:{value:e.formData.isDefault,callback:function(t){e.$set(e.formData,"isDefault",t)},expression:"formData.isDefault"}},[t("el-option",{attrs:{label:e.$t("shopTypeManage.custom"),value:"F"}}),t("el-option",{attrs:{label:e.$t("shopTypeManage.default"),value:"T"}})],1)],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.seq"),prop:"seq"}},[t("el-input",{attrs:{placeholder:e.$t("shopTypeManage.inputSeqRequired")},model:{value:e.formData.seq,callback:function(t){e.$set(e.formData,"seq",t)},expression:"formData.seq"}})],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.serviceFee"),prop:"serviceFee"}},[t("el-input",{attrs:{placeholder:e.$t("shopTypeManage.inputServiceFeeRequired")},model:{value:e.formData.serviceFee,callback:function(t){e.$set(e.formData,"serviceFee",t)},expression:"formData.serviceFee"}})],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.remark")}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$t("shopTypeManage.inputRemarkOptional")},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" "+e._s(e.$t("common.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("common.save"))+" ")])],1)],1)},l=[],p={name:"AddShopType",data(){return{dialogVisible:!1,formData:{typeName:"",isShow:"",isDefault:"",seq:"",serviceFee:"0.00",remark:""},rules:{typeName:[{required:!0,message:this.$t("shopTypeManage.typeNameRequired"),trigger:"blur"},{max:30,message:this.$t("shopTypeManage.typeNameTooLong"),trigger:"blur"}],isShow:[{required:!0,message:this.$t("shopTypeManage.isShowRequired"),trigger:"change"}],isDefault:[{required:!0,message:this.$t("shopTypeManage.isDefaultRequired"),trigger:"change"}],seq:[{required:!0,message:this.$t("shopTypeManage.seqRequired"),trigger:"blur"},{pattern:/^\d+$/,message:this.$t("shopTypeManage.seqNotNumber"),trigger:"blur"}],serviceFee:[{required:!0,message:this.$t("shopTypeManage.serviceFeeRequired"),trigger:"blur"}]}}},methods:{open(){this.dialogVisible=!0},resetForm(){this.$refs.form.resetFields(),this.formData={typeName:"",isShow:"",isDefault:"",seq:"",serviceFee:"0.00",remark:""}},submitForm(){this.$refs.form.validate(async e=>{if(e)try{const{code:e,msg:t}=await Object(r["c"])(this.formData);if(0!=e)return void this.$message.error(t);this.$message.success(this.$t("shopTypeManage.addSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(t){console.error(t)}})}}},n=p,h=a("2877"),c=Object(h["a"])(n,i,l,!1,null,null,null),u=c.exports,d=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("shopTypeManage.edit"),visible:e.dialogVisible,width:"50%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.resetForm}},[t("el-form",{ref:"form",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[t("el-form-item",{attrs:{label:e.$t("shopTypeManage.shopType"),prop:"typeName"}},[t("el-input",{attrs:{placeholder:e.$t("shopTypeManage.inputTypeNameRequired")},model:{value:e.formData.typeName,callback:function(t){e.$set(e.formData,"typeName",t)},expression:"formData.typeName"}})],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.isShow"),prop:"isShow"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("shopTypeManage.selectIsShowRequired")},model:{value:e.formData.isShow,callback:function(t){e.$set(e.formData,"isShow",t)},expression:"formData.isShow"}},[t("el-option",{attrs:{label:e.$t("shopTypeManage.yes"),value:"Y"}}),t("el-option",{attrs:{label:e.$t("shopTypeManage.no"),value:"N"}})],1)],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.isDefault"),prop:"isDefault"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:e.$t("shopTypeManage.selectIsDefaultRequired")},model:{value:e.formData.isDefault,callback:function(t){e.$set(e.formData,"isDefault",t)},expression:"formData.isDefault"}},[t("el-option",{attrs:{label:e.$t("shopTypeManage.custom"),value:"F"}}),t("el-option",{attrs:{label:e.$t("shopTypeManage.default"),value:"T"}})],1)],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.seq"),prop:"seq"}},[t("el-input",{attrs:{placeholder:e.$t("shopTypeManage.inputSeqRequired")},model:{value:e.formData.seq,callback:function(t){e.$set(e.formData,"seq",t)},expression:"formData.seq"}})],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.serviceFee"),prop:"serviceFee"}},[t("el-input",{attrs:{placeholder:e.$t("shopTypeManage.inputServiceFeeRequired")},model:{value:e.formData.serviceFee,callback:function(t){e.$set(e.formData,"serviceFee",t)},expression:"formData.serviceFee"}})],1),t("el-form-item",{attrs:{label:e.$t("shopTypeManage.remark")}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$t("shopTypeManage.inputRemarkOptional")},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" "+e._s(e.$t("common.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v(" "+e._s(e.$t("common.save"))+" ")])],1)],1)},m=[],y={name:"EditShopType",data(){return{dialogVisible:!1,formData:{shopTypeId:"",typeName:"",isShow:"",isDefault:"",seq:"",serviceFee:"",remark:""},rules:{typeName:[{required:!0,message:this.$t("shopTypeManage.typeNameRequired"),trigger:"blur"},{max:30,message:this.$t("shopTypeManage.typeNameTooLong"),trigger:"blur"}],isShow:[{required:!0,message:this.$t("shopTypeManage.isShowRequired"),trigger:"change"}],isDefault:[{required:!0,message:this.$t("shopTypeManage.isDefaultRequired"),trigger:"change"}],seq:[{required:!0,message:this.$t("shopTypeManage.seqRequired"),trigger:"blur"},{pattern:/^\d+$/,message:this.$t("shopTypeManage.seqNotNumber"),trigger:"blur"}],serviceFee:[{required:!0,message:this.$t("shopTypeManage.serviceFeeRequired"),trigger:"blur"}]}}},methods:{open(e){this.formData={...e},this.dialogVisible=!0},resetForm(){this.$refs.form.resetFields(),this.formData={shopTypeId:"",typeName:"",isShow:"",isDefault:"",seq:"",serviceFee:"",remark:""}},submitForm(){this.$refs.form.validate(async e=>{if(e)try{const{code:e,msg:t}=await Object(r["d"])(this.formData);if(0!=e)return void this.$message.error(t);this.$message.success(this.$t("shopTypeManage.editSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(t){console.error(t)}})}}},f=y,g=Object(h["a"])(f,d,m,!1,null,null,null),T=g.exports,b=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("shopTypeManage.confirmOperation"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.resetForm}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("shopTypeManage.confirmDeleteShopType")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v(" "+e._s(e.$t("shopTypeManage.cancel"))+" ")]),t("el-button",{attrs:{type:"primary"},on:{click:e.confirmDelete}},[e._v(" "+e._s(e.$t("shopTypeManage.confirmDelete"))+" ")])],1)])},$=[],M={name:"DeleteShopType",data(){return{dialogVisible:!1,shopTypeId:""}},methods:{open(e){this.shopTypeId=e.shopTypeId,this.dialogVisible=!0},resetForm(){this.shopTypeId=""},async confirmDelete(){try{const{code:e,msg:t}=await Object(r["a"])({shopTypeId:this.shopTypeId});if(0!=e)return void this.$message.error(t);this.$message.success(this.$t("shopTypeManage.deleteSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(e){console.error(e)}}}},v=M,S=Object(h["a"])(v,b,$,!1,null,null,null),D=S.exports,w={name:"ShopTypeManage",components:{AddShopType:u,EditShopType:T,DeleteShopType:D},data(){return{shopTypeManageInfo:{shopTypes:[],total:0,conditions:{typeName:"",isShow:"",isDefault:"",page:1,row:10}}}},created(){this._listShopTypes()},methods:{async _listShopTypes(){try{const e=await Object(r["b"])(this.shopTypeManageInfo.conditions);this.shopTypeManageInfo.shopTypes=e.data,this.shopTypeManageInfo.total=e.total}catch(e){console.error(e)}},_openAddShopTypeModal(){this.$refs.addShopType.open()},_openEditShopTypeModel(e){this.$refs.editShopType.open(e)},_openDeleteShopTypeModel(e){this.$refs.deleteShopType.open(e)},_queryShopTypeMethod(){this.shopTypeManageInfo.conditions.page=1,this._listShopTypes()},handleSizeChange(e){this.shopTypeManageInfo.conditions.row=e,this._listShopTypes()},handleCurrentChange(e){this.shopTypeManageInfo.conditions.page=e,this._listShopTypes()}}},q=w,_=(a("41b28"),Object(h["a"])(q,s,o,!1,null,"3bb45a30",null));t["default"]=_.exports},ff56:function(e,t,a){"use strict";a.d(t,"b",(function(){return o})),a.d(t,"c",(function(){return r})),a.d(t,"d",(function(){return i})),a.d(t,"a",(function(){return l}));var s=a("b775");function o(e){return new Promise((t,a)=>{Object(s["a"])({url:"/shopType.queryShopType",method:"get",params:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function r(e){return new Promise((t,a)=>{Object(s["a"])({url:"/shopType.saveShopType",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function i(e){return new Promise((t,a)=>{Object(s["a"])({url:"/shopType.updateShopType",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}function l(e){return new Promise((t,a)=>{Object(s["a"])({url:"/shopType.deleteShopType",method:"post",data:e}).then(e=>{const a=e.data;t(a)}).catch(e=>{a(e)})})}}}]);
//# sourceMappingURL=chunk-b5f71524.5296b92a.js.map