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

2 lines
8.6 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-03812157"],{"0000":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e._self._c;return t("div",[t("el-card",{staticClass:"box-card"},[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("storeIntegral.queryCondition")))])]),t("div",{staticClass:"text item"},[t("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:e.storeIntegralInfo.conditions}},[t("el-form-item",[t("el-input",{attrs:{placeholder:e.$t("storeIntegral.placeholder.integralName"),clearable:""},model:{value:e.storeIntegralInfo.conditions.integralName,callback:function(t){e.$set(e.storeIntegralInfo.conditions,"integralName",t)},expression:"storeIntegralInfo.conditions.integralName"}})],1),t("el-form-item",[t("el-button",{attrs:{type:"primary"},on:{click:e._queryIntegralMethod}},[e._v(" "+e._s(e.$t("common.query"))+" ")])],1)],1)],1)]),t("el-card",{staticClass:"margin-top-sm"},[t("div",{staticClass:"clearfix flex justify-between",attrs:{slot:"header"},slot:"header"},[t("span",[e._v(e._s(e.$t("storeIntegral.title")))])]),t("div",{staticClass:"text item"},[t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.storeIntegralInfo.integrals,border:""}},[t("el-table-column",{attrs:{prop:"integralId",label:e.$t("storeIntegral.table.id"),align:"center",width:"100"}}),t("el-table-column",{attrs:{prop:"integralName",label:e.$t("storeIntegral.table.accountName"),align:"center"}}),t("el-table-column",{attrs:{prop:"objType",label:e.$t("storeIntegral.table.objectType"),align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s("7007"===t.row.objType?e.$t("storeIntegral.merchant"):e.$t("storeIntegral.user"))+" ")]}}])}),t("el-table-column",{attrs:{prop:"objId",label:e.$t("storeIntegral.table.objectId"),align:"center"}}),t("el-table-column",{attrs:{prop:"link",label:e.$t("storeIntegral.table.phone"),align:"center"}}),t("el-table-column",{attrs:{prop:"amount",label:e.$t("storeIntegral.table.points"),align:"center"}}),t("el-table-column",{attrs:{label:e.$t("common.operation"),align:"center",width:"250"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._changeIntegralAmount(a.row,"1001")}}},[e._v(" "+e._s(e.$t("storeIntegral.give"))+" ")]),a.row.amount>0?t("el-button",{attrs:{size:"mini"},on:{click:function(t){return e._changeIntegralAmount(a.row,"2002")}}},[e._v(" "+e._s(e.$t("storeIntegral.deduct"))+" ")]):e._e(),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e._openDeleteIntegralModel(a.row)}}},[e._v(" "+e._s(e.$t("common.delete"))+" ")])]}}])})],1),t("el-pagination",{staticStyle:{"margin-top":"20px"},attrs:{"current-page":e.currentPage,"page-size":e.pageSize,total:e.total,layout:"total, prev, pager, next"},on:{"current-change":e.handleCurrentChange}})],1)]),t("edit-integral",{ref:"editIntegral",on:{refresh:e.queryIntegral}}),t("delete-integral",{ref:"deleteIntegral",on:{refresh:e.queryIntegral}})],1)},l=[],r=a("8b81"),i=a("00ea"),o=a("e00f"),s={name:"StoreIntegral",components:{EditIntegral:i["a"],DeleteIntegral:o["a"]},data(){return{storeIntegralInfo:{integrals:[],total:0,records:1,conditions:{integralName:"",objType:"7007",objId:"",amount:""}},currentPage:1,pageSize:10}},created(){this._listIntegrals(this.currentPage,this.pageSize)},methods:{queryIntegral(){this._listIntegrals(1,10)},async _listIntegrals(e,t){try{const a={...this.storeIntegralInfo.conditions,page:e,row:t},n=await Object(r["c"])(a);this.storeIntegralInfo.integrals=n.data,this.storeIntegralInfo.total=n.total,this.storeIntegralInfo.records=n.records}catch(a){console.error(a)}},_queryIntegralMethod(){this.currentPage=1,this._listIntegrals(this.currentPage,this.pageSize)},_changeIntegralAmount(e,t){this.$refs.editIntegral.open({detailType:t,integralName:e.integralName,integralId:e.integralId,amount:e.amount,link:e.link})},_openDeleteIntegralModel(e){this.$refs.deleteIntegral.open(e)},handleCurrentChange(e){this.currentPage=e,this._listIntegrals(this.currentPage,this.pageSize)}}},c=s,d=(a("eb2d"),a("2877")),g=Object(d["a"])(c,n,l,!1,null,"7a85456c",null);t["default"]=g.exports},"00ea":function(e,t,a){"use strict";var n=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:"1001"===e.editIntegralInfo.detailType?e.$t("editIntegral.givePoints"):e.$t("editIntegral.deductPoints"),visible:e.dialogVisible,width:"50%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{attrs:{"label-width":"120px"}},[t("el-form-item",{attrs:{label:e.$t("editIntegral.pointsAccount")}},[t("el-input",{attrs:{disabled:""},model:{value:e.editIntegralInfo.integralName,callback:function(t){e.$set(e.editIntegralInfo,"integralName",t)},expression:"editIntegralInfo.integralName"}})],1),t("el-form-item",{attrs:{label:e.$t("editIntegral.remainingPoints")}},[t("el-input",{attrs:{disabled:""},model:{value:e.editIntegralInfo.amount,callback:function(t){e.$set(e.editIntegralInfo,"amount",t)},expression:"editIntegralInfo.amount"}})],1),t("el-form-item",{attrs:{label:"1001"===e.editIntegralInfo.detailType?e.$t("editIntegral.giveAmount"):e.$t("editIntegral.deductAmount")}},[t("el-input",{attrs:{type:"number"},model:{value:e.editIntegralInfo.value,callback:function(t){e.$set(e.editIntegralInfo,"value",t)},expression:"editIntegralInfo.value"}})],1),t("el-form-item",{attrs:{label:e.$t("editIntegral.remark")}},[t("el-input",{attrs:{type:"textarea",placeholder:e.$t("editIntegral.remarkPlaceholder")},model:{value:e.editIntegralInfo.remark,callback:function(t){e.$set(e.editIntegralInfo,"remark",t)},expression:"editIntegralInfo.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.editIntegral}},[e._v(e._s(e.$t("common.save")))])],1)],1)},l=[],r=a("8b81"),i={name:"EditIntegral",data(){return{dialogVisible:!1,editIntegralInfo:{detailType:"",integralName:"",integralId:"",amount:"",value:"",remark:""}}},methods:{open(e){this.editIntegralInfo={...e},this.dialogVisible=!0},handleClose(){this.editIntegralInfo={detailType:"",integralName:"",integralId:"",amount:"",value:"",remark:""}},async editIntegral(){if(this.validate())try{await Object(r["a"])(this.editIntegralInfo),this.$emit("refresh"),this.dialogVisible=!1,this.$message.success(this.$t("editIntegral.operateSuccess"))}catch(e){console.error(e)}},validate(){return!!this.editIntegralInfo.value||(this.$message.warning(this.$t("editIntegral.quantityRequired")),!1)}}},o=i,s=a("2877"),c=Object(s["a"])(o,n,l,!1,null,null,null);t["a"]=c.exports},"5d98":function(e,t,a){},"8b81":function(e,t,a){"use strict";a.d(t,"c",(function(){return l})),a.d(t,"a",(function(){return r})),a.d(t,"b",(function(){return i}));var n=a("b775");function l(e){return new Promise((t,a)=>{Object(n["a"])({url:"/integral.listIntegral",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(n["a"])({url:"/integral.changeIntegralAmount",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(n["a"])({url:"/integral.deleteIntegral",method:"post",data:e}).then(e=>{const n=e.data;0===n.code?t(n):a(new Error(n.msg)),t(n)}).catch(e=>{a(e)})})}},e00f:function(e,t,a){"use strict";var n=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("deleteIntegral.confirmOperation"),visible:e.dialogVisible,width:"30%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticStyle:{"text-align":"center"}},[t("p",[e._v(e._s(e.$t("deleteIntegral.confirmDeletePointsAccount")))])]),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("deleteIntegral.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.deleteIntegral}},[e._v(e._s(e.$t("deleteIntegral.confirmDelete")))])],1)])},l=[],r=a("8b81"),i={name:"DeleteIntegral",data(){return{dialogVisible:!1,deleteIntegralInfo:{}}},methods:{open(e){this.deleteIntegralInfo={...e},this.dialogVisible=!0},handleClose(){this.deleteIntegralInfo={}},async deleteIntegral(){try{await Object(r["b"])(this.deleteIntegralInfo),this.$emit("refresh"),this.dialogVisible=!1,this.$message.success(this.$t("deleteIntegral.deleteSuccess"))}catch(e){this.$message.error(e),console.error(e)}}}},o=i,s=a("2877"),c=Object(s["a"])(o,n,l,!1,null,null,null);t["a"]=c.exports},eb2d:function(e,t,a){"use strict";a("5d98")}}]);
//# sourceMappingURL=chunk-03812157.1575b3e6.js.map