add.vue
2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<template>
<view>
<view>
<uni-list>
<uni-list-item>
<view slot="header" class="slot-box"><text class="require">物料名称</text></view>
<template slot="footer">
<input class="uni-input" type="text" placeholder="请输入名称" />
</template>
</uni-list-item>
<uni-list-item>
<view slot="header" class="slot-box"><text class="require">物料编号</text></view>
<template slot="footer">
<input class="uni-input" type="number" placeholder="请输入编号" />
</template>
</uni-list-item>
<uni-list-item title="规格">
<template slot="footer">
<input class="uni-input" type="number" placeholder="请输入规格" />
</template>
</uni-list-item>
<uni-list-item title="单位">
<template slot="footer">
<input class="uni-input" type="number" placeholder="请输入单位" />
</template>
</uni-list-item>
<uni-list-item title="物料类型">
<template slot="footer">
<label class="radio"><radio value="r1" />成品</label>
<label class="radio"><radio value="r2" />原材料</label>
</template>
</uni-list-item>
</uni-list>
</view>
<view class="btn u-f u-f-aic">
<button>保存</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods:{
onNavigationBarButtonTap() {
uni.navigateTo({
url: "./material/add"
})
},
radioChange: function(evt) {
console.log(evt.target.value)
}
}
}
</script>
<style lang="scss" scoped>
.require {
// padding-left: 18rpx;
}
.uni-list-item__container {
.uni-input {
text-align: right;
}
.uni-label-pointer {
margin-left: 30rpx;
}
}
.slot-box {
position: relative;
&::after {
position: absolute;
content: '*';
color: red;
font-size: 50rpx;
top: 0;
left: -18rpx;
}
}
.btn {
position: fixed;
bottom: 0;
width: 100%;
height: 160rpx;
background-color: #fff;
border-top: 2rpx solid #E1F3D8;
uni-button {
width: 95%;
height: 100rpx;
color: #fff;
border-radius: 50rpx;
background-image: linear-gradient(to right, rgb(2, 177, 251), rgb(1, 133, 250));
}
}
</style>