(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-71a66fae"],{e004:function(t,e,n){},fa47:function(t,e,n){"use strict";n("e004")},fec5:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t._self._c;return e("div",[e("el-card",{},[e("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[e("span",[t._v(t._s(t.$t("integralSetting.title")))]),e("el-button",{staticStyle:{float:"right",padding:"3px 0"},attrs:{type:"text"},on:{click:t.showMarkdown}},[t._v(" "+t._s(t.$t("common.document"))+" ")])],1),e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.integralSettingInfo.integralSettings,border:""}},[e("el-table-column",{attrs:{prop:"settingId",label:t.$t("integralSetting.id"),align:"center",width:"120"}}),e("el-table-column",{attrs:{label:t.$t("integralSetting.money"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s(t.$t("integralSetting.onePointEquals"))+t._s(e.row.money)+t._s(t.$t("integralSetting.yuan"))+" ")]}}])}),e("el-table-column",{attrs:{prop:"remark",label:t.$t("integralSetting.usage"),align:"center"}}),e("el-table-column",{attrs:{label:t.$t("integralSetting.shopping"),align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s("Y"===e.row.goodsFlag?t.$t("common.yes"):t.$t("common.no"))+" ")]}}])}),e("el-table-column",{attrs:{label:t.$t("integralSetting.payment"),align:"center",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v(" "+t._s("Y"===e.row.feeFlag?t.$t("common.yes"):t.$t("common.no"))+" ")]}}])}),e("el-table-column",{attrs:{label:t.$t("common.operation"),align:"center",width:"150"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t.openEditIntegralSettingModel(n.row)}}},[t._v(" "+t._s(t.$t("common.edit"))+" ")])]}}])})],1),e("el-pagination",{attrs:{"current-page":t.pagination.currentPage,"page-size":t.pagination.pageSize,total:t.pagination.total,layout:"total, prev, pager, next"},on:{"current-change":t.handlePageChange}})],1),e("edit-integral-setting",{ref:"editIntegralSetting",on:{refresh:t.listIntegralSettings}})],1)},i=[],l=n("b775");function o(t){return new Promise((e,n)=>{Object(l["a"])({url:"/integral.listIntegralSetting",method:"get",params:t}).then(t=>{const n=t.data;e(n)}).catch(t=>{n(t)})})}function r(t){return new Promise((e,n)=>{Object(l["a"])({url:"/integral.updateIntegralSetting",method:"post",data:t}).then(t=>{const a=t.data;0===a.code?e(a):n(new Error(a.msg))}).catch(t=>{n(t)})})}var s=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.$t("integralSetting.editTitle"),visible:t.dialogVisible,width:"70%"},on:{"update:visible":function(e){t.dialogVisible=e},close:t.handleClose}},[e("el-form",{ref:"form",attrs:{model:t.editIntegralSettingInfo,"label-width":"120px","label-position":"left"}},[e("el-form-item",{attrs:{label:t.$t("integralSetting.money"),prop:"money",rules:[{required:!0,message:t.$t("integralSetting.moneyRequired")},{max:12,message:t.$t("integralSetting.moneyMaxLength")}]}},[e("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("integralSetting.moneyPlaceholder")},model:{value:t.editIntegralSettingInfo.money,callback:function(e){t.$set(t.editIntegralSettingInfo,"money",e)},expression:"editIntegralSettingInfo.money"}},[e("template",{slot:"prepend"},[t._v(t._s(t.$t("integralSetting.onePointEquals")))]),e("template",{slot:"append"},[t._v(t._s(t.$t("integralSetting.yuan")))])],2)],1),e("el-form-item",{attrs:{label:t.$t("integralSetting.shopping"),prop:"goodsFlag",rules:[{required:!0,message:t.$t("integralSetting.shoppingRequired")}]}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("integralSetting.shoppingPlaceholder")},model:{value:t.editIntegralSettingInfo.goodsFlag,callback:function(e){t.$set(t.editIntegralSettingInfo,"goodsFlag",e)},expression:"editIntegralSettingInfo.goodsFlag"}},[e("el-option",{attrs:{label:t.$t("common.yes"),value:"Y"}}),e("el-option",{attrs:{label:t.$t("common.no"),value:"N"}})],1)],1),e("el-form-item",{attrs:{label:t.$t("integralSetting.payment"),prop:"feeFlag",rules:[{required:!0,message:t.$t("integralSetting.paymentRequired")}]}},[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.$t("integralSetting.paymentPlaceholder")},model:{value:t.editIntegralSettingInfo.feeFlag,callback:function(e){t.$set(t.editIntegralSettingInfo,"feeFlag",e)},expression:"editIntegralSettingInfo.feeFlag"}},[e("el-option",{attrs:{label:t.$t("common.yes"),value:"Y"}}),e("el-option",{attrs:{label:t.$t("common.no"),value:"N"}})],1)],1),e("el-form-item",{attrs:{label:t.$t("integralSetting.usage"),prop:"remark",rules:[{required:!0,message:t.$t("integralSetting.usageRequired")},{max:512,message:t.$t("integralSetting.usageMaxLength")}]}},[e("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",placeholder:t.$t("integralSetting.usagePlaceholder"),rows:4},model:{value:t.editIntegralSettingInfo.remark,callback:function(e){t.$set(t.editIntegralSettingInfo,"remark",e)},expression:"editIntegralSettingInfo.remark"}})],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.dialogVisible=!1}}},[t._v(" "+t._s(t.$t("common.cancel"))+" ")]),e("el-button",{attrs:{type:"primary"},on:{click:t.handleSubmit}},[t._v(" "+t._s(t.$t("common.save"))+" ")])],1)],1)},g=[],c={name:"EditIntegralSetting",data(){return{dialogVisible:!1,editIntegralSettingInfo:{settingId:"",money:"",remark:"",goodsFlag:"",feeFlag:""}}},methods:{open(t){this.dialogVisible=!0,this.$nextTick(()=>{this.editIntegralSettingInfo={...t},this.$refs.form&&this.$refs.form.clearValidate()})},handleClose(){this.$refs.form.resetFields()},async handleSubmit(){try{await this.$refs.form.validate(),await r(this.editIntegralSettingInfo),this.$message.success(this.$t("common.saveSuccess")),this.dialogVisible=!1,this.$emit("refresh")}catch(t){this.$message.error(t),console.error("保存失败:",t)}}}},d=c,m=n("2877"),u=Object(m["a"])(d,s,g,!1,null,null,null),p=u.exports,f={name:"IntegralSetting",components:{EditIntegralSetting:p},data(){return{integralSettingInfo:{integralSettings:[],conditions:{money:"",remark:"",thirdFlag:""}},pagination:{currentPage:1,pageSize:10,total:0}}},created(){this.listIntegralSettings()},methods:{async listIntegralSettings(t=1,e=10){this.pagination.currentPage=t;const n={...this.integralSettingInfo.conditions,page:t,row:e};try{const t=await o(n);this.integralSettingInfo.integralSettings=t.data,this.pagination.total=t.records}catch(a){console.error("获取积分设置列表失败:",a)}},openEditIntegralSettingModel(t){this.$refs.editIntegralSetting.open(t)},handlePageChange(t){this.listIntegralSettings(t)},showMarkdown(){console.log("showMarkdown")}}},h=f,S=(n("fa47"),Object(m["a"])(h,a,i,!1,null,"3ccdce5d",null));e["default"]=S.exports}}]); //# sourceMappingURL=chunk-71a66fae.9df519f9.js.map