Compare View

switch
from
...
to
 
Commits (3)
src/pages/purchaseLenses/purchaseLenses.vue
1 <template> 1 <template>
2 <view class="content"> 2 <view class="content">
3 <view class="goodInfo"> 3 <view class="goodInfo">
4 <view class="imageWrap"> 4 <view class="imageWrap">
5 <image 5 <image
6 src="../../static/img/detail/d1.png" 6 src="../../static/img/detail/d1.png"
7 mode="aspectFill" 7 mode="aspectFill"
8 style="width: 188rpx;height: 168rpx;" 8 style="width: 188rpx;height: 168rpx;"
9 ></image> 9 ></image>
10 </view> 10 </view>
11 <view class="infoRight"> 11 <view class="infoRight">
12 <text class="goodName">商品名称商品名称商品名称名称名称商品名称名商品名称名</text> 12 <text class="goodName">商品名称商品名称商品名称名称名称商品名称名商品名称名</text>
13 <text class="remarks">支持7天无理由退货 顺丰发货</text> 13 <text class="remarks">支持7天无理由退货 顺丰发货</text>
14 <view class="priceBox"> 14 <view class="priceBox">
15 <view class="price">¥198</view> 15 <view class="price">¥198</view>
16 <text>(限购{{maxCount}}副)</text> 16 <text>(限购{{maxCount}}副)</text>
17 <view class="counter"> 17 <view class="counter">
18 <view 18 <view
19 class="btn" 19 class="btn"
20 disabled="this.addDisabled" 20 disabled="this.addDisabled"
21 type="default" 21 type="default"
22 @click="counter(false)" 22 @click="counter(false)"
23 >-</view> 23 >-</view>
24 <text>{{count}}</text> 24 <text>{{count}}</text>
25 <view 25 <view
26 class="btn" 26 class="btn"
27 disabled="this.desDisabled" 27 disabled="this.desDisabled"
28 type="default" 28 type="default"
29 @click="counter(true)" 29 @click="counter(true)"
30 >+</view> 30 >+</view>
31 </view> 31 </view>
32 </view> 32 </view>
33 </view> 33 </view>
34 </view> 34 </view>
35 <view class="goods-data"> 35 <view class="goods-data">
36 <view class="opCollapse"> 36 <view class="opCollapse">
37 <view class="body"> 37 <view class="body">
38 <template v-if="opIsOpen"> 38 <template v-if="opIsOpen">
39 <view class="goods-form"> 39 <view class="goods-form">
40 <view class="p1">
41 <image class="image2" src="../../static/img/myOpticsData/dataWrite.png" mode="aspectFit"></image>
42 填写验光数据
43 </view>
44 <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text>
45 <view class="picker">
46 <view class="picker-choice">
47 <view class="choice-left">
48 <text class="pd">验光单取名:</text>
49 </view>
50 <input type="text" @blur="handleInput" class="input"
51 placeholder="请输入名称" maxlength="20" :value="name" />
52 </view>
53 </view>
54 <view class="picker" >
55 <view class="picker-choice">
56 <view class="choice-left">
57 <text class="p11">{{pickerInfoList[0].nameC}}</text>
58 <text class="p12">{{pickerInfoList[0].nameE}}</text>
59 </view>
60 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text>
61 <!-- <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> -->
62 <picker @change="bindPickerChange01" :value="pickerInfoList[0].nameIndex1" :range="pickerInfoList[0].nameArray1">
63 <view class="p14">
64 {{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}
65 <image src="../../static/detail-tabicon.png" ></image>
66 </view>
67 <!-- <image src="../../static/detail-tabicon.png" ></image> -->
68 </picker>
69 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text>
70 <!-- <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> -->
71 <picker @change="bindPickerChange02" :value="pickerInfoList[0].nameIndex2" :range="pickerInfoList[0].nameArray2">
72 <view class="p14">
73 {{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}
74 <image src="../../static/detail-tabicon.png" ></image>
75 </view>
76 <!-- <image src="../../static/detail-tabicon.png" ></image> -->
77 </picker>
78 </view>
79 </view>
80 <view class="picker" >
81 <view class="picker-choice">
82 <view class="choice-left">
83 <text class="p11">{{pickerInfoList[1].nameC}}</text>
84 <text class="p12">{{pickerInfoList[1].nameE}}</text>
85 </view>
86 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text>
87 <!-- <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> -->
88 <picker @change="bindPickerChange11" :value="pickerInfoList[1].nameIndex1" :range="pickerInfoList[1].nameArray1">
89 <view class="p14">
90 {{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}
91 <image src="../../static/detail-tabicon.png" ></image>
92 </view>
93 <!-- <image src="../../static/detail-tabicon.png" ></image> -->
94 </picker>
95 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text>
96 <!-- <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> -->
97 <picker @change="bindPickerChange12" :value="pickerInfoList[1].nameIndex2" :range="pickerInfoList[1].nameArray2">
98 <view class="p14">
99 {{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}
100 <image src="../../static/detail-tabicon.png" ></image>
101 </view>
102 <!-- <image src="../../static/detail-tabicon.png" ></image> -->
103 </picker>
104 </view>
105 </view>
106 <view class="picker" >
107 <view class="picker-choice">
108 <view class="choice-left">
109 <text class="p11">{{pickerInfoList[2].nameC}}</text>
110 <text class="p12">{{pickerInfoList[2].nameE}}</text>
111 </view>
112 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text>
113 <picker @change="bindPickerChange21" :value="pickerInfoList[2].nameIndex1" :range="pickerInfoList[2].nameArray1">
114 <view class="p14">
115 {{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}}
116 <image src="../../static/detail-tabicon.png" ></image>
117 </view>
118 </picker>
119 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text>
120 <!-- <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> -->
121 <picker @change="bindPickerChange22" :value="pickerInfoList[2].nameIndex2" :range="pickerInfoList[2].nameArray2">
122 <view class="p14">
123 {{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}
124 <image src="../../static/detail-tabicon.png" ></image>
125 </view>
126 <!-- <image src="../../static/detail-tabicon.png" ></image> -->
127 </picker>
128 </view>
129 </view>
130 <view class="picker">
131 <view class="picker-choice">
132 <view class="choice-left">
133 <text class="pd">瞳距:</text>
134 </view>
135 <input type="digit" @change="handleInputPd" class="input"
136 placeholder="请输入瞳距,单位cm" maxlength="20" :value="pd" />
137 </view>
138 </view>
139 <view class="picker" >
140 <view class="picker-choice">
141 <view class="choice-left">
142 <text class="p11">{{pickerInfoList[3].nameC}}</text>
143 </view>
144 <text class="p13-date">年&nbsp;&nbsp;&nbsp;(Y)</text>
145 <picker @change="bindPickerChange41" :value="pickerInfoList[3].nameIndex1" :range="pickerInfoList[3].nameArray1">
146 <view class="p14" style="width: 30px;">
147 {{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}}
148 <image src="../../static/detail-tabicon.png" ></image>
149 </view>
150 </picker>
151 <text class="p13-date">月&nbsp;&nbsp;&nbsp;(M)</text>
152 <picker @change="bindPickerChange42" :value="pickerInfoList[3].nameIndex2" :range="pickerInfoList[3].nameArray2">
153 <view class="p14" style="width: 30px;">
154 {{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}}
155 <image src="../../static/detail-tabicon.png" ></image>
156 </view>
157 </picker>
158 <text class="p13-date">日&nbsp;&nbsp;&nbsp;(D)</text>
159 <picker @change="bindPickerChange43" :value="pickerInfoList[3].nameIndex3" :range="pickerInfoList[3].nameArray3">
160 <view class="p14" style="width: 30px;">
161 {{pickerInfoList[3].nameArray3[pickerInfoList[3].nameIndex3]}}
162 <image src="../../static/detail-tabicon.png" ></image>
163 </view>
164 </picker>
165 </view>
166 </view>
167 <view class="confirm">
168 <image class="image1" :src="confirm ? tabicon[0] : tabicon[1]" @tap="changeConfirm"></image>
169 <text>确认以上输入信息来源于我的验光数据!</text>
170 </view>
171 </view>
172 <!-- <view class="goods-form">
40 <view class="p1"> 173 <view class="data-title">
41 <image class="image2" src="../../static/img/myOpticsData/dataWrite.png" mode="aspectFit"></image> 174 <image src="../../static/icon-data.png"></image>
42 填写验光数据 175 <text class="p1">填写验光数据</text>
43 </view> 176 </view>
44 <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> 177 <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text>
45 <view class="picker"> 178 <view class="picker">
46 <view class="picker-choice"> 179 <view class="picker-choice">
47 <view class="choice-left"> 180 <view class="choice-left">
48 <text class="pd">验光单取名:</text> 181 <text class="p11">验光单取名:</text>
49 </view> 182 </view>
50 <input type="text" @blur="handleInput" class="input" 183 <input
51 placeholder="请输入名称" maxlength="20" :value="name" /> 184 class="choice-name uni-input"
52 </view> 185 :value="dataName"
53 </view> 186 @blur="fillData"
54 <view class="picker" > 187 placeholder="下系"
55 <view class="picker-choice"> 188 />
56 <view class="choice-left"> 189 </view>
57 <text class="p11">{{pickerInfoList[0].nameC}}</text> 190 </view>
58 <text class="p12">{{pickerInfoList[0].nameE}}</text> 191 <view class="picker">
59 </view> 192 <view class="picker-choice">
60 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text> 193 <view class="choice-left">
61 <!-- <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> --> 194 <text class="p11">{{pickerInfoList[0].nameC}}</text>
62 <picker @change="bindPickerChange01" :value="pickerInfoList[0].nameIndex1" :range="pickerInfoList[0].nameArray1"> 195 <text class="p12">{{pickerInfoList[0].nameE}}</text>
63 <view class="p14"> 196 </view>
64 {{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}} 197 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text>
65 <image src="../../static/detail-tabicon.png" ></image> 198 <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text>
66 </view> 199 <picker
67 <!-- <image src="../../static/detail-tabicon.png" ></image> --> 200 @change="bindPickerChange01"
68 </picker> 201 :value="pickerInfoList[0].nameIndex1"
69 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text> 202 :range="pickerInfoList[0].nameArray1"
70 <!-- <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> --> 203 >
71 <picker @change="bindPickerChange02" :value="pickerInfoList[0].nameIndex2" :range="pickerInfoList[0].nameArray2"> 204 <image src="../../static/detail-tabicon.png"></image>
72 <view class="p14"> 205 </picker>
73 {{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}} 206 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text>
74 <image src="../../static/detail-tabicon.png" ></image> 207 <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text>
75 </view> 208 <picker
76 <!-- <image src="../../static/detail-tabicon.png" ></image> --> 209 @change="bindPickerChange02"
77 </picker> 210 :value="pickerInfoList[0].nameIndex2"
78 </view> 211 :range="pickerInfoList[0].nameArray2"
79 </view> 212 >
80 <view class="picker" > 213 <image src="../../static/detail-tabicon.png"></image>
81 <view class="picker-choice"> 214 </picker>
82 <view class="choice-left"> 215 </view>
83 <text class="p11">{{pickerInfoList[1].nameC}}</text> 216 </view>
84 <text class="p12">{{pickerInfoList[1].nameE}}</text> 217 <view class="picker">
85 </view> 218 <view class="picker-choice">
86 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text> 219 <view class="choice-left">
87 <!-- <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> --> 220 <text class="p11">{{pickerInfoList[1].nameC}}</text>
88 <picker @change="bindPickerChange11" :value="pickerInfoList[1].nameIndex1" :range="pickerInfoList[1].nameArray1"> 221 <text class="p12">{{pickerInfoList[1].nameE}}</text>
89 <view class="p14"> 222 </view>
90 {{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}} 223 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text>
91 <image src="../../static/detail-tabicon.png" ></image> 224 <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text>
92 </view> 225 <picker
93 <!-- <image src="../../static/detail-tabicon.png" ></image> --> 226 @change="bindPickerChange11"
94 </picker> 227 :value="pickerInfoList[1].nameIndex1"
95 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text> 228 :range="pickerInfoList[1].nameArray1"
96 <!-- <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> --> 229 >
97 <picker @change="bindPickerChange12" :value="pickerInfoList[1].nameIndex2" :range="pickerInfoList[1].nameArray2"> 230 <image src="../../static/detail-tabicon.png"></image>
98 <view class="p14"> 231 </picker>
99 {{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}} 232 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text>
100 <image src="../../static/detail-tabicon.png" ></image> 233 <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text>
101 </view> 234 <picker
102 <!-- <image src="../../static/detail-tabicon.png" ></image> --> 235 @change="bindPickerChange12"
103 </picker> 236 :value="pickerInfoList[1].nameIndex2"
104 </view> 237 :range="pickerInfoList[1].nameArray2"
105 </view> 238 >
106 <view class="picker" > 239 <image src="../../static/detail-tabicon.png"></image>
107 <view class="picker-choice"> 240 </picker>
108 <view class="choice-left"> 241 </view>
109 <text class="p11">{{pickerInfoList[2].nameC}}</text> 242 </view>
110 <text class="p12">{{pickerInfoList[2].nameE}}</text> 243 <view class="picker">
111 </view> 244 <view class="picker-choice">
112 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text> 245 <view class="choice-left">
113 <picker @change="bindPickerChange21" :value="pickerInfoList[2].nameIndex1" :range="pickerInfoList[2].nameArray1"> 246 <text class="p11">{{pickerInfoList[2].nameC}}</text>
114 <view class="p14"> 247 <text class="p12">{{pickerInfoList[2].nameE}}</text>
115 {{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}} 248 </view>
116 <image src="../../static/detail-tabicon.png" ></image> 249 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text>
117 </view> 250 <text class="p14">{{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}}</text>
118 </picker> 251 <picker
119 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text> 252 @change="bindPickerChange21"
120 <!-- <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> --> 253 :value="pickerInfoList[2].nameIndex1"
121 <picker @change="bindPickerChange22" :value="pickerInfoList[2].nameIndex2" :range="pickerInfoList[2].nameArray2"> 254 :range="pickerInfoList[2].nameArray1"
122 <view class="p14"> 255 >
123 {{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}} 256 <image src="../../static/detail-tabicon.png"></image>
124 <image src="../../static/detail-tabicon.png" ></image> 257 </picker>
125 </view> 258 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text>
126 <!-- <image src="../../static/detail-tabicon.png" ></image> --> 259 <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text>
127 </picker> 260 <picker
128 </view> 261 @change="bindPickerChange22"
129 </view> 262 :value="pickerInfoList[2].nameIndex2"
130 <view class="picker"> 263 :range="pickerInfoList[2].nameArray2"
131 <view class="picker-choice"> 264 >
132 <view class="choice-left"> 265 <image src="../../static/detail-tabicon.png"></image>
133 <text class="pd">瞳距:</text> 266 </picker>
134 </view> 267 </view>
135 <input type="digit" @change="handleInputPd" class="input" 268 </view>
136 placeholder="请输入瞳距,单位cm" maxlength="20" :value="pd" /> 269 <view class="picker">
137 </view> 270 <view class="picker-choice">
138 </view> 271 <view class="choice-left">
139 <view class="picker" > 272 <text class="p11">{{pickerInfoList[3].nameC}}</text>
140 <view class="picker-choice"> 273 <text class="p12">{{pickerInfoList[3].nameE}}</text>
141 <view class="choice-left"> 274 </view>
142 <text class="p11">{{pickerInfoList[3].nameC}}</text> 275 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text>
143 </view> 276 <text class="p14">{{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}}</text>
144 <text class="p13-date">年&nbsp;&nbsp;&nbsp;(Y)</text> 277 <picker
145 <picker @change="bindPickerChange41" :value="pickerInfoList[3].nameIndex1" :range="pickerInfoList[3].nameArray1"> 278 @change="bindPickerChange31"
146 <view class="p14" style="width: 30px;"> 279 :value="pickerInfoList[3].nameIndex1"
147 {{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}} 280 :range="pickerInfoList[3].nameArray1"
148 <image src="../../static/detail-tabicon.png" ></image> 281 >
149 </view> 282 <image src="../../static/detail-tabicon.png"></image>
150 </picker> 283 </picker>
151 <text class="p13-date">月&nbsp;&nbsp;&nbsp;(M)</text> 284 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text>
152 <picker @change="bindPickerChange42" :value="pickerInfoList[3].nameIndex2" :range="pickerInfoList[3].nameArray2"> 285 <text class="p14">{{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}}</text>
153 <view class="p14" style="width: 30px;"> 286 <picker
154 {{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}} 287 @change="bindPickerChange32"
155 <image src="../../static/detail-tabicon.png" ></image> 288 :value="pickerInfoList[3].nameIndex2"
156 </view> 289 :range="pickerInfoList[3].nameArray2"
157 </picker> 290 >
158 <text class="p13-date">日&nbsp;&nbsp;&nbsp;(D)</text> 291 <image src="../../static/detail-tabicon.png"></image>
159 <picker @change="bindPickerChange43" :value="pickerInfoList[3].nameIndex3" :range="pickerInfoList[3].nameArray3"> 292 </picker>
160 <view class="p14" style="width: 30px;"> 293 </view>
161 {{pickerInfoList[3].nameArray3[pickerInfoList[3].nameIndex3]}} 294 </view>
162 <image src="../../static/detail-tabicon.png" ></image> 295 <view class="picker">
163 </view> 296 <view class="picker-choice">
164 </picker> 297 <view class="choice-left">
165 </view> 298 <text class="p11">{{pickerInfoList[4].nameC}}</text>
166 </view> 299 </view>
167 <view class="confirm"> 300 <text class="p13-date">年&nbsp;&nbsp;&nbsp;(Y)</text>
168 <image class="image1" :src="confirm ? tabicon[0] : tabicon[1]" @tap="changeConfirm"></image> 301 <text
169 <text>确认以上输入信息来源于我的验光数据!</text> 302 class="p14"
170 </view> 303 style="width: 34px;"
171 </view> 304 >{{pickerInfoList[4].nameArray1[pickerInfoList[4].nameIndex1]}}</text>
172 <!-- <view class="goods-form"> 305 <picker
173 <view class="data-title"> 306 @change="bindPickerChange41"
174 <image src="../../static/icon-data.png"></image> 307 :value="pickerInfoList[4].nameIndex1"
175 <text class="p1">填写验光数据</text> 308 :range="pickerInfoList[4].nameArray1"
176 </view> 309 >
177 <text class="p2">没有验光数据?请到线下眼镜店验光哦~</text> 310 <image src="../../static/detail-tabicon.png"></image>
178 <view class="picker"> 311 </picker>
179 <view class="picker-choice"> 312 <text class="p13-date">月&nbsp;&nbsp;&nbsp;(M)</text>
180 <view class="choice-left"> 313 <text
181 <text class="p11">验光单取名:</text> 314 class="p14"
182 </view> 315 style="width: 30px;"
183 <input 316 >{{pickerInfoList[4].nameArray2[pickerInfoList[4].nameIndex2]}}</text>
184 class="choice-name uni-input" 317 <picker
185 :value="dataName" 318 @change="bindPickerChange42"
186 @blur="fillData" 319 :value="pickerInfoList[4].nameIndex2"
187 placeholder="下系" 320 :range="pickerInfoList[4].nameArray2"
188 /> 321 >
189 </view> 322 <image src="../../static/detail-tabicon.png"></image>
190 </view> 323 </picker>
191 <view class="picker"> 324 <text class="p13-date">日&nbsp;&nbsp;&nbsp;(D)</text>
192 <view class="picker-choice"> 325 <text
193 <view class="choice-left"> 326 class="p14"
194 <text class="p11">{{pickerInfoList[0].nameC}}</text> 327 style="width: 30px;"
195 <text class="p12">{{pickerInfoList[0].nameE}}</text> 328 >{{pickerInfoList[4].nameArray3[pickerInfoList[4].nameIndex3]}}</text>
196 </view> 329 <picker
197 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text> 330 @change="bindPickerChange43"
198 <text class="p14">{{pickerInfoList[0].nameArray1[pickerInfoList[0].nameIndex1]}}</text> 331 :value="pickerInfoList[4].nameIndex3"
199 <picker 332 :range="pickerInfoList[4].nameArray3"
200 @change="bindPickerChange01" 333 >
201 :value="pickerInfoList[0].nameIndex1" 334 <image src="../../static/detail-tabicon.png"></image>
202 :range="pickerInfoList[0].nameArray1" 335 </picker>
203 > 336 </view>
204 <image src="../../static/detail-tabicon.png"></image> 337 </view>
205 </picker> 338 <view class="confirm">
206 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text> 339 <image
207 <text class="p14">{{pickerInfoList[0].nameArray2[pickerInfoList[0].nameIndex2]}}</text> 340 :src="tablist.confirm ? tabicon[0] : tabicon[1]"
208 <picker 341 @click="changeConfirm"
209 @change="bindPickerChange02" 342 ></image>
210 :value="pickerInfoList[0].nameIndex2" 343 <text>确认以上输入信息来源于我的验光数据!</text>
211 :range="pickerInfoList[0].nameArray2" 344 </view>
212 > 345 </view> -->
213 <image src="../../static/detail-tabicon.png"></image> 346
214 </picker> 347 </template>
215 </view> 348 <template v-else>
216 </view> 349 <view
217 <view class="picker"> 350 v-for="item in pickerInfoList"
218 <view class="picker-choice"> 351 :key="item.key"
219 <view class="choice-left"> 352 class="bodyBox"
220 <text class="p11">{{pickerInfoList[1].nameC}}</text> 353 >
221 <text class="p12">{{pickerInfoList[1].nameE}}</text> 354 <template v-if="item.nameC==='验光日期'">
222 </view> 355 <text class="names">{{item.nameC}}</text>
223 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text> 356 <text style="margin-right: 5px;">{{item.nameArray1[item.nameIndex1]}}年</text>
224 <text class="p14">{{pickerInfoList[1].nameArray1[pickerInfoList[1].nameIndex1]}}</text> 357 <text style="margin-right: 5px;">{{item.nameArray2[item.nameIndex2]}}月</text>
225 <picker 358 <text>{{item.nameArray3[item.nameIndex2]}}日</text>
226 @change="bindPickerChange11" 359 </template>
227 :value="pickerInfoList[1].nameIndex1" 360 <template v-else>
228 :range="pickerInfoList[1].nameArray1" 361 <template v-if="item.nameC==='度数'">
229 > 362 <text style="display: inline;">*</text>
230 <image src="../../static/detail-tabicon.png"></image> 363 </template>
231 </picker> 364
232 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text> 365 <text class="names">{{item.nameC}}</text>
233 <text class="p14">{{pickerInfoList[1].nameArray2[pickerInfoList[1].nameIndex2]}}</text> 366 <text style="margin-right: 10px;">左&nbsp;{{item.nameArray1[item.nameIndex1]}}</text>
234 <picker 367 <text>右&nbsp;{{item.nameArray2[item.nameIndex2]}}</text>
235 @change="bindPickerChange12" 368 </template>
236 :value="pickerInfoList[1].nameIndex2" 369 </view>
237 :range="pickerInfoList[1].nameArray2" 370 </template>
238 > 371 </view>
239 <image src="../../static/detail-tabicon.png"></image> 372 </view>
240 </picker> 373 </view>
241 </view> 374 <view class="choose">
242 </view> 375 <view
243 <view class="picker"> 376 class="chooseItem_1_content"
244 <view class="picker-choice"> 377 v-for="(item,index) in attrList"
245 <view class="choice-left"> 378 :key="index"
246 <text class="p11">{{pickerInfoList[2].nameC}}</text> 379 >
247 <text class="p12">{{pickerInfoList[2].nameE}}</text> 380 <UniCollapse @change="change(index)">
248 </view> 381 <UniCollapseItem
249 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text> 382 :open="show[index]"
250 <text class="p14">{{pickerInfoList[2].nameArray1[pickerInfoList[2].nameIndex1]}}</text> 383 :title="item.meta_name"
251 <picker 384 showAnimation=false
252 @change="bindPickerChange21" 385 >
253 :value="pickerInfoList[2].nameIndex1" 386 <view class="chooseItem_1_content">
254 :range="pickerInfoList[2].nameArray1" 387 <view class="itemsWrap">
255 > 388 <view
256 <image src="../../static/detail-tabicon.png"></image> 389 class="item2"
257 </picker> 390 v-for="(one,i) in item.attr"
258 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text> 391 :key="i"
259 <text class="p14">{{pickerInfoList[2].nameArray2[pickerInfoList[2].nameIndex2]}}</text> 392 :class="{ active2: current[index] === i }"
260 <picker 393 @click="onClickItem(index, i)"
261 @change="bindPickerChange22" 394 >{{one.name}}</view>
262 :value="pickerInfoList[2].nameIndex2" 395 </view>
263 :range="pickerInfoList[2].nameArray2" 396 </view>
264 > 397 </UniCollapseItem>
265 <image src="../../static/detail-tabicon.png"></image> 398 </UniCollapse>
266 </picker> 399 <view
267 </view> 400 class="chooseRes"
268 </view> 401 v-show="!show[index]"
269 <view class="picker"> 402 >* {{attrList[index].attr[current[index]].name}}</view>
270 <view class="picker-choice"> 403 </view>
271 <view class="choice-left"> 404 <!-- <view class="chooseItem_1 chooseItem">
272 <text class="p11">{{pickerInfoList[3].nameC}}</text> 405 <UniCollapse @change="change(1)">
273 <text class="p12">{{pickerInfoList[3].nameE}}</text> 406 <UniCollapseItem
274 </view> 407 open=true
275 <text class="p13">左&nbsp;&nbsp;&nbsp;(OD)</text> 408 title="款式挑选"
276 <text class="p14">{{pickerInfoList[3].nameArray1[pickerInfoList[3].nameIndex1]}}</text> 409 showAnimation=false
277 <picker 410 >
278 @change="bindPickerChange31" 411 <view
279 :value="pickerInfoList[3].nameIndex1" 412 class="chooseRes"
280 :range="pickerInfoList[3].nameArray1" 413 v-show="show[1]"
281 > 414 >* {{chooseRes1}}</view>
282 <image src="../../static/detail-tabicon.png"></image> 415 <view class="chooseItem_1_content">
283 </picker> 416 <view class="itemsWrap">
284 <text class="p13">右&nbsp;&nbsp;&nbsp;(OS)</text> 417 <view
285 <text class="p14">{{pickerInfoList[3].nameArray2[pickerInfoList[3].nameIndex2]}}</text> 418 class="item1"
286 <picker 419 v-for="(item,index) in chooseItem1"
287 @change="bindPickerChange32" 420 :key="index"
288 :value="pickerInfoList[3].nameIndex2" 421 :style="item.style"
289 :range="pickerInfoList[3].nameArray2" 422 :class="{ active1: current1 === index }"
290 > 423 @click="onClickItem1(index)"
291 <image src="../../static/detail-tabicon.png"></image> 424 ></view>
292 </picker> 425 </view>
293 </view> 426 </view>
294 </view> 427 </UniCollapseItem>
295 <view class="picker"> 428 </UniCollapse>
296 <view class="picker-choice"> 429 <view
297 <view class="choice-left"> 430 class="chooseRes"
298 <text class="p11">{{pickerInfoList[4].nameC}}</text> 431 v-show="show[1]"
299 </view> 432 >* {{chooseRes1}}</view>
300 <text class="p13-date">年&nbsp;&nbsp;&nbsp;(Y)</text> 433 </view>
301 <text 434 <view class="chooseItem_2 chooseItem ">
302 class="p14" 435 <UniCollapse @change="change(2)">
303 style="width: 34px;" 436 <UniCollapseItem
304 >{{pickerInfoList[4].nameArray1[pickerInfoList[4].nameIndex1]}}</text> 437 open=true
305 <picker 438 title="直径"
306 @change="bindPickerChange41" 439 showAnimation=false
307 :value="pickerInfoList[4].nameIndex1" 440 >
308 :range="pickerInfoList[4].nameArray1" 441 <view class="chooseItem_1_content">
309 > 442 <view class="itemsWrap">
310 <image src="../../static/detail-tabicon.png"></image> 443 <view
311 </picker> 444 class="item2"
312 <text class="p13-date">月&nbsp;&nbsp;&nbsp;(M)</text> 445 v-for="(item,index) in chooseItem2"
313 <text 446 :key="index"
314 class="p14" 447 :class="{ active2: current2 === index }"
315 style="width: 30px;" 448 @click="onClickItem2(index)"
316 >{{pickerInfoList[4].nameArray2[pickerInfoList[4].nameIndex2]}}</text> 449 >{{item.num}}</view>
317 <picker 450 </view>
318 @change="bindPickerChange42" 451 </view>
319 :value="pickerInfoList[4].nameIndex2" 452 </UniCollapseItem>
320 :range="pickerInfoList[4].nameArray2" 453 </UniCollapse>
321 > 454 <view
322 <image src="../../static/detail-tabicon.png"></image> 455 class="chooseRes"
323 </picker> 456 v-show="show[2]"
324 <text class="p13-date">日&nbsp;&nbsp;&nbsp;(D)</text> 457 >* {{chooseRes2}}</view>
325 <text 458 </view>
326 class="p14" 459 <view class="chooseItem_3 chooseItem">
327 style="width: 30px;" 460 <UniCollapse @change="change(3)">
328 >{{pickerInfoList[4].nameArray3[pickerInfoList[4].nameIndex3]}}</text> 461 <UniCollapseItem
329 <picker 462 open=true
330 @change="bindPickerChange43" 463 title="度数"
331 :value="pickerInfoList[4].nameIndex3" 464 showAnimation=false
332 :range="pickerInfoList[4].nameArray3" 465 >
333 > 466 <view class="chooseItem_1_content">
334 <image src="../../static/detail-tabicon.png"></image> 467 <view class="itemsWrap">
335 </picker> 468 <view
336 </view> 469 class="item2"
337 </view> 470 v-for="(item,index) in chooseItem3"
338 <view class="confirm"> 471 :key="index"
339 <image 472 :class="{ active2: current3 === index }"
340 :src="tablist.confirm ? tabicon[0] : tabicon[1]" 473 @click="onClickItem3(index)"
341 @click="changeConfirm" 474 >{{item}}</view>
342 ></image> 475 </view>
343 <text>确认以上输入信息来源于我的验光数据!</text> 476 </view>
344 </view> 477 </UniCollapseItem>
345 </view> --> 478 </UniCollapse>
346 479 <view
347 </template> 480 class="chooseRes"
348 <template v-else> 481 v-show="show[3]"
349 <view 482 >* {{chooseRes3}}</view>
350 v-for="item in pickerInfoList" 483 </view> -->
351 :key="item.key" 484 </view>
352 class="bodyBox" 485 <view
353 > 486 class="button"
354 <template v-if="item.nameC==='验光日期'"> 487 @click="toComfirmOrder"
355 <text class="names">{{item.nameC}}</text> 488 >
356 <text style="margin-right: 5px;">{{item.nameArray1[item.nameIndex1]}}年</text> 489 立即结算
357 <text style="margin-right: 5px;">{{item.nameArray2[item.nameIndex2]}}月</text> 490 </view>
358 <text>{{item.nameArray3[item.nameIndex2]}}日</text> 491 </view>
359 </template> 492 </template>
360 <template v-else> 493
361 <template v-if="item.nameC==='度数'"> 494 <script>
362 <text style="display: inline;">*</text> 495 import UniCollapse from '@/components/UniCollapse/UniCollapse.vue'
363 </template> 496 import UniCollapseItem from '@/components/UniCollapseItem/UniCollapseItem.vue'
364 497 import store from '@/store'
365 <text class="names">{{item.nameC}}</text> 498
366 <text style="margin-right: 10px;">左&nbsp;{{item.nameArray1[item.nameIndex1]}}</text> 499 export default {
367 <text>右&nbsp;{{item.nameArray2[item.nameIndex2]}}</text> 500 components: {
368 </template> 501 UniCollapse,
369 </view> 502 UniCollapseItem
370 </template> 503 },
371 </view> 504 data() {
372 </view> 505 return {
373 </view> 506 count: 1,
374 <view class="choose"> 507 pid: 0,
375 <view 508 maxCount: 20,
376 class="chooseItem_1_content" 509 dataName: '', // 验光数据人员名称
377 v-for="(item,index) in attrList" 510 isDataName: false, // 是否是已存在的人员数据
378 :key="index" 511 dataConfirm: false, // 已确认所输入验光数据
379 > 512 opIsOpen: true,
380 <UniCollapse @change="change(index)"> 513 addDisabled: false,
381 <UniCollapseItem 514 desDisabled: false,
382 :open="show[index]" 515 current1: 0,
383 :title="item.meta_name" 516 current2: 0,
384 showAnimation=false 517 current3: 0,
385 > 518 current: [],
386 <view class="chooseItem_1_content"> 519 show: [],
387 <view class="itemsWrap"> 520 chooseRes1: {
388 <view 521 sku_name: 'Miss 黑二代【减龄自然】',
389 class="item2" 522 sk_id: '128'
390 v-for="(one,i) in item.attr" 523 },
391 :key="i" 524 checkedData: {
392 :class="{ active2: current[index] === i }" 525
393 @click="onClickItem(index, i)" 526 },
394 >{{one.name}}</view> 527 chooseRes2: '14.0',
395 </view> 528 chooseRes3: 0,
396 </view> 529 chooseItem1: [
397 </UniCollapseItem> 530 { style: 'opacity: 0.7;background-image: radial-gradient(50% 148%, #ECEAEA 50%, #8D8C8C 100%);', describ: 'Miss 黑1代【减龄自然】' },
398 </UniCollapse> 531 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑二代【防紫外线】' },
399 <view 532 { style: 'background-image: radial-gradient(50% 148%, #FDF8F6 50%, #94380B 100%);', describ: 'Miss 黑3代【防紫外线】' },
400 class="chooseRes" 533 { style: 'background-image: radial-gradient(50% 148%, #FFFFFF 50%, #324A05 100%);', describ: 'Miss 黑4代【防紫外线】' },
401 v-show="!show[index]" 534 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑5代【防紫外线】' },
402 >* {{attrList[index].attr[current[index]].name}}</view> 535 { style: 'opacity: 0.7;background-image: radial-gradient(50% 150%, #F0EEE7 50%, #6F0838 100%);', describ: 'Miss 黑6代【防紫外线】' },
403 </view> 536 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #370B4E 100%);', describ: 'Miss 黑7代【防紫外线】' },
404 <!-- <view class="chooseItem_1 chooseItem"> 537 { style: 'background-image: radial-gradient(50% 148%, #FFFFFF 50%, #324A05 100%);', describ: 'Miss 黑4代【防紫外线】' },
405 <UniCollapse @change="change(1)"> 538 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑5代【防紫外线】' },
406 <UniCollapseItem 539 { style: 'opacity: 0.7;background-image: radial-gradient(50% 150%, #F0EEE7 50%, #6F0838 100%);', describ: 'Miss 黑6代【防紫外线】' },
407 open=true 540 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #370B4E 100%);', describ: 'Miss 黑7代【防紫外线】' },
408 title="款式挑选" 541 { style: 'background-image: radial-gradient(50% 148%, #FFFFFF 50%, #324A05 100%);', describ: 'Miss 黑4代【防紫外线】' },
409 showAnimation=false 542 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑5代【防紫外线】' },
410 > 543 { style: 'opacity: 0.7;background-image: radial-gradient(50% 150%, #F0EEE7 50%, #6F0838 100%);', describ: 'Miss 黑6代【防紫外线】' },
411 <view 544 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #370B4E 100%);', describ: 'Miss 黑7代【防紫外线】' }
412 class="chooseRes" 545 ],
413 v-show="show[1]" 546 chooseItem2: [
414 >* {{chooseRes1}}</view> 547 { num: '14.0' },
415 <view class="chooseItem_1_content"> 548 { num: '14.2' },
416 <view class="itemsWrap"> 549 { num: '14.4' },
417 <view 550 { num: '14.5' }
418 class="item1" 551 ],
419 v-for="(item,index) in chooseItem1" 552 chooseItem3: [0, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 470, 500, 525, 550, 575, 600, 1000],
420 :key="index" 553 // 度数相关数据
421 :style="item.style" 554 pickerInfoList:[
422 :class="{ active1: current1 === index }" 555 {nameC:"度数",nameE:"(SPH)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:0},
423 @click="onClickItem1(index)" 556 {nameC:"散光",nameE:"(CYL)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:1},
424 ></view> 557 {nameC:"散光轴位",nameE:"(AXI)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:2},
425 </view> 558 {nameC:"验光日期",nameE:'',nameArray1:[''],nameIndex1:0,nameArray2:['',1,2,3,4,5,6,7,8,9,10,11,12],nameIndex2:0,nameArray3:[''],nameIndex3:0}
426 </view> 559 ],
427 </UniCollapseItem> 560 confirm: false, // 用户是否确认
561 tabicon:['/static/detail-button.png','/static/detail-button-unselected.png'],
562 name: '夏小花',
563 oldname:'',// 用于判读用户是否改变名字
564 pickerInfoChioce:{
565 "leftSph": '',
566 "rightSph": '',
567 "leftCyl": '',
568 "rightCyl": '',
569 "leftAxi": '',
570 "rightAxi": '',
571 "time":{
572 "year":0,
573 "month": 0,
574 "day":0 ,
575 }
576 },
577 pd: '',// 瞳距
578 oldpd: '',// 用于判断用户是否改变瞳距
579 kinds:1, // kinds=1,提交为新增验光,2为修改
580 mp_id: Number
428 </UniCollapse> 581 }
429 <view 582 },
430 class="chooseRes" 583 computed: {
431 v-show="show[1]" 584 attrList() {
432 >* {{chooseRes1}}</view> 585 return this.$store.state.read.goodInfo.attrList
433 </view> 586 },
434 <view class="chooseItem_2 chooseItem "> 587 skuList() {
435 <UniCollapse @change="change(2)"> 588 return this.$store.state.read.goodInfo.skuList
436 <UniCollapseItem 589 },
437 open=true 590 mpList() {
438 title="直径" 591 return this.$store.state.myLoveList.loveList
439 showAnimation=false 592 }
440 > 593 },
441 <view class="chooseItem_1_content"> 594 onLoad({ pid }) {
442 <view class="itemsWrap"> 595 this.pid = pid
443 <view 596 store.dispatch('read/fetch', {
444 class="item2" 597 pid
445 v-for="(item,index) in chooseItem2" 598 }).then(() => {
446 :key="index" 599 const current = []
447 :class="{ active2: current2 === index }" 600 const show = []
448 @click="onClickItem2(index)" 601 for (let index = 0; index < this.attrList.length; index++) {
449 >{{item.num}}</view> 602 current.push(0)
450 </view> 603 show.push(true)
451 </view> 604 }
452 </UniCollapseItem> 605 this.current = current
453 </UniCollapse> 606 this.show = show
454 <view 607 })
455 class="chooseRes" 608 store.dispatch('myLoveList/getLoveList')
609
610 // 初始化SPL、CYL、AXI的值
611 for (let j = 0; j < 3; j++) {
612 for(let i=-12;i<6;i++){
613 this.pickerInfoList[j].nameArray1.push(i)
614 this.pickerInfoList[j].nameArray1.push(i+0.5)
615 this.pickerInfoList[j].nameArray2.push(i)
616 this.pickerInfoList[j].nameArray2.push(i+0.5)
617 if(i>=-6){
618 this.pickerInfoList[j].nameArray1.push(i+0.25)
619 this.pickerInfoList[j].nameArray1.push(i+0.75)
620 this.pickerInfoList[j].nameArray2.push(i+0.25)
621 this.pickerInfoList[j].nameArray2.push(i+0.75)
622 }
623 if(i==5){
624 this.pickerInfoList[j].nameArray1.push(i+1)
625 this.pickerInfoList[j].nameArray2.push(i+1)
626 }
627 }
628 }
629 // 初始化日期值
630 for (let i = 1; i < 32; i++){
631 this.pickerInfoList[3].nameArray3.push(i)
632 }
633 // 初始化年份前后五年
634 let myDate = new Date();
635 let nowYear = myDate.getFullYear();
636 for(let i=0;i<5;i++){
637 this.pickerInfoList[3].nameArray1.push(nowYear-i)
638 }
456 v-show="show[2]" 639 },
457 >* {{chooseRes2}}</view> 640 methods: {
641 // picker相关功能
642 handleInput(e){
643 this.name=e.target.value
644 this.isDataName = false
645 console.log('e---->', e)
646 const mpList = this.mpList
647 console.log('mpList===>',mpList)
648 for (let index = 0; index < mpList.length; index++) {
649 if (e.detail.value === mpList[index].name) {
650 this.isDataName = true
651 uni.showModal({
652 title: '提示',
653 content: `是否填充已有的"${e.detail.value}"的数据`,
654 success: ({ confirm }) => {
655 if (confirm) {
656 this.kinds=2
657 console.log('args===>',index)
658 // const mpList=Object.assign({},this.$store.state.mympList.mpList)
659 console.log('mpList===>',mpList)
660 this.name=mpList[index].name
661 this.pd=mpList[index].pd
662 this.mp_id=mpList[index].mp_id
663 this.oldname=mpList[index].name
664 this.oldpd=mpList[index].pd
665 // 将kinds =2时的值传到该页面
666 this.pickerInfoList[0].nameArray1.unshift(mpList[index].leftSph)
667 this.pickerInfoList[0].nameArray2.unshift(mpList[index].rightSph)
668 this.pickerInfoList[1].nameArray1.unshift(mpList[index].leftCyl)
669 this.pickerInfoList[1].nameArray2.unshift(mpList[index].rightCyl)
670 this.pickerInfoList[2].nameArray1.unshift(mpList[index].leftAxi)
671 this.pickerInfoList[2].nameArray2.unshift(mpList[index].rightAxi)
672
673 this.pickerInfoList[3].nameArray1.unshift(mpList[index].in_time.toString().slice(0,4))
674 if(mpList[index].in_time.toString().slice(5,6)==0){
675 this.pickerInfoList[3].nameArray2.unshift(mpList[index].in_time.toString().slice(6,7))
676 } else{
677 this.pickerInfoList[3].nameArray2.unshift(mpList[index].in_time.toString().slice(5,7))
678 }
679 if(mpList[index].in_time.toString().slice(8,9)==0){
680 this.pickerInfoList[3].nameArray3.unshift(mpList[index].in_time.toString().slice(9,10))
681 } else{
682 this.pickerInfoList[3].nameArray3.unshift(mpList[index].in_time.toString().slice(8,10))
683 }
684 // this.checkedData = mpList[index]
685 // console.log('checkedData', this.checkedData)
686 }
687 }
688 })
689 }
690 }
691 },
692 handleInputPd(e){
693 // 只能输入正浮点数或正数
694 if(/^\d+(\.\d+)?$/.test(e.target.value)){
695 this.pd=e.target.value
696 } else {
697 uni.showToast({
698 title:"请输入有效数据;示例:89",
699 icon: "none",
700 duration: 2000,
701 })
702 this.pd = ''
703 }
704
705 },
706 changeConfirm() {
707 this.confirm = !this.confirm
708 },
709 bindPickerChange01: function(e) {
710 this.pickerInfoList[0].nameIndex1 = e.target.value
711 this.pickerInfoChioce.leftSph=this.pickerInfoList[0].nameArray1[e.target.value]
712 },
713 bindPickerChange02: function(e) {
714 this.pickerInfoList[0].nameIndex2 = e.target.value
715 this.pickerInfoChioce.rightSph=this.pickerInfoList[0].nameArray2[e.target.value]
716 },
717
718 bindPickerChange11: function(e) {
719 this.pickerInfoList[1].nameIndex1 = e.target.value
720 this.pickerInfoChioce.leftCyl=this.pickerInfoList[1].nameArray1[e.target.value]
721 },
722 bindPickerChange12: function(e) {
723 this.pickerInfoList[1].nameIndex2 = e.target.value
724 this.pickerInfoChioce.rightCyl=this.pickerInfoList[1].nameArray2[e.target.value]
725 },
726
727 bindPickerChange21: function(e) {
728 this.pickerInfoList[2].nameIndex1 = e.target.value
729 this.pickerInfoChioce.leftAxi=this.pickerInfoList[2].nameArray1[e.target.value]
730 },
731 bindPickerChange22: function(e) {
732 this.pickerInfoList[2].nameIndex2 = e.target.value
733 this.pickerInfoChioce.rightAxi=this.pickerInfoList[2].nameArray2[e.target.value]
734 },
735
736 bindPickerChange41: function(e) {
737 this.pickerInfoList[3].nameIndex1 = e.target.value
738 this.pickerInfoChioce.time.year=this.pickerInfoList[3].nameArray1[e.target.value]
739 },
740 bindPickerChange42: function(e) {
741 this.pickerInfoList[3].nameIndex2 = e.target.value
742 this.pickerInfoChioce.time.month=this.pickerInfoList[3].nameArray2[e.target.value]
743 },
744 bindPickerChange43: function(e) {
745 this.pickerInfoList[3].nameIndex3 = e.target.value
746 this.pickerInfoChioce.time.day=this.pickerInfoList[3].nameArray3[e.target.value]
747 },
748
458 </view> 749 // 是否填充人员数据
459 <view class="chooseItem_3 chooseItem"> 750 // fillData(e) {
460 <UniCollapse @change="change(3)"> 751 // this.isDataName = false
461 <UniCollapseItem 752 // console.log('e---->', e)
462 open=true 753 // const mpList = this.mpList
463 title="度数" 754
464 showAnimation=false 755 // <<<<<<< HEAD
465 > 756 // for (let index = 0; index < mpList.length; index++) {
466 <view class="chooseItem_1_content"> 757 // if (e.detail.value === mpList[index].name) {
467 <view class="itemsWrap"> 758 // this.isDataName = true
468 <view 759 // uni.showModal({
469 class="item2" 760 // title: '提示',
470 v-for="(item,index) in chooseItem3" 761 // content: `是否填充已有的${e.detail.value}的数据`,
471 :key="index" 762 // success: ({ confirm }) => {
472 :class="{ active2: current3 === index }" 763 // if (confirm) {
473 @click="onClickItem3(index)" 764 // this.checkedData = mpList[index]
474 >{{item}}</view> 765 // console.log('checkedData', this.checkedData)
475 </view> 766 // }
476 </view> 767 // }
477 </UniCollapseItem> 768 // })
478 </UniCollapse> 769 // }
479 <view 770 // }
480 class="chooseRes" 771 // },
481 v-show="show[3]" 772 // =======
773 // for (let index = 0; index < mpList.length; index++) {
774 // if (e.detail.value === mpList[index].name) {
775 // this.isDataName = true
776 // uni.showModal({
777 // title: '提示',
778 // content: `是否自动填充已保存的${e.detail.value}的数据`,
779 // success: ({ confirm }) => {
780 // if (confirm) {
781 // this.checkedData = mpList[index]
782 // console.log('checkedData', this.checkedData)
783 // }
784 // }
785 // })
786 // }
787 // }
788 // },
789 // // 确认验光数据
790 // changeConfirm() {
482 >* {{chooseRes3}}</view> 791
483 </view> --> 792 // },
793 // >>>>>>> 3a0878cc773855146d390a935b133980a5c0ee88
484 </view> 794 change(num) {
485 <view 795 this.show[num] = !this.show[num]
486 class="button" 796 this.$forceUpdate()
487 @click="toComfirmOrder" 797 },
488 > 798 onClickItem(index, i) {
489 立即结算 799 if (this.current[index] !== i) {
490 </view> 800 this.current[index] = i
491 </view> 801 }
492 </template> 802 this.$forceUpdate()
493 803 },
494 <script> 804 onClickItem1(index) {
495 import UniCollapse from '@/components/UniCollapse/UniCollapse.vue' 805 if (this.current1 !== index) {
496 import UniCollapseItem from '@/components/UniCollapseItem/UniCollapseItem.vue' 806 this.current1 = index
497 import store from '@/store' 807 this.chooseRes1 = this.chooseItem1[index].describ
498 808 }
499 export default { 809 },
500 components: { 810 onClickItem2(index) {
501 UniCollapse, 811 if (this.current2 !== index) {
502 UniCollapseItem 812 this.current2 = index
503 }, 813 this.chooseRes2 = this.chooseItem2[index].num
504 data() { 814 }
505 return { 815 },
506 count: 1, 816 onClickItem3(index) {
507 pid: 0, 817 if (this.current3 !== index) {
508 maxCount: 20, 818 this.current3 = index
509 dataName: '', // 验光数据人员名称 819 this.chooseRes3 = this.chooseItem3[index]
510 isDataName: false, // 是否是已存在的人员数据 820 }
511 dataConfirm: false, // 已确认所输入验光数据 821 },
512 opIsOpen: true, 822 counter(isadd) {
513 addDisabled: false, 823 if (isadd) {
514 desDisabled: false, 824 this.count >= this.maxCount ? this.addDisabled = true : this.count++
515 current1: 0, 825 } else {
516 current2: 0, 826 this.count <= 1 ? this.desDisabled = true : this.count--
517 current3: 0, 827 }
518 current: [], 828 },
519 show: [], 829 toComfirmOrder() {
520 chooseRes1: { 830 // 先处理验光部分的逻辑,如果ok在跳转
521 sku_name: 'Miss 黑二代【减龄自然】', 831 let flag=0;
522 sk_id: '128' 832 if(this.name==''){
523 }, 833 uni.showToast({
524 checkedData: { 834 title:"请输入验光单取名",
525 835 icon: "none",
526 }, 836 duration: 2000,
527 chooseRes2: '14.0', 837 })
528 chooseRes3: 0, 838 }else{
529 chooseItem1: [ 839
530 { style: 'opacity: 0.7;background-image: radial-gradient(50% 148%, #ECEAEA 50%, #8D8C8C 100%);', describ: 'Miss 黑1代【减龄自然】' }, 840 if(this.pd==''){
531 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑二代【防紫外线】' }, 841 uni.showToast({
532 { style: 'background-image: radial-gradient(50% 148%, #FDF8F6 50%, #94380B 100%);', describ: 'Miss 黑3代【防紫外线】' }, 842 title:"请输入瞳距",
533 { style: 'background-image: radial-gradient(50% 148%, #FFFFFF 50%, #324A05 100%);', describ: 'Miss 黑4代【防紫外线】' }, 843 icon: "none",
534 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑5代【防紫外线】' }, 844 duration: 2000,
535 { style: 'opacity: 0.7;background-image: radial-gradient(50% 150%, #F0EEE7 50%, #6F0838 100%);', describ: 'Miss 黑6代【防紫外线】' }, 845 })
536 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #370B4E 100%);', describ: 'Miss 黑7代【防紫外线】' }, 846 }else{
537 { style: 'background-image: radial-gradient(50% 148%, #FFFFFF 50%, #324A05 100%);', describ: 'Miss 黑4代【防紫外线】' }, 847
848 if(this.kinds==1){
849 // 添加用户验光单
850 console.log('kinds====>',this.pickerInfoChioce.leftSph)
851 console.log('kinds====>',this.pickerInfoChioce.leftSph==Number)
852 console.log('kinds====>',this.pickerInfoChioce.rightSph==Number)
853 if(this.pickerInfoChioce.rightSph==''||this.pickerInfoChioce.leftSph==''||
854 this.pickerInfoChioce.leftCyl==''||this.pickerInfoChioce.rightCyl==''||
855 this.pickerInfoChioce.leftAxi==''||this.pickerInfoChioce.rightAxi==''
856 ){
857 uni.showToast({
858 title:"请输入您的验光数据",
859 icon: "none",
860 duration: 2000,
861 })
862 }else{
863 if(this.confirm){
864 store.dispatch('myLoveList/addMylove', {
865 uid: this.$store.state.user.userInfo.uid,
866 openid: this.$store.state.user.userInfo.openid,
867 // mp_name: this.$store.state.user.userInfo.mp_name,
868 leftSph: this.pickerInfoChioce.leftSph,
869 rightSph: this.pickerInfoChioce.rightSph,
870 leftCyl: this.pickerInfoChioce.leftCyl,
871 rightCyl: this.pickerInfoChioce.rightCyl,
872 leftAxi: this.pickerInfoChioce.leftAxi,
873 rightAxi: this.pickerInfoChioce.rightAxi,
874 pd: this.pd,// 瞳距
875 mp_name:this.name,
876 // time: this.pickerInfoChioce.time,
877 // img_url2: "http://localhost:8087/images/shop_1/1/",
878 });
879 store.dispatch('myLoveList/getLoveList', {
880 uid: this.$store.state.user.userInfo.uid,
881 });
882 flag=1
883 } else{
884 uni.showToast({
885 title:"请确认您的验光数据",
886 icon: "none",
887 duration: 3000,
888 })
889 }
890 }
891 }
892 if(this.kinds==2){
893 // console.log('kinds====>',this.kinds)
894 // console.log('pickerindex=====>',this.pickerInfoList[0].nameIndex1)
895 // console.log('this.pickerInfoChioce====>',type(this.pickerInfoChioce))
896 if(this.confirm){
897 const leftList = ["leftSph","leftCyl","leftAxi"];
898 const rightList = ["rightSph", "rightCyl", "rightAxi"];
899 // let flag=0;
900 if(this.name!=this.oldname){
901 store.dispatch('myLoveList/updateMylove', {
902 uid: this.$store.state.user.userInfo.uid,
903 openid: this.$store.state.user.userInfo.openid,
904 mp_id: this.mp_id,
905 keyname: 'name',
906 keyvalue: this.name,
907 });
908 flag=1
909 }
910 if(this.pd!=this.oldpd){
911 store.dispatch('myLoveList/updateMylove', {
912 uid: this.$store.state.user.userInfo.uid,
913 openid: this.$store.state.user.userInfo.openid,
914 mp_id: this.mp_id,
915 keyname: 'pd',
916 keyvalue: this.pd,
917 });
918 flag=1
919 }
920 // 先验证是否输入有无空
921 let q= true;
922 for(let k=0; k<3;k++){
923 q=q&&(this.pickerInfoList[k].nameArray1[this.pickerInfoList[k].nameIndex1]!=''&&
924 this.pickerInfoList[k].nameArray2[this.pickerInfoList[k].nameIndex2]!='')
925 }
926 if(q){
927
928 for (let j=0; j<3; j++) {
929 if(this.pickerInfoList[j].nameIndex1!=0){
930 store.dispatch('myLoveList/updateMylove', {
931 uid: this.$store.state.user.userInfo.uid,
932 openid: this.$store.state.user.userInfo.openid,
933 mp_id: this.mp_id,
934 keyname: leftList[j],
935 keyvalue: this.pickerInfoList[j].nameArray1[this.pickerInfoList[j].nameIndex1],
936 });
937 }
938 if(this.pickerInfoList[j].nameIndex2!=0){
939 store.dispatch('myLoveList/updateMylove', {
940 uid: this.$store.state.user.userInfo.uid,
941 openid: this.$store.state.user.userInfo.openid,
942 mp_id: this.mp_id,
943 keyname: rightList[j],
944 keyvalue: this.pickerInfoList[j].nameArray2[this.pickerInfoList[j].nameIndex2]
945 });
946 }
947 flag=1;
948 }
949 }else{
950 flag=0;
951 uni.showToast({
952 title:"请输入您的验光数据",
953 icon: "none",
954 duration: 2000,
955 })
956
957 }
958 if(flag!=0){
959 store.dispatch('myLoveList/getLoveList', {
960 uid: this.$store.state.user.userInfo.uid,
961 });
962 }
963
964 } else{
965 uni.showToast({
966 title:"请确认您的验光数据",
967 icon: "none",
968 duration: 3000,
969 })
970 }
971 }
972 }
973
974 }
975 if(flag!=0){
976 let i = 0
977 // 判断出是哪一个sku被选中
978 for (let index = 0; index < this.current.length; index++) {
979 console.log('index', index, i, index !== this.current.length - 1)
980 if (index !== this.current.length - 1) {
981 console.log('----', this.current[index], this.attrList[1].attr.length, this.attrList)
982 i = this.current[index] * this.attrList[1].attr.length
983 } else {
984 i += this.current[index]
985 }
986 console.log('i', i)
987 }
988 console.log('i------>', i)
989 // 判断是否其输入的人员数据是否已存在
990 store.dispatch('order/saveParams', {
991 sk_id_arr: this.skuList[i],
992 current: this.current
993 })
994
995 uni.navigateTo({
996 url: `../confirmOrder/confirmOrder?pid=${this.pid}`
997 })
998 }
538 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑5代【防紫外线】' }, 999
539 { style: 'opacity: 0.7;background-image: radial-gradient(50% 150%, #F0EEE7 50%, #6F0838 100%);', describ: 'Miss 黑6代【防紫外线】' },
540 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #370B4E 100%);', describ: 'Miss 黑7代【防紫外线】' },
541 { style: 'background-image: radial-gradient(50% 148%, #FFFFFF 50%, #324A05 100%);', describ: 'Miss 黑4代【防紫外线】' },
542 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #624B3F 100%);', describ: 'Miss 黑5代【防紫外线】' }, 1000 }
543 { style: 'opacity: 0.7;background-image: radial-gradient(50% 150%, #F0EEE7 50%, #6F0838 100%);', describ: 'Miss 黑6代【防紫外线】' }, 1001 }
544 { style: 'background-image: radial-gradient(50% 143%, #AEA8A8 45%, #370B4E 100%);', describ: 'Miss 黑7代【防紫外线】' } 1002 }
545 ], 1003 </script>
546 chooseItem2: [ 1004
547 { num: '14.0' }, 1005 <style lang="scss">
548 { num: '14.2' }, 1006 .content {
549 { num: '14.4' }, 1007 min-height: 100vh;
550 { num: '14.5' } 1008 background-color: #f2f2f2;
551 ], 1009 // padding-top: 20rpx;
552 chooseItem3: [0, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 470, 500, 525, 550, 575, 600, 1000], 1010 .goodInfo {
553 // 度数相关数据 1011 width: 100%;
554 pickerInfoList:[ 1012 height: 272rpx;
555 {nameC:"度数",nameE:"(SPH)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:0}, 1013 border-radius: 16rpx;
556 {nameC:"散光",nameE:"(CYL)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:1}, 1014 background-color: #ffffff;
557 {nameC:"散光轴位",nameE:"(AXI)",nameArray1:[''],nameIndex1:0,nameArray2:[''],nameIndex2:0,key:2}, 1015 box-sizing: border-box;
558 {nameC:"验光日期",nameE:'',nameArray1:[''],nameIndex1:0,nameArray2:['',1,2,3,4,5,6,7,8,9,10,11,12],nameIndex2:0,nameArray3:[''],nameIndex3:0} 1016 padding: 36rpx;
559 ], 1017 display: flex;
560 confirm: false, // 用户是否确认 1018 flex-direction: row;
561 tabicon:['/static/detail-button.png','/static/detail-button-unselected.png'], 1019 justify-content: flex-start;
562 name: '夏小花', 1020 .imageWrap {
563 oldname:'',// 用于判读用户是否改变名字 1021 height: 188rpx;
564 pickerInfoChioce:{ 1022 width: 188rpx;
565 "leftSph": '', 1023 margin-right: 28rpx;
566 "rightSph": '', 1024 image {
567 "leftCyl": '', 1025 height: 188rpx;
568 "rightCyl": '', 1026 width: 188rpx;
569 "leftAxi": '', 1027 }
570 "rightAxi": '', 1028 }
571 "time":{ 1029 .infoRight {
572 "year":0, 1030 display: flex;
573 "month": 0, 1031 flex-direction: column;
574 "day":0 , 1032 align-items: flex-start;
575 } 1033 justify-content: space-between;
576 }, 1034 .goodName {
577 pd: '',// 瞳距 1035 font-size: 28rpx;
578 oldpd: '',// 用于判断用户是否改变瞳距 1036 color: #333333;
579 kinds:1, // kinds=1,提交为新增验光,2为修改 1037 }
580 mp_id: Number 1038 .remarks {
581 } 1039 font-size: 20rpx;
582 }, 1040 color: #999999;
583 computed: { 1041 }
584 attrList() { 1042 .priceBox {
585 return this.$store.state.read.goodInfo.attrList 1043 display: flex;
586 }, 1044 justify-content: space-between;
587 skuList() { 1045 align-items: center;
588 return this.$store.state.read.goodInfo.skuList 1046 width: 100%;
589 }, 1047 font-size: 14px;
590 mpList() { 1048 color: #999999;
591 return this.$store.state.myLoveList.loveList 1049 .price {
592 } 1050 color: #ff6b4a;
593 }, 1051 font-size: 28rpx;
594 onLoad({ pid }) { 1052 }
595 this.pid = pid 1053 .counter {
596 store.dispatch('read/fetch', { 1054 display: flex;
597 pid 1055 flex-direction: row;
598 }).then(() => { 1056 justify-content: space-between;
599 const current = [] 1057 align-items: center;
600 const show = [] 1058 font-size: 28rpx;
601 for (let index = 0; index < this.attrList.length; index++) { 1059 color: #333333;
602 current.push(0) 1060 width: 122rpx;
603 show.push(true) 1061 .btn {
604 } 1062 display: flex;
605 this.current = current 1063 justify-content: center;
606 this.show = show 1064 line-height: 32rpx;
607 }) 1065 height: 32rpx;
608 store.dispatch('myLoveList/getLoveList') 1066 width: 32rpx;
609 1067 background-color: #f2f2f2;
610 // 初始化SPL、CYL、AXI的值 1068 color: #cfcfcf;
611 for (let j = 0; j < 3; j++) { 1069 }
612 for(let i=-12;i<6;i++){ 1070 }
613 this.pickerInfoList[j].nameArray1.push(i) 1071 }
614 this.pickerInfoList[j].nameArray1.push(i+0.5) 1072 }
615 this.pickerInfoList[j].nameArray2.push(i) 1073 }
616 this.pickerInfoList[j].nameArray2.push(i+0.5) 1074 .goods-data {
617 if(i>=-6){ 1075 width: 100%;
618 this.pickerInfoList[j].nameArray1.push(i+0.25) 1076 box-sizing: border-box;
619 this.pickerInfoList[j].nameArray1.push(i+0.75) 1077 padding: 37rpx 40rpx 0 40rpx;
620 this.pickerInfoList[j].nameArray2.push(i+0.25) 1078 background: #ffffff;
621 this.pickerInfoList[j].nameArray2.push(i+0.75) 1079 border-radius: 12rpx;
622 } 1080 .opCollapse {
623 if(i==5){ 1081 width: 100%;
624 this.pickerInfoList[j].nameArray1.push(i+1) 1082 padding-bottom: 28rpx;
625 this.pickerInfoList[j].nameArray2.push(i+1) 1083 margin-top: 7px;
626 } 1084 border-bottom: 1px solid #e9e9e9;
627 } 1085 .head {
628 } 1086 display: flex;
629 // 初始化日期值 1087 justify-content: space-between;
630 for (let i = 1; i < 32; i++){ 1088 height: 24px;
631 this.pickerInfoList[3].nameArray3.push(i) 1089 // font-family: PingFangSC-Medium;
632 } 1090 font-size: 16px;
633 // 初始化年份前后五年 1091 color: #333333;
634 let myDate = new Date(); 1092 letter-spacing: -0.3px;
635 let nowYear = myDate.getFullYear(); 1093 text-align: justify;
636 for(let i=0;i<5;i++){ 1094 line-height: 24px;
637 this.pickerInfoList[3].nameArray1.push(nowYear-i) 1095 margin-bottom: 18rpx;
638 } 1096 .headRighted {
639 }, 1097 width: 0;
640 methods: { 1098 height: 0;
641 // picker相关功能 1099 border-left: 4px solid transparent;
642 handleInput(e){ 1100 border-right: 4px solid transparent;
643 this.name=e.target.value 1101 border-bottom: 4px solid #cfcfcf;
644 this.isDataName = false 1102 transform: scaleY(-1);
645 console.log('e---->', e) 1103 margin-top: 10px;
646 const mpList = this.mpList 1104 }
647 console.log('mpList===>',mpList) 1105 .headMid {
648 for (let index = 0; index < mpList.length; index++) { 1106 // font-family: PingFangSC-Regular;
649 if (e.detail.value === mpList[index].name) { 1107 font-size: 10px;
650 this.isDataName = true 1108 color: #999999;
651 uni.showModal({ 1109 letter-spacing: -0.19px;
652 title: '提示', 1110 margin-left: -120rpx;
653 content: `是否填充已有的"${e.detail.value}"的数据`, 1111 }
654 success: ({ confirm }) => { 1112 .headRight {
655 if (confirm) { 1113 width: 0;
656 this.kinds=2 1114 height: 0;
657 console.log('args===>',index) 1115 border-left: 4px solid transparent;
658 // const mpList=Object.assign({},this.$store.state.mympList.mpList) 1116 border-right: 4px solid transparent;
659 console.log('mpList===>',mpList) 1117 border-bottom: 4px solid #cfcfcf;
660 this.name=mpList[index].name 1118 margin-top: 10px;
661 this.pd=mpList[index].pd 1119 }
662 this.mp_id=mpList[index].mp_id 1120 }
663 this.oldname=mpList[index].name 1121 .body {
664 this.oldpd=mpList[index].pd 1122 // font-family: PingFangSC-Regular;
665 // 将kinds =2时的值传到该页面 1123 font-size: 12px;
666 this.pickerInfoList[0].nameArray1.unshift(mpList[index].leftSph) 1124 color: #666666;
667 this.pickerInfoList[0].nameArray2.unshift(mpList[index].rightSph) 1125 letter-spacing: 0;
668 this.pickerInfoList[1].nameArray1.unshift(mpList[index].leftCyl) 1126 .bodyBox {
669 this.pickerInfoList[1].nameArray2.unshift(mpList[index].rightCyl) 1127 margin-top: 15px;
670 this.pickerInfoList[2].nameArray1.unshift(mpList[index].leftAxi) 1128 .names {
671 this.pickerInfoList[2].nameArray2.unshift(mpList[index].rightAxi) 1129 // font-family: PingFangSC-Regular;
672 1130 font-size: 12px;
673 this.pickerInfoList[3].nameArray1.unshift(mpList[index].in_time.toString().slice(0,4)) 1131 color: #151515;
674 if(mpList[index].in_time.toString().slice(5,6)==0){ 1132 letter-spacing: 0;
675 this.pickerInfoList[3].nameArray2.unshift(mpList[index].in_time.toString().slice(6,7)) 1133 text-align: justify;
676 } else{ 1134 line-height: 17px;
677 this.pickerInfoList[3].nameArray2.unshift(mpList[index].in_time.toString().slice(5,7)) 1135 margin-left: 5px;
678 } 1136 margin-right: 10px;
679 if(mpList[index].in_time.toString().slice(8,9)==0){ 1137 }
680 this.pickerInfoList[3].nameArray3.unshift(mpList[index].in_time.toString().slice(9,10)) 1138 text {
681 } else{ 1139 // font-family: PingFangSC-Regular;
682 this.pickerInfoList[3].nameArray3.unshift(mpList[index].in_time.toString().slice(8,10)) 1140 font-size: 12px;
683 } 1141 color: #666666;
684 // this.checkedData = mpList[index] 1142 letter-spacing: 0;
685 // console.log('checkedData', this.checkedData) 1143 text-align: justify;
686 } 1144 }
687 } 1145 }
688 }) 1146 }
689 } 1147
690 } 1148 // .goods-form {
691 }, 1149 // display: flex;
692 handleInputPd(e){ 1150 // flex-direction: column;
693 // 只能输入正浮点数或正数 1151 // align-items: center;
694 if(/^\d+(\.\d+)?$/.test(e.target.value)){ 1152 // justify-content: center;
695 this.pd=e.target.value 1153 // background-color: #fff;
696 } else { 1154 // width: 100%;
697 uni.showToast({ 1155 // .p1 {
698 title:"请输入有效数据;示例:89", 1156 // font-size: 16px;
699 icon: "none", 1157 // color: #333333;
700 duration: 2000, 1158 // letter-spacing: -0.3px;
701 }) 1159 // text-align: justify;
702 this.pd = '' 1160 // line-height: 24px;
703 } 1161 // margin: 4px 0;
704 1162 // }
705 }, 1163 // .p2 {
706 changeConfirm() { 1164 // font-size: 12px;
707 this.confirm = !this.confirm 1165 // color: #999999;
708 }, 1166 // letter-spacing: -0.23px;
709 bindPickerChange01: function(e) { 1167 // margin-bottom: 18rpx;
710 this.pickerInfoList[0].nameIndex1 = e.target.value 1168 // }
711 this.pickerInfoChioce.leftSph=this.pickerInfoList[0].nameArray1[e.target.value] 1169 // image {
712 }, 1170 // width: 28rpx;
713 bindPickerChange02: function(e) { 1171 // height: 26rpx;
714 this.pickerInfoList[0].nameIndex2 = e.target.value 1172 // }
715 this.pickerInfoChioce.rightSph=this.pickerInfoList[0].nameArray2[e.target.value] 1173 // .confirm {
716 }, 1174 // display: flex;
717 1175 // align-items: center;
718 bindPickerChange11: function(e) { 1176 // font-size: 12px;
719 this.pickerInfoList[1].nameIndex1 = e.target.value 1177 // color: #666666;
720 this.pickerInfoChioce.leftCyl=this.pickerInfoList[1].nameArray1[e.target.value] 1178 // letter-spacing: -0.23px;
721 }, 1179 // width: 684rpx;
722 bindPickerChange12: function(e) { 1180 // image {
723 this.pickerInfoList[1].nameIndex2 = e.target.value 1181 // margin-right: 25rpx;
724 this.pickerInfoChioce.rightCyl=this.pickerInfoList[1].nameArray2[e.target.value] 1182 // }
725 }, 1183 // }
726 1184 // .picker {
727 bindPickerChange21: function(e) { 1185 // display: flex;
728 this.pickerInfoList[2].nameIndex1 = e.target.value 1186 // flex-direction: column;
729 this.pickerInfoChioce.leftAxi=this.pickerInfoList[2].nameArray1[e.target.value] 1187 // justify-content: center;
730 }, 1188 // align-items: center;
731 bindPickerChange22: function(e) { 1189 // width: 100%;
732 this.pickerInfoList[2].nameIndex2 = e.target.value 1190 // image {
733 this.pickerInfoChioce.rightAxi=this.pickerInfoList[2].nameArray2[e.target.value] 1191 // width: 10px;
734 }, 1192 // height: 10px;
735 1193 // margin-right: 5px;
736 bindPickerChange41: function(e) { 1194 // }
737 this.pickerInfoList[3].nameIndex1 = e.target.value 1195 // .picker-choice {
738 this.pickerInfoChioce.time.year=this.pickerInfoList[3].nameArray1[e.target.value] 1196 // display: flex;
739 }, 1197 // width: 684rpx;
740 bindPickerChange42: function(e) { 1198 // align-items: center;
741 this.pickerInfoList[3].nameIndex2 = e.target.value 1199 // margin-bottom: 40rpx;
742 this.pickerInfoChioce.time.month=this.pickerInfoList[3].nameArray2[e.target.value] 1200 // .choice-left {
743 }, 1201 // width: 210rpx;
744 bindPickerChange43: function(e) { 1202 // .p11 {
745 this.pickerInfoList[3].nameIndex3 = e.target.value 1203 // font-size: 14px;
746 this.pickerInfoChioce.time.day=this.pickerInfoList[3].nameArray3[e.target.value] 1204 // color: #333333;
747 }, 1205 // letter-spacing: -0.26px;
748 1206 // text-align: justify;
749 // 是否填充人员数据 1207 // line-height: 24px;
750 // fillData(e) { 1208 // }
751 // this.isDataName = false 1209 // .p12 {
752 // console.log('e---->', e) 1210 // font-size: 10px;
753 // const mpList = this.mpList 1211 // color: #3f3f3f;
754 1212 // letter-spacing: -0.19px;
755 <<<<<<< HEAD 1213 // text-align: justify;
756 // for (let index = 0; index < mpList.length; index++) { 1214 // line-height: 24px;
757 // if (e.detail.value === mpList[index].name) { 1215 // }
758 // this.isDataName = true 1216 // }
759 // uni.showModal({ 1217 // .p13 {
760 // title: '提示', 1218 // font-size: 10px;
761 // content: `是否填充已有的${e.detail.value}的数据`, 1219 // color: #999999;
762 // success: ({ confirm }) => { 1220 // letter-spacing: -0.19px;
763 // if (confirm) { 1221 // margin-right: 10px;
764 // this.checkedData = mpList[index] 1222 // }
765 // console.log('checkedData', this.checkedData) 1223 // .p13-date {
766 // } 1224 // font-size: 10px;
767 // } 1225 // color: #999999;
768 // }) 1226 // letter-spacing: -0.19px;
769 // } 1227 // margin-right: 5px;
770 // } 1228 // }
771 // }, 1229 // .p14 {
772 ======= 1230 // font-size: 14px;
773 for (let index = 0; index < mpList.length; index++) { 1231 // color: #666666;
774 if (e.detail.value === mpList[index].name) { 1232 // letter-spacing: -0.26px;
775 this.isDataName = true 1233 // text-align: center;
776 uni.showModal({ 1234 // width: 124rpx;
777 title: '提示', 1235 // border-bottom: 1px solid #cfcfcf;
778 content: `是否自动填充已保存的${e.detail.value}的数据`, 1236 // }
779 success: ({ confirm }) => { 1237 // }
780 if (confirm) { 1238 // }
1239 // }
1240 .goods-form {
1241 display: flex;
1242 flex-direction: column;
1243 align-items: center;
1244 justify-content: center;
1245 background-color: #fff;
1246 width: 100%;
1247 padding: 40rpx 0;
1248 .p1 {
1249 font-size: 16px;
1250 color: #333333;
1251 letter-spacing: -0.3px;
1252 text-align: justify;
1253 line-height: 24px;
1254 margin: 4px 0;
1255
1256 }
1257 .p2 {
1258 font-size: 12px;
1259 color: #999999;
1260 letter-spacing: -0.23px;
1261 margin-bottom: 32rpx;
1262 }
1263 .image2{
1264 width: 42rpx;
1265 height: 34rpx;
1266 margin-right: 12rpx;
1267 }
1268 .confirm {
1269 display: flex;
1270 align-items: center;
1271 font-size: 12px;
1272 color: #666666;
1273 letter-spacing: -0.23px;
1274 width: 684rpx;
1275 .image1{
1276 margin-right:25rpx;
1277 width: 42rpx;
1278 height: 38rpx;
1279 }
1280 }
1281 .picker{
1282 display: flex;
1283 flex-direction: column;
1284 justify-content: center;
1285 align-items: center;
1286 width: 100%;
1287
1288 .picker-choice{
1289 display: flex;
1290 width: 684rpx;
1291 align-items: center;
1292 margin-bottom: 40rpx;
1293 .input{
1294 border-bottom: 1px solid #CFCFCF;
1295 height: 40rpx;
1296 }
1297 .choice-left{
1298 width: 210rpx;
1299 .pd{
1300 font-size: 14px;
1301 color: #333333;
1302 letter-spacing: -0.26px;
1303 text-align: justify;
1304 line-height: 24px;
1305 margin-right: 44rpx;
1306 }
1307 .p11 {
1308 font-size: 14px;
1309 color: #333333;
1310 letter-spacing: -0.26px;
1311 text-align: justify;
1312 line-height: 24px;
1313 // margin-right: 10px;
1314 }
1315 .p12 {
1316 font-size: 10px;
1317 color: #3F3F3F;
1318 letter-spacing: -0.19px;
1319 text-align: justify;
1320 line-height: 24px;
1321 }
1322
1323
1324 }
1325 .p13 {
1326 font-size: 10px;
1327 color: #999999;
1328 letter-spacing: -0.19px;
1329 margin-right: 10px;
1330 }
1331 .p13-date {
1332 font-size: 10px;
1333 color: #999999;
1334 letter-spacing: -0.19px;
1335 margin-right: 5px;
1336 }
1337 picker{
1338 width: 144rpx;
1339 height: 40rpx;
1340 display: flex;
1341 position: relative;
1342 .p14 {
1343 font-size: 14px;
1344 color: #666666;
1345 letter-spacing: -0.26px;
1346 text-align: center;
1347 width: 124rpx;
1348 border-bottom: 1px solid #CFCFCF;
1349 height: 38rpx;
1350 }
1351 image{
1352 width: 20rpx;
1353 height: 20rpx;
1354 position: absolute;
1355 right: 20rpx;
1356 top: 8rpx;
1357 }
1358 }
1359
1360
1361 }
1362 }
1363 }
781 this.checkedData = mpList[index] 1364 }
782 console.log('checkedData', this.checkedData) 1365 }
783 } 1366 .choose {
784 } 1367 width: 100%;
785 }) 1368 background: #ffffff;
786 } 1369 border-radius: 12rpx;
787 } 1370 margin-top: 20rpx;
788 }, 1371 padding: 40rpx 40rpx 112rpx 40rpx;
789 // 确认验光数据 1372 box-sizing: border-box;
790 changeConfirm() { 1373 .chooseItem {
791 1374 width: 100%;
792 }, 1375 padding-bottom: 32rpx;
793 >>>>>>> 3a0878cc773855146d390a935b133980a5c0ee88 1376 border-bottom: 1px solid #e9e9e9;
794 change(num) { 1377 margin-bottom: 28rpx;
795 this.show[num] = !this.show[num] 1378 }
796 this.$forceUpdate() 1379 .chooseRes {
797 }, 1380 font-size: 12px;
798 onClickItem(index, i) { 1381 color: #666666;
799 if (this.current[index] !== i) { 1382 }
800 this.current[index] = i 1383 .itemsWrap {
801 } 1384 display: flex;
802 this.$forceUpdate() 1385 flex-direction: row;
803 }, 1386 flex-wrap: wrap;
804 onClickItem1(index) { 1387 justify-content: flex-start;
805 if (this.current1 !== index) { 1388 align-items: center;
806 this.current1 = index 1389 padding-top: 24rpx;
807 this.chooseRes1 = this.chooseItem1[index].describ 1390 .item1 {
808 } 1391 width: 64rpx;
809 }, 1392 height: 64rpx;
810 onClickItem2(index) { 1393 border-radius: 32rpx;
811 if (this.current2 !== index) { 1394 margin: 0 36rpx 24rpx 0;
812 this.current2 = index 1395 transition: all 0.3s;
813 this.chooseRes2 = this.chooseItem2[index].num 1396 border: 1px solid #ffffff;
814 } 1397 }
815 }, 1398 .item2 {
816 onClickItem3(index) { 1399 // width: 100rpx;
817 if (this.current3 !== index) { 1400 padding: 0 30rpx;
818 this.current3 = index 1401 height: 60rpx;
819 this.chooseRes3 = this.chooseItem3[index] 1402 margin: 0 20rpx 20rpx 0;
820 } 1403 transition: all 0.3s;
821 }, 1404 background: #f2f2f2;
822 counter(isadd) { 1405 border-radius: 2px;
823 if (isadd) { 1406 border-radius: 2px;
824 this.count >= this.maxCount ? this.addDisabled = true : this.count++ 1407 line-height: 60rpx;
825 } else { 1408 text-align: center;
826 this.count <= 1 ? this.desDisabled = true : this.count-- 1409 color: #666666;
827 } 1410 font-size: 12px;
828 }, 1411 }
829 toComfirmOrder() { 1412 .active1 {
830 // 先处理验光部分的逻辑,如果ok在跳转 1413 opacity: 0.7;
831 let flag=0; 1414 border: 1px solid #ff6b4a;
832 if(this.name==''){ 1415 }
833 uni.showToast({ 1416 .active2 {
834 title:"请输入验光单取名", 1417 background: rgba(255, 107, 74, 0.15);
835 icon: "none", 1418 color: #ff6b4a;
836 duration: 2000, 1419 }
837 }) 1420 }
838 }else{ 1421 }
839 1422 .button {
840 if(this.pd==''){ 1423 width: 100%;
841 uni.showToast({ 1424 height: 112rpx;
842 title:"请输入瞳距", 1425 background-color: #ff6b4a;
843 icon: "none", 1426 font-size: 16px;
844 duration: 2000, 1427 color: #ffffff;
845 }) 1428 line-height: 112rpx;
846 }else{ 1429 text-align: center;
847 1430 position: fixed;
848 if(this.kinds==1){ 1431 bottom: 0;
849 // 添加用户验光单 1432 left: 0;
850 console.log('kinds====>',this.pickerInfoChioce.leftSph) 1433 }