Commit 8704577cc405f0273a68fe062edcdd1cd2f15087
1 parent
563d1d49
Exists in
charge
fix:限制图片大小、取消单号长度限制、小区带出省市区
Showing
2 changed files
with
26 additions
and
11 deletions
Show diff stats
pages/charge/visitsAndFees/createaVisit.vue
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | <u-form-item :required="item.required" :label="item.label" labelWidth="75%" borderBottom |
81 | 81 | v-if="item.type === 'file' && item.show" :prop="item.key"> |
82 | 82 | <u-upload :fileList="fileList" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="1" |
83 | - :disabled="operationStatus ==='YD'" width="100rpx" height="100rpx"></u-upload> | |
83 | + :disabled="operationStatus ==='YD'" width="100rpx" height="100rpx" :maxSize="fileSize"></u-upload> | |
84 | 84 | </u-form-item> |
85 | 85 | </view> |
86 | 86 | </view> |
... | ... | @@ -198,7 +198,7 @@ |
198 | 198 | |
199 | 199 | <!-- 字典选择 --> |
200 | 200 | <u-picker :show="pickerShow" ref="uPicker" closeOnClickOverlay :columns="columns" @cancel="pickerShow = false" |
201 | - @close="pickerShow = false" keyName="label" @confirm="confirm"></u-picker> | |
201 | + @close="pickerShow = false" keyName="label" @confirm="confirm" :defaultIndex="[0]"></u-picker> | |
202 | 202 | |
203 | 203 | <!-- 公司选择 --> |
204 | 204 | <u-picker :show="gsShow" ref="gsPicker" closeOnClickOverlay :title="gsName" :columns="companyList" |
... | ... | @@ -208,6 +208,7 @@ |
208 | 208 | <!-- 时间选择 --> |
209 | 209 | <u-datetime-picker :show="datetimeShow" v-model="dataTimeValue" closeOnClickOverlay @confirm="dateConfirm" |
210 | 210 | @cancel="datetimeShow = false" @close="datetimeShow = false" mode="date"></u-datetime-picker> |
211 | + | |
211 | 212 | <!-- 省市区街道选择 --> |
212 | 213 | <uv-picker ref="regionsPicker" :columns="addressList" @confirm="regionConfirm" keyName="name" |
213 | 214 | :loading="regionLoading" @change="regionChange"></uv-picker> |
... | ... | @@ -282,6 +283,7 @@ |
282 | 283 | remark: "", |
283 | 284 | attachmentFile: "", |
284 | 285 | }, |
286 | + fileSize:20971520, //限制文件大小为20M | |
285 | 287 | copyModel: {}, |
286 | 288 | rules: { |
287 | 289 | billingPersonName: [{ |
... | ... | @@ -706,8 +708,7 @@ |
706 | 708 | type: "input", |
707 | 709 | key: "invoiceNo", |
708 | 710 | show: true, |
709 | - mode: "number", | |
710 | - max: '10' | |
711 | + mode: "text", | |
711 | 712 | }, { |
712 | 713 | label: '收费金额', |
713 | 714 | placeholder: "请输入", |
... | ... | @@ -997,7 +998,12 @@ |
997 | 998 | let col = result.data.map(item => ({ |
998 | 999 | value: item.vlgOrCmty, |
999 | 1000 | label: `${item.vlgOrCmty}(${item.urbRurCls})`, |
1000 | - urbRurCls: item.urbRurCls | |
1001 | + urbRurCls: item.urbRurCls, | |
1002 | + province:item.province, | |
1003 | + city:item.city, | |
1004 | + district:item.district, | |
1005 | + street:item.street, | |
1006 | + address:`${item.province}${item.city}${item.district}${item.street}` | |
1001 | 1007 | })); |
1002 | 1008 | this.columns = [col]; |
1003 | 1009 | } else if (item.key === 'userName') { |
... | ... | @@ -1071,6 +1077,11 @@ |
1071 | 1077 | this.emptyFill(2); |
1072 | 1078 | this.model[this.currentName] = e.value[0].value; |
1073 | 1079 | this.model.urbRurCls = e.value[0].urbRurCls; |
1080 | + this.model.address = e.value[0].address; | |
1081 | + this.model.userProvince = e.value[0].province; | |
1082 | + this.model.userCity = e.value[0].city; | |
1083 | + this.model.userDistrict = e.value[0].district; | |
1084 | + this.model.userStreet = e.value[0].street; | |
1074 | 1085 | } else if (this.currentName === 'userName') { |
1075 | 1086 | this.emptyFill(); |
1076 | 1087 | let values = e.values[0][0] |
... | ... | @@ -1327,14 +1338,18 @@ |
1327 | 1338 | }) |
1328 | 1339 | }, |
1329 | 1340 | async uploadAttachment() { |
1330 | - console.log("上传附件"); | |
1331 | 1341 | uni.chooseFile({ |
1332 | 1342 | count: 1, //默认100 |
1333 | 1343 | type: 'all', |
1334 | 1344 | // extension: ['.doc', '.xlsx', '.docx'], |
1335 | 1345 | success: async (res) => { |
1336 | - let tempUrl = res.tempFilePaths[0] | |
1337 | - console.log(res); | |
1346 | + let size = res.tempFiles[0].size | |
1347 | + console.log("上传附件",res); | |
1348 | + if(size > this.fileSize){ | |
1349 | + uni.$u.toast("请上传20M以内的文件"); | |
1350 | + return | |
1351 | + } | |
1352 | + let tempUrl = res.tempFilePaths[0]; | |
1338 | 1353 | const result = await chargeFile.uploadFile(tempUrl); |
1339 | 1354 | this.attachmentList.push(result); |
1340 | 1355 | console.log(result); |
... | ... | @@ -1474,7 +1489,7 @@ |
1474 | 1489 | } |
1475 | 1490 | |
1476 | 1491 | /deep/.u-form-item__body__right__content__slot { |
1477 | - justify-content: end; | |
1492 | + justify-content: flex-end; | |
1478 | 1493 | padding-bottom: 5rpx; |
1479 | 1494 | } |
1480 | 1495 | </style> | ... | ... |
pages/login/mobile.vue
... | ... | @@ -29,9 +29,9 @@ |
29 | 29 | v-model="formData.password" placeholder="请输入登录密码" style="width: 610rpx;"> |
30 | 30 | <u-icon slot="prefix" size="20" style="margin-right: 48rpx;" name="/static/images/icon/pwd.png"></u-icon> |
31 | 31 | <template slot="suffix"> |
32 | - <u-icon v-if="inputType === 'password'" size="20" color="#666666" name="eye-fill" | |
32 | + <u-icon v-if="inputType === 'password'" size="20" color="#666666" name="eye-off" | |
33 | 33 | @click="inputType = 'text'"></u-icon> |
34 | - <u-icon v-if="inputType === 'text'" size="20" color="#666666" name="eye-off" | |
34 | + <u-icon v-if="inputType === 'text'" size="20" color="#666666" name="eye-fill" | |
35 | 35 | @click="inputType = 'password'"></u-icon> |
36 | 36 | </template> |
37 | 37 | </u-input> | ... | ... |