开始做开票信息编辑

This commit is contained in:
2024-04-24 16:54:11 +08:00
parent d41978e2e8
commit ff36356543
34 changed files with 549 additions and 274 deletions

View File

@@ -1,63 +0,0 @@
import { approveUser, getApproveList } from "../../../../service/user"
import { alertInfo, alertSuccess, wxModal } from "../../../../utils/index";
import request from "../../../../utils/request"
const { OK } = request;
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
list: []
},
lifetimes: {
attached: function() {
// this.setData({
// list: []
// })
this.init();
}
},
/**
* 组件的方法列表
*/
methods: {
async init() {
const result = await getApproveList()
this.setData({
list: result.data
})
},
async agree(e) {
const { user } = e.currentTarget.dataset;
await wxModal({ content: `同意${user.nickName}的申请?` })
const { code, message } = await approveUser({ userId: user.id, type: 1 })
if (code !== OK) {
alertInfo(message)
return;
}
alertSuccess("已同意")
this.init()
},
async disAgree(e) {
const { user } = e.currentTarget.dataset;
await wxModal({ content: `拒绝${user.nickName}的申请?` })
const { code, message } = await approveUser({ userId: user.id, type: 0 })
if (code !== OK) {
alertInfo(message)
return;
}
alertSuccess("已拒绝")
this.init()
}
}
})

View File

@@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -1,8 +0,0 @@
<!--pages/member/components/approveMember/index.wxml-->
<view wx:for="{{list}}" wx:key="index" wx:for-item="item" class="item">
<view class="nickName"> {{ item.nickName }} </view>
<view class="operate">
<view class="primaryTextBtn" data-user="{{item}}" bind:tap="agree"> 同意 </view>
<view class="disAgree dangerTextBtn" data-user="{{item}}" bind:tap="disAgree"> 拒绝 </view>
</view>
</view>

View File

@@ -1,21 +0,0 @@
/* pages/member/components/approveMember/index.wxss */
.item {
display: flex;
align-items: center;
padding-top: 24rpx;
padding-bottom: 24rpx;
margin-left: 32rpx;
margin-right: 32rpx;
}
.nickName {
flex: 1;
}
.operate {
display: flex;
}
.disAgree {
margin-left: 24rpx;
}

View File

@@ -1,8 +1,6 @@
{
"component": true,
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"avatar": "/components/avatar/index",
"van-button": "@vant/weapp/button/index"
}

View File

@@ -1,15 +1,13 @@
<van-tabs active="{{ active }}" bind:change="onChange">
<van-tab wx:for="{{list}}" wx:key="index" title="{{item.name}}">
<view wx:for="{{item.users}}" wx:key="index" wx:for-item="ele" class="item">
<view wx:for="{{list}}" wx:key="index" wx:for-item="ele" class="item">
<avatar text="{{ele.name}}" />
<view class="info">
<view class="nickName"> {{ ele.name }} </view>
<view class="phone"> {{ ele.phone }} </view>
</view>
<view class="operate">
<view class="operate" wx:if="{{!ele.isAdmin}}">
<van-button type="info" size="small" data-user="{{ele}}" bind:click="setAdmin" data-tenement="{{item.id}}" style="margin-bottom: 16rpx;" class="admin">设为管理员</van-button>
<van-button type="danger" size="small" data-user="{{ele}}" bind:click="remove" data-tenement="{{item.id}}" class="remove">移除</van-button>
</view>
</view>
</van-tab>
</van-tabs>

View File

@@ -2,7 +2,6 @@
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"approve-member": "./components/approveMember/index",
"member-manage": "./components/memberManage/index",
"navigator": "/components/navigator/index"
},