This commit is contained in:
2024-04-09 10:43:58 +08:00
parent 417ba1454c
commit ba1817583d
12 changed files with 109 additions and 41 deletions

View File

@@ -1,3 +1,5 @@
import { getInvoiceInfoList } from "../../../../service/invoice"
// pages/invoiceList/components/info/index.js
Component({
@@ -7,7 +9,11 @@ Component({
properties: {
},
lifetimes: {
attached() {
getInvoiceInfoList()
}
},
/**
* 组件的初始数据
*/

View File

@@ -12,13 +12,24 @@ Component({
* 组件的初始数据
*/
data: {
chooseList: []
},
/**
* 组件的方法列表
*/
methods: {
onChange(e) {
const { id } = e.currentTarget.dataset;
let newList = this.data.chooseList;
if (e.detail) {
newList = [...new Set([...newList, id])]
} else {
newList = newList.filter(item => item !== id);
}
this.setData({
chooseList: newList,
})
}
}
})

View File

@@ -1,4 +1,6 @@
{
"component": true,
"usingComponents": {}
"usingComponents": {
"van-checkbox": "@vant/weapp/checkbox/index"
}
}

View File

@@ -1,2 +1,25 @@
<!--pages/invoiceList/components/notyet/index.wxml-->
<text>pages/invoiceList/components/notyet/index.wxml</text>
<van-checkbox-group value="{{ chooseList }}" bind:change="onChange" max="{{ 2 }}">
<view class="cardWrapper">
<view class="content">
<view class="left">
<view class="top">
<van-checkbox name="{{12}}" shape="square" bind:change="onChange" data-id="12" />
<view class="month">1月份</view>
<view class="address"> 软C306 </view>
</view>
<view class="middle">
河北创新风华科技有限公司
</view>
<view class="bottom">
2024年1月1日-2024年1月31日
</view>
</view>
<view class="right">
待开票
</view>
</view>
</view>
</van-checkbox-group>

View File

@@ -1 +1,37 @@
/* pages/invoiceList/components/notyet/index.wxss */
/* pages/invoiceList/components/notyet/index.wxss */
.cardWrapper {
margin: 30rpx 32rpx 30rpx;
position: relative;
padding: 30rpx 40rpx;
background-color: #fff;
border-radius: 20rpx;
}
.top {
display: flex;
}
.top .address {
margin-left: 36rpx;
}
.middle {
margin-top: 26rpx;
font-size: 32rpx;
}
.bottom {
margin-top: 24rpx;
font-size: 32rpx;
}
.right {
position: absolute;
top: 0;
right: 0;
font-size: 30rpx;
background-color: rgb(239,227,227);
padding: 14rpx 24rpx;
border-radius: 18rpx;
color: rgb(224, 106, 106)
}

View File

@@ -40,8 +40,8 @@ Page({
this.init();
},
async init() {
const { data, code, message } = await getInvoiceInfoList()
this.setData({ list: data })
// const { data, code, message } = await getInvoiceInfoList()
// this.setData({ list: data })
},
operate(e) {
const { data } = e.currentTarget.dataset;

View File

@@ -1,15 +1,3 @@
/* pages/invoiceList/index.wxss */
.wrapper {
margin-left: 24rpx;
margin-right: 24rpx;
}
.item {
display: flex;
align-items: center;
margin: 10rpx 0;
}
.operate {
display: flex;
page {
background-color: rgb(228,240,236);
}