正在显示
3 个修改的文件
包含
61 行增加
和
24 行删除
images/add_extra.png
0 → 100644
2.5 KB
... | ... | @@ -5,10 +5,10 @@ Page({ |
5 | 5 | * Page initial data |
6 | 6 | */ |
7 | 7 | data: { |
8 | - info:[{}], | |
9 | - projectlist: ["正常工资薪金", "劳务报酬", "稿酬", "特许经营权使用费"], | |
8 | + infoList:[{}], | |
9 | + project: ["正常工资薪金", "劳务报酬", "稿酬", "特许经营权使用费"], | |
10 | 10 | deductcontent:["1","2"], |
11 | - deductproperty: ["---", "===="], | |
11 | + deductproperty: ["其他"], | |
12 | 12 | }, |
13 | 13 | |
14 | 14 | /** |
... | ... | @@ -32,6 +32,33 @@ Page({ |
32 | 32 | |
33 | 33 | }, |
34 | 34 | |
35 | +// 所得项目 | |
36 | + bindProjectChange:function(e){}, | |
37 | + | |
38 | +// 减免事项名称 | |
39 | + bindDeductContent: function (e) { }, | |
40 | + | |
41 | +// 减免性质名称 | |
42 | + bindDeductProperty: function (e) { }, | |
43 | + | |
44 | +// 免税收入金额 | |
45 | + bindIncome: function (e) { | |
46 | + | |
47 | + }, | |
48 | + | |
49 | + addItem:function(){//继续添加 | |
50 | + var info = this.data.infoList; | |
51 | + console.log(info); | |
52 | + info.push(this.data.infoList.length); | |
53 | + this.setData({ | |
54 | + infoList: info | |
55 | + }); | |
56 | + }, | |
57 | + | |
58 | + formSubmit: function (e) { | |
59 | + console.log('form发生了submit事件,携带数据为:', e.detail.value) | |
60 | + }, | |
61 | + | |
35 | 62 | /** |
36 | 63 | * Lifecycle function--Called when page hide |
37 | 64 | */ | ... | ... |
1 | - | |
2 | 1 | <view class="page"> |
3 | 2 | <view style="background:#fff;padding:0 30rpx;"> |
4 | 3 | <text class="text_gray7_34">免税收入合计</text> |
5 | 4 | <text class="text_black3_34 float_right">{{3000}}</text> |
6 | 5 | </view> |
7 | 6 | |
8 | - <view style="background:#fff;margin-top:20rpx" wx:for="{{info}}"> | |
9 | - <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindRegionChange" range="{{project}}" > | |
10 | - <text class="text_gray7_34">所得项目</text> | |
11 | - <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | |
12 | - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='' value="{{}}"></input> | |
13 | - </picker> | |
14 | - <view class="divide_line_30"></view> | |
15 | - <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindRegionChange" range="{{deductcontent}}" > | |
16 | - <text class="text_gray7_34">减免事项名称</text> | |
17 | - <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | |
18 | - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='' value="{{}}"></input> | |
19 | - </picker> | |
20 | - <view class="divide_line_30"></view> | |
21 | - <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindRegionChange" range="{{deductproperty}}" > | |
22 | - <text class="text_gray7_34">减免性质名称</text> | |
23 | - <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | |
24 | - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' name='' value="{{}}"></input> | |
25 | - </picker> | |
26 | - <view class="divide_line_30"></view> | |
7 | + <form style="background:#fff;" bindsubmit="formSubmit"> | |
8 | + <view wx:for="{{infoList}}" style="margin-top:20rpx"> | |
9 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindProjectChange" range="{{project}}"> | |
10 | + <text class="text_gray7_34">所得项目</text> | |
11 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | |
12 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='' value="{{}}"></input> | |
13 | + </picker> | |
14 | + <view class="divide_line_30"></view> | |
15 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductContent" range="{{deductcontent}}"> | |
16 | + <text class="text_gray7_34">减免事项名称</text> | |
17 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | |
18 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='' value="{{}}"></input> | |
19 | + </picker> | |
20 | + <view class="divide_line_30"></view> | |
21 | + <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductProperty" range="{{deductproperty}}"> | |
22 | + <text class="text_gray7_34">减免性质名称</text> | |
23 | + <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | |
24 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' name='' value="{{}}"></input> | |
25 | + </picker> | |
26 | + <view class="divide_line_30"></view> | |
27 | + <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> | |
28 | + <text class="text_gray7_34">免税收入金额</text> | |
29 | + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' name='name' type="digit" bindblur="bindIncome" value="{{}}"></input> | |
30 | + </view> | |
31 | + </view> | |
32 | + | |
33 | + <view style="background:#fff;margin-top:20rpx;height:104rpx;display:flex;align-items:center;justify-content:center;padding-bottom:84rpx" bindtap="addItem"> | |
34 | + <image style="width:28rpx;height:28rpx;margin-right:16rpx" src="/images/add_extra.png"></image> | |
35 | + <text style="font-size:28rpx;color:#4986fe">继续添加</text> | |
27 | 36 | </view> |
28 | - <view class="btn_bottom"> | |
37 | + <view class="btn_bottom" formType="submit"> | |
29 | 38 | <button class="btn_bottom" formType="submit">保存</button> |
30 | 39 | </view> |
40 | + </form> | |
31 | 41 | </view> |
\ No newline at end of file | ... | ... |
请
注册
或
登录
后发表评论