companyReplay.vue
6.3 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<template>
<view>
<form>
<view style="padding: 0 32rpx;background: #fff;">
<view class="cu-form-group">
<view class="title">企业类型</view>
<picker @change="PickerChange" :value="index" :range="picker">
<view class="picker" :style="{'text-align': 'left','color':index>-1?'#323232':'#808080'}">
{{index>-1?picker[index]:'请选择企业类型'}}
</view>
</picker>
</view>
<view class="cu-form-group">
<view class="title">企业名称</view>
<input placeholder="请输入企业名称" name="input"></input>
</view>
<view class="cu-form-group">
<view class="title">法人姓名</view>
<input placeholder="请输入法人姓名" name="input"></input>
</view>
<view class="cu-form-group">
<view class="title">法人电话</view>
<input placeholder="请输入法人电话" name="input"></input>
</view>
<view class="cu-form-group">
<view class="title">联系人姓名</view>
<input placeholder="请输入联系人姓名" name="input"></input>
</view>
<view class="cu-form-group">
<view class="title">联系人电话</view>
<input placeholder="请输入联系人电话" name="input"></input>
</view>
</view>
<view style="padding: 0 32rpx;background: #fff;">
<!-- !!!!! placeholder 在ios表现有偏移 建议使用 第一种样式 -->
<view class="cu-form-group margin-top">
<view class="title">需求说明</view>
</view>
<view class="cu-form-group">
<view style="background: #f7f8fa;border-radius: 20rpx;width: 100%;padding: 0 30rpx 10rpx 30rpx;margin-bottom: 30rpx;">
<textarea maxlength="1000" v-model="textareaAValue" @input="textareaAInput" placeholder="请输入需求说明"></textarea>
<view style="color: #cecfd2;text-align: right;">
{{textareaAValue.length}}/1000
</view>
</view>
</view>
</view>
<view style="padding: 0 32rpx;background: #fff;">
<view class="cu-bar bg-white margin-top">
<view class="action">
营业执照
</view>
</view>
<view class="cu-form-group">
<view class="grid col-4 grid-square flex-sub" style="border-bottom: 2rpx solid #ebedf0;">
<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
<image :src="imgList[index]" mode="aspectFill"></image>
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
<text class='cuIcon-close'></text>
</view>
</view>
<view class="solids" style="width: 182rpx;height: 182rpx;" @tap="ChooseImage" v-if="imgList.length<1">
<image src="../../static/image/no_upload@2x.png" style="width: 182rpx;height: 182rpx;" mode=""></image>
</view>
</view>
</view>
<view class="cu-bar bg-white">
<view class="action">
法人身份证
</view>
</view>
<view class="cu-form-group">
<view class="grid col-4 grid-square flex-sub">
<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
<image :src="imgList[index]" mode="aspectFill"></image>
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
<text class='cuIcon-close'></text>
</view>
</view>
<view class="solids" style="width: 182rpx;height: 182rpx;" @tap="ChooseImage" v-if="imgList.length<1">
<image src="../../static/image/no_upload@2x.png" style="width: 182rpx;height: 182rpx;" mode=""></image>
</view>
<view style="width: 230rpx;color: #b1b2b3;">
(上传身份证正面)
</view>
</view>
</view>
<view class="cu-form-group" style="border-top: none;">
<view class="grid col-4 grid-square flex-sub">
<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
<image :src="imgList[index]" mode="aspectFill"></image>
<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
<text class='cuIcon-close'></text>
</view>
</view>
<view class="solids" style="width: 182rpx;height: 182rpx;" @tap="ChooseImage" v-if="imgList.length<1">
<image src="../../static/image/no_upload@2x.png" style="width: 182rpx;height: 182rpx;" mode=""></image>
</view>
<view style="width: 230rpx;color: #b1b2b3;">
(上传身份证反面)
</view>
</view>
</view>
</view>
</form>
<view class="cu-bar margin-top" style="display: flex;justify-content: center;">
<view @click="submit" style="background: #2e7ff9;border-radius: 80rpx;height: 80rpx;width: 686rpx;color: #fff;text-align: center;line-height: 80rpx;">
立即提交
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
index: -1,
picker: ['企业类型1', '企业类型2', '企业类型3'],
multiIndex: [0, 0, 0],
imgList: [],
modalName: null,
textareaAValue: '',
textareaBValue: ''
};
},
methods: {
// 立即提交
submit(){
setTimeout(()=>{
uni.showToast({
title:'提交成功'
})
},200)
uni.navigateBack({
delta:1
})
},
PickerChange(e) {
this.index = e.detail.value
},
ChooseImage() {
uni.chooseImage({
count: 4, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: (res) => {
if (this.imgList.length != 0) {
this.imgList = this.imgList.concat(res.tempFilePaths)
} else {
this.imgList = res.tempFilePaths
}
}
});
},
ViewImage(e) {
uni.previewImage({
urls: this.imgList,
current: e.currentTarget.dataset.url
});
},
DelImg(e) {
uni.showModal({
title: '提示',
content: '确定要删除此照片吗?',
cancelText: '再看看',
confirmText: '确认',
success: res => {
if (res.confirm) {
this.imgList.splice(e.currentTarget.dataset.index, 1)
}
}
})
},
textareaAInput(e) {
this.textareaAValue = e.detail.value
},
textareaBInput(e) {
this.textareaBValue = e.detail.value
}
}
}
</script>
<style lang="scss">
page{
background-color: $uni-bg-color-hui;
}
.cu-form-group .title {
min-width: calc(4em + 30px);
}
</style>