2 lines
7.6 KiB
JavaScript
2 lines
7.6 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-d11b7180"],{"0f29":function(t,e,o){},"1a67":function(t,e,o){"use strict";o("0f29")},4890:function(t,e,o){"use strict";o("6943")},6943:function(t,e,o){},7506:function(t,e,o){"use strict";o("ab1c")},ab1c:function(t,e,o){},c37d:function(t,e,o){"use strict";o.r(e);var l=function(){var t=this,e=t._self._c;return e("div",[e("el-card",[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("div",[t._v(t._s(t.$t("gold.queryCondition")))])]),e("div",{},[e("el-form",{staticClass:"flex justify-start",attrs:{inline:!0,model:t.goldInfo.conditions}},[e("el-form-item",[e("el-input",{attrs:{placeholder:t.$t("gold.communityNamePlaceholder"),clearable:""},model:{value:t.goldInfo.conditions.communityName,callback:function(e){t.$set(t.goldInfo.conditions,"communityName",e)},expression:"goldInfo.conditions.communityName"}})],1),e("el-form-item",[e("el-input",{attrs:{placeholder:t.$t("gold.communityIdPlaceholder"),clearable:""},model:{value:t.goldInfo.conditions.communityId,callback:function(e){t.$set(t.goldInfo.conditions,"communityId",e)},expression:"goldInfo.conditions.communityId"}})],1),e("el-form-item",[e("el-button",{attrs:{type:"primary"},on:{click:function(e){return t._queryGoldMethod()}}},[e("i",{staticClass:"el-icon-search"}),t._v(" "+t._s(t.$t("gold.query"))+" ")])],1)],1)],1)]),e("el-card",{staticClass:"margin-top-sm"},[e("div",{staticClass:"flex justify-between",attrs:{slot:"header"},slot:"header"},[e("div",[t._v(t._s(t.$t("gold.communityGold")))]),e("div",{staticClass:"ibox-tools",staticStyle:{top:"10px"}},[e("el-button",{attrs:{type:"text"},on:{click:function(e){return t.vc.toDoc("/pages/mall/goods/buyGoodSendGold_mall.html")}}},[t._v(" "+t._s(t.$t("gold.document"))+" ")])],1)]),e("div",{},[e("el-table",{staticStyle:{width:"100%"},attrs:{data:t.goldInfo.golds,border:"","default-sort":{prop:"goldId",order:"ascending"}}},[e("el-table-column",{attrs:{prop:"goldId",label:t.$t("gold.goldAccount"),align:"center"}}),e("el-table-column",{attrs:{prop:"storeName",label:t.$t("gold.propertyCompany"),align:"center"}}),e("el-table-column",{attrs:{prop:"communityName",label:t.$t("gold.communityName"),align:"center"}}),e("el-table-column",{attrs:{prop:"communityId",label:t.$t("gold.communityId"),align:"center"}}),e("el-table-column",{attrs:{prop:"amount",label:t.$t("gold.balance"),align:"center"}}),e("el-table-column",{attrs:{label:t.$t("gold.operation"),align:"center"},scopedSlots:t._u([{key:"default",fn:function(o){return[e("el-button-group",[e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t._openEditGoldModel(o.row)}}},[t._v(" "+t._s(t.$t("gold.edit"))+" ")]),e("el-button",{attrs:{size:"mini"},on:{click:function(e){return t._openDeleteGoldModel(o.row)}}},[t._v(" "+t._s(t.$t("gold.delete"))+" ")])],1)]}}])})],1),e("el-pagination",{attrs:{"current-page":t.goldInfo.conditions.page,"page-size":t.goldInfo.conditions.row,layout:"total, prev, pager, next, jumper",total:t.goldInfo.total},on:{"current-change":t.handleCurrentChange}})],1)]),e("edit-gold",{ref:"editGold",on:{refresh:t.queryGold}}),e("delete-gold",{ref:"deleteGold",on:{refresh:t.queryGold}})],1)},d=[],i=o("b775");function n(t){return new Promise((e,o)=>{Object(i["a"])({url:"/gold.listGold",method:"get",params:t}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function s(t){return new Promise((e,o)=>{Object(i["a"])({url:"/gold.updateGold",method:"post",data:t}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}function a(t){return new Promise((e,o)=>{Object(i["a"])({url:"/gold.deleteGold",method:"post",data:t}).then(t=>{const o=t.data;e(o)}).catch(t=>{o(t)})})}var r=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.$t("editGold.edit"),visible:t.dialogVisible,width:"60%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("div",{staticClass:"dialog-card"},[e("el-form",{attrs:{model:t.editGoldInfo,"label-width":"120px"}},[e("el-form-item",{attrs:{label:t.$t("editGold.name")}},[e("el-input",{attrs:{placeholder:t.$t("editGold.namePlaceholder"),disabled:""},model:{value:t.editGoldInfo.goldName,callback:function(e){t.$set(t.editGoldInfo,"goldName",e)},expression:"editGoldInfo.goldName"}})],1),e("el-form-item",{attrs:{label:t.$t("editGold.amount")}},[e("el-input",{attrs:{placeholder:t.$t("editGold.amountPlaceholder")},model:{value:t.editGoldInfo.amount,callback:function(e){t.$set(t.editGoldInfo,"amount",e)},expression:"editGoldInfo.amount"}})],1)],1)],1),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.handleClose}},[t._v(t._s(t.$t("common.cancel")))]),e("el-button",{attrs:{type:"primary"},on:{click:t.editGold}},[t._v(t._s(t.$t("common.save")))])],1)])},c=[],u={name:"EditGold",data(){return{dialogVisible:!1,editGoldInfo:{goldId:"",goldName:"",amount:"",goldType:"",objId:"",link:""}}},methods:{open(t){this.resetForm(),Object.assign(this.editGoldInfo,t),this.dialogVisible=!0},handleClose(){this.dialogVisible=!1},resetForm(){this.editGoldInfo={goldId:"",goldName:"",amount:"",goldType:"",objId:"",link:""}},editGold(){this.validate()&&s(this.editGoldInfo).then(t=>{console.log(t),this.$message.success(this.$t("editGold.updateSuccess")),this.$emit("refresh"),this.handleClose()}).catch(t=>{this.$message.error(t.message||this.$t("editGold.updateFailed"))})},validate(){return this.editGoldInfo.amount?this.editGoldInfo.amount.length>10?(this.$message.error(this.$t("editGold.amountMaxLength")),!1):!!this.editGoldInfo.goldId||(this.$message.error(this.$t("editGold.idRequired")),!1):(this.$message.error(this.$t("editGold.amountRequired")),!1)}}},m=u,g=(o("4890"),o("2877")),h=Object(g["a"])(m,r,c,!1,null,"1e17ccb2",null),f=h.exports,p=function(){var t=this,e=t._self._c;return e("el-dialog",{attrs:{title:t.$t("deleteGold.confirmOperation"),visible:t.dialogVisible,width:"30%","before-close":t.handleClose},on:{"update:visible":function(e){t.dialogVisible=e}}},[e("div",{staticClass:"modal-body"},[e("p",{attrs:{align:"center"}},[t._v(t._s(t.$t("deleteGold.confirmDeleteGold")))])]),e("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:t.handleClose}},[t._v(t._s(t.$t("deleteGold.cancel")))]),e("el-button",{attrs:{type:"primary"},on:{click:t.deleteGold}},[t._v(t._s(t.$t("deleteGold.confirmDelete")))])],1)])},b=[],G={name:"DeleteGold",data(){return{dialogVisible:!1,deleteGoldInfo:{}}},methods:{open(t){this.deleteGoldInfo={...t},this.dialogVisible=!0},handleClose(){this.dialogVisible=!1},deleteGold(){a(this.deleteGoldInfo).then(t=>{console.log(t),this.$message.success(this.$t("deleteGold.deleteSuccess")),this.$emit("refresh"),this.handleClose()}).catch(t=>{this.$message.error(t.message||this.$t("deleteGold.deleteFailed"))})}}},I=G,$=(o("7506"),Object(g["a"])(I,p,b,!1,null,"4b9d5662",null)),y=$.exports,v={name:"Gold",components:{EditGold:f,DeleteGold:y},data(){return{goldInfo:{golds:[],total:0,records:1,moreCondition:!1,conditions:{page:1,row:10,communityName:"",communityId:""}}}},created(){this._listGolds(1,10)},methods:{handleCurrentChange(t){this._listGolds(t,this.goldInfo.conditions.row)},queryGold(){this._listGolds(1,10)},_listGolds(t,e){this.goldInfo.conditions.page=t,this.goldInfo.conditions.row=e,n(this.goldInfo.conditions).then(t=>{this.goldInfo.total=t.total,this.goldInfo.records=t.records,this.goldInfo.golds=t.data})},_openEditGoldModel(t){this.$refs.editGold.open(t)},_openDeleteGoldModel(t){this.$refs.deleteGold.open(t)},_queryGoldMethod(){this._listGolds(1,this.goldInfo.conditions.row)}}},_=v,C=(o("1a67"),Object(g["a"])(_,l,d,!1,null,"8ab42f14",null));e["default"]=C.exports}}]);
|
|
//# sourceMappingURL=chunk-d11b7180.63c001aa.js.map
|