Commit 4a07016a18f301e60799d0a59d2bdb2a6e47b113
1 parent
c5e16568
feat: 资信管理-新增&编辑&变更—增加必填字段:编号、办事处、区域、简写名称、企业类型、登记日期、单位名称、授信额度、结算期限 + 资信管理-审核—运作科主管-结算期限、授信额度 必填
Showing
4 changed files
with
106 additions
and
20 deletions
| ... | ... | @@ -15,6 +15,9 @@ |
| 15 | 15 | </uni-list-item> |
| 16 | 16 | |
| 17 | 17 | <uni-list-item title="办事处"> |
| 18 | + <template v-slot:body> | |
| 19 | + <view class="item-title"><text class="required">*</text><text>办事处</text></view> | |
| 20 | + </template> | |
| 18 | 21 | <template v-slot:footer> |
| 19 | 22 | <view class="readonly-text">{{ form.deptName }}</view> |
| 20 | 23 | </template> |
| ... | ... | @@ -23,10 +26,13 @@ |
| 23 | 26 | <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable |
| 24 | 27 | @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow> |
| 25 | 28 | <template v-slot:body> |
| 26 | - <view class="item-title"><text>区域</text></view> | |
| 29 | + <view class="item-title"><text class="required">*</text><text>区域</text></view> | |
| 27 | 30 | </template> |
| 28 | 31 | </uni-list-item> |
| 29 | - <uni-list-item title="简写名称"> | |
| 32 | + <uni-list-item class="select-item" :class="form.customerShortName ? 'is-filled' : 'is-empty'"> | |
| 33 | + <template v-slot:body> | |
| 34 | + <view class="item-title"><text class="required">*</text><text>简写名称</text></view> | |
| 35 | + </template> | |
| 30 | 36 | <template v-slot:footer> |
| 31 | 37 | <uni-easyinput v-model="form.customerShortName" placeholder="请输入简写名称" :inputBorder="false" /> |
| 32 | 38 | </template> |
| ... | ... | @@ -35,11 +41,14 @@ |
| 35 | 41 | <uni-list-item class="select-item" :class="form.enterpriseType ? 'is-filled' : 'is-empty'" clickable |
| 36 | 42 | @click="openSheet('enterpriseType')" :rightText="displayLabel('enterpriseTypeName')" showArrow> |
| 37 | 43 | <template v-slot:body> |
| 38 | - <view class="item-title"><text>企业类型</text></view> | |
| 44 | + <view class="item-title"><text class="required">*</text><text>企业类型</text></view> | |
| 39 | 45 | </template> |
| 40 | 46 | </uni-list-item> |
| 41 | 47 | |
| 42 | 48 | <uni-list-item class="mgb10" title="登记日期"> |
| 49 | + <template v-slot:body> | |
| 50 | + <view class="item-title"><text class="required">*</text><text>登记日期</text></view> | |
| 51 | + </template> | |
| 43 | 52 | <template v-slot:footer> |
| 44 | 53 | <uni-datetime-picker type="date" v-model="form.registerDate" /> |
| 45 | 54 | </template> |
| ... | ... | @@ -257,7 +266,7 @@ |
| 257 | 266 | </uni-list-item> |
| 258 | 267 | <uni-list-item class="amount-item"> |
| 259 | 268 | <template v-slot:body> |
| 260 | - <view class="item-title"><text>授信额度</text></view> | |
| 269 | + <view class="item-title"><text class="required">*</text><text>授信额度</text></view> | |
| 261 | 270 | </template> |
| 262 | 271 | <template v-slot:footer> |
| 263 | 272 | <view class="amount-row"> |
| ... | ... | @@ -267,6 +276,9 @@ |
| 267 | 276 | </template> |
| 268 | 277 | </uni-list-item> |
| 269 | 278 | <uni-list-item title="结算期限"> |
| 279 | + <template v-slot:body> | |
| 280 | + <view class="item-title"><text class="required">*</text><text>结算期限</text></view> | |
| 281 | + </template> | |
| 270 | 282 | <template v-slot:footer> |
| 271 | 283 | <uni-easyinput v-model="form.settlementPeriod" placeholder="请输入结算期限" :inputBorder="false" /> |
| 272 | 284 | </template> |
| ... | ... | @@ -498,12 +510,21 @@ export default { |
| 498 | 510 | validateRequired() { |
| 499 | 511 | const checks = [ |
| 500 | 512 | { key: 'serialNumber', label: '编号' }, |
| 501 | - { key: 'companyId', label: '单位名称' } | |
| 513 | + { key: 'deptId', label: '办事处' }, | |
| 514 | + { key: 'region', label: '区域' }, | |
| 515 | + { key: 'customerShortName', label: '简写名称' }, | |
| 516 | + { key: 'enterpriseType', label: '企业类型' }, | |
| 517 | + { key: 'registerDate', label: '登记日期' }, | |
| 518 | + { key: 'companyId', label: '单位名称' }, | |
| 519 | + { key: 'creditLimit', label: '授信额度' }, | |
| 520 | + { key: 'settlementPeriod', label: '结算期限' } | |
| 502 | 521 | ] |
| 503 | 522 | for (const it of checks) { |
| 504 | 523 | const val = this.form[it.key] |
| 505 | 524 | if (val === undefined || val === null || String(val).trim() === '') { |
| 506 | - uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }) | |
| 525 | + const isInput = ['customerShortName', 'settlementPeriod', 'creditLimit'].includes(it.key); | |
| 526 | + const verb = isInput ? '输入' : '选择'; | |
| 527 | + uni.showToast({ title: `请先${verb}${it.label}`, icon: 'none' }) | |
| 507 | 528 | return false |
| 508 | 529 | } |
| 509 | 530 | } | ... | ... |
| ... | ... | @@ -14,6 +14,9 @@ |
| 14 | 14 | </uni-list-item> |
| 15 | 15 | |
| 16 | 16 | <uni-list-item title="办事处"> |
| 17 | + <template v-slot:body> | |
| 18 | + <view class="item-title"><text class="required">*</text><text>办事处</text></view> | |
| 19 | + </template> | |
| 17 | 20 | <template v-slot:footer> |
| 18 | 21 | <view class="readonly-text">{{ form.deptName }}</view> |
| 19 | 22 | </template> |
| ... | ... | @@ -22,10 +25,13 @@ |
| 22 | 25 | <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable |
| 23 | 26 | @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow> |
| 24 | 27 | <template v-slot:body> |
| 25 | - <view class="item-title"><text>区域</text></view> | |
| 28 | + <view class="item-title"><text class="required">*</text><text>区域</text></view> | |
| 26 | 29 | </template> |
| 27 | 30 | </uni-list-item> |
| 28 | - <uni-list-item title="简写名称"> | |
| 31 | + <uni-list-item class="select-item" :class="form.customerShortName ? 'is-filled' : 'is-empty'"> | |
| 32 | + <template v-slot:body> | |
| 33 | + <view class="item-title"><text class="required">*</text><text>简写名称</text></view> | |
| 34 | + </template> | |
| 29 | 35 | <template v-slot:footer> |
| 30 | 36 | <uni-easyinput v-model="form.customerShortName" placeholder="请输入简写名称" :inputBorder="false" /> |
| 31 | 37 | </template> |
| ... | ... | @@ -34,11 +40,14 @@ |
| 34 | 40 | <uni-list-item class="select-item" :class="form.enterpriseType ? 'is-filled' : 'is-empty'" clickable |
| 35 | 41 | @click="openSheet('enterpriseType')" :rightText="displayLabel('enterpriseTypeName')" showArrow> |
| 36 | 42 | <template v-slot:body> |
| 37 | - <view class="item-title"><text>企业类型</text></view> | |
| 43 | + <view class="item-title"><text class="required">*</text><text>企业类型</text></view> | |
| 38 | 44 | </template> |
| 39 | 45 | </uni-list-item> |
| 40 | 46 | |
| 41 | 47 | <uni-list-item class="mgb10" title="登记日期"> |
| 48 | + <template v-slot:body> | |
| 49 | + <view class="item-title"><text class="required">*</text><text>登记日期</text></view> | |
| 50 | + </template> | |
| 42 | 51 | <template v-slot:footer> |
| 43 | 52 | <uni-datetime-picker type="date" v-model="form.registerDate" /> |
| 44 | 53 | </template> |
| ... | ... | @@ -256,7 +265,7 @@ |
| 256 | 265 | </uni-list-item> |
| 257 | 266 | <uni-list-item class="amount-item"> |
| 258 | 267 | <template v-slot:body> |
| 259 | - <view class="item-title"><text>授信额度</text></view> | |
| 268 | + <view class="item-title"><text class="required">*</text><text>授信额度</text></view> | |
| 260 | 269 | </template> |
| 261 | 270 | <template v-slot:footer> |
| 262 | 271 | <view class="amount-row"> |
| ... | ... | @@ -266,6 +275,9 @@ |
| 266 | 275 | </template> |
| 267 | 276 | </uni-list-item> |
| 268 | 277 | <uni-list-item title="结算期限"> |
| 278 | + <template v-slot:body> | |
| 279 | + <view class="item-title"><text class="required">*</text><text>结算期限</text></view> | |
| 280 | + </template> | |
| 269 | 281 | <template v-slot:footer> |
| 270 | 282 | <uni-easyinput v-model="form.settlementPeriod" placeholder="请输入结算期限" :inputBorder="false" /> |
| 271 | 283 | </template> |
| ... | ... | @@ -512,12 +524,21 @@ export default { |
| 512 | 524 | validateRequired() { |
| 513 | 525 | const checks = [ |
| 514 | 526 | { key: 'serialNumber', label: '编号' }, |
| 515 | - { key: 'companyId', label: '单位名称' } | |
| 527 | + { key: 'deptName', label: '办事处' }, | |
| 528 | + { key: 'region', label: '区域' }, | |
| 529 | + { key: 'customerShortName', label: '简写名称' }, | |
| 530 | + { key: 'enterpriseType', label: '企业类型' }, | |
| 531 | + { key: 'registerDate', label: '登记日期' }, | |
| 532 | + { key: 'companyId', label: '单位名称' }, | |
| 533 | + { key: 'creditLimit', label: '授信额度' }, | |
| 534 | + { key: 'settlementPeriod', label: '结算期限' } | |
| 516 | 535 | ] |
| 517 | 536 | for (const it of checks) { |
| 518 | 537 | const val = this.form[it.key] |
| 519 | 538 | if (val === undefined || val === null || String(val).trim() === '') { |
| 520 | - uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }) | |
| 539 | + const isInput = ['customerShortName', 'settlementPeriod', 'creditLimit'].includes(it.key); | |
| 540 | + const verb = isInput ? '输入' : '选择'; | |
| 541 | + uni.showToast({ title: `请先${verb}${it.label}`, icon: 'none' }) | |
| 521 | 542 | return false |
| 522 | 543 | } |
| 523 | 544 | } |
| ... | ... | @@ -622,6 +643,7 @@ export default { |
| 622 | 643 | padding-bottom: calc(32rpx + env(safe-area-inset-bottom)); |
| 623 | 644 | background: #fff; |
| 624 | 645 | box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.06); |
| 646 | + z-index: 10; | |
| 625 | 647 | |
| 626 | 648 | .btn { |
| 627 | 649 | height: 80rpx; | ... | ... |
| ... | ... | @@ -14,6 +14,9 @@ |
| 14 | 14 | </uni-list-item> |
| 15 | 15 | |
| 16 | 16 | <uni-list-item title="办事处"> |
| 17 | + <template v-slot:body> | |
| 18 | + <view class="item-title"><text class="required">*</text><text>办事处</text></view> | |
| 19 | + </template> | |
| 17 | 20 | <template v-slot:footer> |
| 18 | 21 | <view class="readonly-text">{{ form.deptName }}</view> |
| 19 | 22 | </template> |
| ... | ... | @@ -21,10 +24,13 @@ |
| 21 | 24 | <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable |
| 22 | 25 | @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow> |
| 23 | 26 | <template v-slot:body> |
| 24 | - <view class="item-title"><text>区域</text></view> | |
| 27 | + <view class="item-title"><text class="required">*</text><text>区域</text></view> | |
| 25 | 28 | </template> |
| 26 | 29 | </uni-list-item> |
| 27 | - <uni-list-item title="简写名称"> | |
| 30 | + <uni-list-item class="select-item" :class="form.customerShortName ? 'is-filled' : 'is-empty'"> | |
| 31 | + <template v-slot:body> | |
| 32 | + <view class="item-title"><text class="required">*</text><text>简写名称</text></view> | |
| 33 | + </template> | |
| 28 | 34 | <template v-slot:footer> |
| 29 | 35 | <uni-easyinput v-model="form.customerShortName" placeholder="请输入简写名称" :inputBorder="false" /> |
| 30 | 36 | </template> |
| ... | ... | @@ -33,11 +39,14 @@ |
| 33 | 39 | <uni-list-item class="select-item" :class="form.enterpriseType ? 'is-filled' : 'is-empty'" clickable |
| 34 | 40 | @click="openSheet('enterpriseType')" :rightText="displayLabel('enterpriseTypeName')" showArrow> |
| 35 | 41 | <template v-slot:body> |
| 36 | - <view class="item-title"><text>企业类型</text></view> | |
| 42 | + <view class="item-title"><text class="required">*</text><text>企业类型</text></view> | |
| 37 | 43 | </template> |
| 38 | 44 | </uni-list-item> |
| 39 | 45 | |
| 40 | 46 | <uni-list-item class="mgb10" title="登记日期"> |
| 47 | + <template v-slot:body> | |
| 48 | + <view class="item-title"><text class="required">*</text><text>登记日期</text></view> | |
| 49 | + </template> | |
| 41 | 50 | <template v-slot:footer> |
| 42 | 51 | <uni-datetime-picker type="date" v-model="form.registerDate" /> |
| 43 | 52 | </template> |
| ... | ... | @@ -255,7 +264,7 @@ |
| 255 | 264 | </uni-list-item> |
| 256 | 265 | <uni-list-item class="amount-item"> |
| 257 | 266 | <template v-slot:body> |
| 258 | - <view class="item-title"><text>授信额度</text></view> | |
| 267 | + <view class="item-title"><text class="required">*</text><text>授信额度</text></view> | |
| 259 | 268 | </template> |
| 260 | 269 | <template v-slot:footer> |
| 261 | 270 | <view class="amount-row"> |
| ... | ... | @@ -265,6 +274,9 @@ |
| 265 | 274 | </template> |
| 266 | 275 | </uni-list-item> |
| 267 | 276 | <uni-list-item title="结算期限"> |
| 277 | + <template v-slot:body> | |
| 278 | + <view class="item-title"><text class="required">*</text><text>结算期限</text></view> | |
| 279 | + </template> | |
| 268 | 280 | <template v-slot:footer> |
| 269 | 281 | <uni-easyinput v-model="form.settlementPeriod" placeholder="请输入结算期限" :inputBorder="false" /> |
| 270 | 282 | </template> |
| ... | ... | @@ -511,12 +523,21 @@ export default { |
| 511 | 523 | validateRequired() { |
| 512 | 524 | const checks = [ |
| 513 | 525 | { key: 'serialNumber', label: '编号' }, |
| 514 | - { key: 'companyId', label: '单位名称' } | |
| 526 | + { key: 'deptName', label: '办事处' }, | |
| 527 | + { key: 'region', label: '区域' }, | |
| 528 | + { key: 'customerShortName', label: '简写名称' }, | |
| 529 | + { key: 'enterpriseType', label: '企业类型' }, | |
| 530 | + { key: 'registerDate', label: '登记日期' }, | |
| 531 | + { key: 'companyId', label: '单位名称' }, | |
| 532 | + { key: 'creditLimit', label: '授信额度' }, | |
| 533 | + { key: 'settlementPeriod', label: '结算期限' } | |
| 515 | 534 | ] |
| 516 | 535 | for (const it of checks) { |
| 517 | 536 | const val = this.form[it.key] |
| 518 | 537 | if (val === undefined || val === null || String(val).trim() === '') { |
| 519 | - uni.showToast({ title: `请先选择${it.label}`, icon: 'none' }) | |
| 538 | + const isInput = ['customerShortName', 'settlementPeriod', 'creditLimit'].includes(it.key); | |
| 539 | + const verb = isInput ? '输入' : '选择'; | |
| 540 | + uni.showToast({ title: `请先${verb}${it.label}`, icon: 'none' }) | |
| 520 | 541 | return false |
| 521 | 542 | } |
| 522 | 543 | } | ... | ... |
| ... | ... | @@ -65,7 +65,10 @@ |
| 65 | 65 | </view> |
| 66 | 66 | <view class="dialog_body"> |
| 67 | 67 | <uni-list> |
| 68 | - <uni-list-item title="结算期限"> | |
| 68 | + <uni-list-item> | |
| 69 | + <template v-slot:body> | |
| 70 | + <view class="item-title"><text class="required">*</text><text>结算期限</text></view> | |
| 71 | + </template> | |
| 69 | 72 | <template v-slot:footer> |
| 70 | 73 | <uni-easyinput v-model="companyReview.companySettlementPeriod" placeholder="请输入结算期限" |
| 71 | 74 | :inputBorder="false" /> |
| ... | ... | @@ -84,7 +87,10 @@ |
| 84 | 87 | <view class="item-title"><text>客户分类</text></view> |
| 85 | 88 | </template> |
| 86 | 89 | </uni-list-item> |
| 87 | - <uni-list-item title="授信额度"> | |
| 90 | + <uni-list-item> | |
| 91 | + <template v-slot:body> | |
| 92 | + <view class="item-title"><text class="required">*</text><text>授信额度</text></view> | |
| 93 | + </template> | |
| 88 | 94 | <template v-slot:footer> |
| 89 | 95 | <view class="amount-row"> |
| 90 | 96 | <uni-easyinput type="number" v-model="companyReview.companyCreditLimit" |
| ... | ... | @@ -336,6 +342,14 @@ export default { |
| 336 | 342 | }, |
| 337 | 343 | // 公司评审 保存 |
| 338 | 344 | onCompanyReviewSave() { |
| 345 | + if (!this.companyReview.companySettlementPeriod) { | |
| 346 | + uni.showToast({ title: '请输入结算期限', icon: 'none' }) | |
| 347 | + return | |
| 348 | + } | |
| 349 | + if (!this.companyReview.companyCreditLimit) { | |
| 350 | + uni.showToast({ title: '请输入授信额度', icon: 'none' }) | |
| 351 | + return | |
| 352 | + } | |
| 339 | 353 | this.$refs.companyReviewPopup && this.$refs.companyReviewPopup.close(); |
| 340 | 354 | console.log('审核__companyReview', this.companyReview) |
| 341 | 355 | uni.showToast({ title: '已保存', icon: 'none' }) |
| ... | ... | @@ -688,6 +702,14 @@ export default { |
| 688 | 702 | margin-right: 32rpx; |
| 689 | 703 | color: rgba(0,0,0,0.9); |
| 690 | 704 | padding-right: 0; |
| 705 | + | |
| 706 | + .required { | |
| 707 | + color: red; | |
| 708 | + position: absolute; | |
| 709 | + top: 50%; | |
| 710 | + transform: translateY(-50%); | |
| 711 | + left: -16rpx; | |
| 712 | + } | |
| 691 | 713 | } |
| 692 | 714 | } |
| 693 | 715 | ... | ... |