mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-06-11 14:17:25 +08:00
优化完成家庭成员删除
This commit is contained in:
parent
786dc15053
commit
fc2d85b70b
@ -156,3 +156,37 @@ export function deleteUserAddress(_data){
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* add by wuxw
|
||||
* @param {Object} _data 删除家庭成员
|
||||
*/
|
||||
export function deleteOwnerMember(_data){
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
if(_data.memberId == ''){
|
||||
reject("成员ID不能为空");
|
||||
return ;
|
||||
}else if(_data.communityId == ''){
|
||||
reject("小区不能为空");
|
||||
return ;
|
||||
}
|
||||
request({
|
||||
url: url.deleteOwner,
|
||||
method: "POST",
|
||||
data: _data, //动态数据
|
||||
success: function(res) {
|
||||
let _data = res.data;
|
||||
if (_data.code == 0) {
|
||||
resolve(_data);
|
||||
return ;
|
||||
}
|
||||
reject(_data.msg);
|
||||
},
|
||||
fail: function(e) {
|
||||
reject(e);
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
@ -90,17 +90,18 @@ export default {
|
||||
toOweFeePay: baseUrl + "app/payment/toOweFeePay", //欠费缴费
|
||||
queryRentingPool: baseUrl + 'app/renting/queryRentingPool',
|
||||
saveRentingAppointment: baseUrl + 'app/rentingAppointment/saveRentingAppointment', //房屋预约
|
||||
queryActivitiesType: baseUrl +'app/activitiesType/queryActivitiesType',
|
||||
queryProductLabel: baseUrl +'app/product/queryProductLabel',
|
||||
queryGroupBuyProduct: baseUrl +'app/groupBuy/queryGroupBuyProduct',
|
||||
queryProduct: baseUrl +'app/product/queryProduct',
|
||||
saveStoreCart: baseUrl +'app/storeOrder/saveStoreCart',
|
||||
queryStoreCart: baseUrl +'app/storeOrder/queryStoreCart',
|
||||
queryActivitiesType: baseUrl + 'app/activitiesType/queryActivitiesType',
|
||||
queryProductLabel: baseUrl + 'app/product/queryProductLabel',
|
||||
queryGroupBuyProduct: baseUrl + 'app/groupBuy/queryGroupBuyProduct',
|
||||
queryProduct: baseUrl + 'app/product/queryProduct',
|
||||
saveStoreCart: baseUrl + 'app/storeOrder/saveStoreCart',
|
||||
queryStoreCart: baseUrl + 'app/storeOrder/queryStoreCart',
|
||||
queryUserAddress: baseUrl + 'app/userAddress/queryUserAddress',
|
||||
saveUserAddress: baseUrl + 'app/userAddress/saveUserAddress',
|
||||
deleteUserAddress: baseUrl+'app/userAddress/deleteUserAddress',
|
||||
goodsUnifieldOrder: baseUrl +'goods/unifieldOrder',
|
||||
|
||||
deleteUserAddress: baseUrl + 'app/userAddress/deleteUserAddress',
|
||||
goodsUnifieldOrder: baseUrl + 'goods/unifieldOrder',
|
||||
deleteOwner: baseUrl + "/app/owner.deleteOwner",
|
||||
|
||||
NEED_NOT_LOGIN_PAGE: [
|
||||
'/pages/login/login',
|
||||
'/pages/register/register',
|
||||
|
||||
@ -24,6 +24,10 @@
|
||||
<view class="text-gray">成员性别</view>
|
||||
<view class="text-gray">{{item.sex == 0? '男': '女'}}</view>
|
||||
</view>
|
||||
|
||||
<view class="solid-top flex justify-end margin-top padding-top-sm padding-bottom-sm">
|
||||
<button class="cu-btn sm bg-red " @click="_deleteOwnerMember(item)">删除</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
@ -39,22 +43,44 @@
|
||||
<button class="cu-btn bg-green shadow-blur lgplus sharp" @click="goAdd()">添加成员</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-modal" :class="delOwnerMemberFlag==true?'show':''">
|
||||
<view class="cu-dialog">
|
||||
<view class="cu-bar bg-white justify-end">
|
||||
<view class="content">温馨提示</view>
|
||||
<view class="action" @tap="_cancleCall()">
|
||||
<text class="cuIcon-close text-red"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="padding-xl">
|
||||
您确认删除该成员?
|
||||
</view>
|
||||
<view class="cu-bar bg-white justify-end">
|
||||
<view class="action margin-0 flex-sub solid-left" @tap="_cancleDeleteOwnerMember()">取消</view>
|
||||
<view class="action margin-0 flex-sub text-green solid-left" @tap="_doDeleteOwnerMember()">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const context = require("../../context/Java110Context.js");
|
||||
const constant = context.constant;
|
||||
import noDataPage from '@/components/no-data-page/no-data-page.vue'
|
||||
import noDataPage from '@/components/no-data-page/no-data-page.vue';
|
||||
|
||||
import {deleteOwnerMember} from '../../api/owner/ownerApi.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
owners: [],
|
||||
delOwnerMemberFlag:false,
|
||||
page: 1,
|
||||
totalPage: 0,
|
||||
loading: false,
|
||||
communityId: '',
|
||||
ownerId: ''
|
||||
ownerId: '',
|
||||
curOwnerMember:{}
|
||||
};
|
||||
},
|
||||
components: {
|
||||
@ -64,13 +90,8 @@
|
||||
context.onLoad(options);
|
||||
},
|
||||
onShow: function() {
|
||||
let that = this;
|
||||
context.getOwner(function(_owner) {
|
||||
console.log(_owner.communityId, 99999999);
|
||||
that.communityId = _owner.communityId;
|
||||
that.ownerId = _owner.memberId;
|
||||
that.getTable(1);
|
||||
});
|
||||
this._initData();
|
||||
|
||||
},
|
||||
onPullDownRefresh: function() {
|
||||
// 上拉刷新
|
||||
@ -90,6 +111,16 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
_initData:function(){
|
||||
let that = this;
|
||||
that.owners = [];
|
||||
context.getOwner(function(_owner) {
|
||||
console.log(_owner.communityId, 99999999);
|
||||
that.communityId = _owner.communityId;
|
||||
that.ownerId = _owner.memberId;
|
||||
that.getTable(1);
|
||||
});
|
||||
},
|
||||
getTable: function(page, override) {
|
||||
let that = this;
|
||||
this.loading = true;
|
||||
@ -122,6 +153,32 @@
|
||||
uni.navigateTo({
|
||||
url: "/pages/family/family"
|
||||
})
|
||||
},
|
||||
_deleteOwnerMember:function(item){
|
||||
this.delOwnerMemberFlag = true;
|
||||
this.curOwnerMember = item;
|
||||
},
|
||||
_cancleDeleteOwnerMember:function(item){
|
||||
this.delOwnerMemberFlag = false;
|
||||
},
|
||||
_doDeleteOwnerMember:function(){
|
||||
let that = this;
|
||||
this.curOwnerMember.communityId = this.communityId;
|
||||
deleteOwnerMember(this.curOwnerMember)
|
||||
.then((res)=>{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:'删除成功'
|
||||
});
|
||||
that._cancleDeleteOwnerMember();
|
||||
that._initData();
|
||||
},(err)=>{
|
||||
uni.showToast({
|
||||
icon:'none',
|
||||
title:err
|
||||
});
|
||||
that._cancleDeleteOwnerMember();
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user