Commit 4a07016a18f301e60799d0a59d2bdb2a6e47b113

Authored by 史婷婷
1 parent c5e16568

feat: 资信管理-新增&编辑&变更—增加必填字段:编号、办事处、区域、简写名称、企业类型、登记日期、单位名称、授信额度、结算期限 + 资信管理-审核—运作科主管-结算期限、授信额度 必填

@@ -15,6 +15,9 @@ @@ -15,6 +15,9 @@
15 </uni-list-item> 15 </uni-list-item>
16 16
17 <uni-list-item title="办事处"> 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 <template v-slot:footer> 21 <template v-slot:footer>
19 <view class="readonly-text">{{ form.deptName }}</view> 22 <view class="readonly-text">{{ form.deptName }}</view>
20 </template> 23 </template>
@@ -23,10 +26,13 @@ @@ -23,10 +26,13 @@
23 <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable 26 <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable
24 @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow> 27 @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow>
25 <template v-slot:body> 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 </template> 30 </template>
28 </uni-list-item> 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 <template v-slot:footer> 36 <template v-slot:footer>
31 <uni-easyinput v-model="form.customerShortName" placeholder="请输入简写名称" :inputBorder="false" /> 37 <uni-easyinput v-model="form.customerShortName" placeholder="请输入简写名称" :inputBorder="false" />
32 </template> 38 </template>
@@ -35,11 +41,14 @@ @@ -35,11 +41,14 @@
35 <uni-list-item class="select-item" :class="form.enterpriseType ? 'is-filled' : 'is-empty'" clickable 41 <uni-list-item class="select-item" :class="form.enterpriseType ? 'is-filled' : 'is-empty'" clickable
36 @click="openSheet('enterpriseType')" :rightText="displayLabel('enterpriseTypeName')" showArrow> 42 @click="openSheet('enterpriseType')" :rightText="displayLabel('enterpriseTypeName')" showArrow>
37 <template v-slot:body> 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 </template> 45 </template>
40 </uni-list-item> 46 </uni-list-item>
41 47
42 <uni-list-item class="mgb10" title="登记日期"> 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 <template v-slot:footer> 52 <template v-slot:footer>
44 <uni-datetime-picker type="date" v-model="form.registerDate" /> 53 <uni-datetime-picker type="date" v-model="form.registerDate" />
45 </template> 54 </template>
@@ -257,7 +266,7 @@ @@ -257,7 +266,7 @@
257 </uni-list-item> 266 </uni-list-item>
258 <uni-list-item class="amount-item"> 267 <uni-list-item class="amount-item">
259 <template v-slot:body> 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 </template> 270 </template>
262 <template v-slot:footer> 271 <template v-slot:footer>
263 <view class="amount-row"> 272 <view class="amount-row">
@@ -267,6 +276,9 @@ @@ -267,6 +276,9 @@
267 </template> 276 </template>
268 </uni-list-item> 277 </uni-list-item>
269 <uni-list-item title="结算期限"> 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 <template v-slot:footer> 282 <template v-slot:footer>
271 <uni-easyinput v-model="form.settlementPeriod" placeholder="请输入结算期限" :inputBorder="false" /> 283 <uni-easyinput v-model="form.settlementPeriod" placeholder="请输入结算期限" :inputBorder="false" />
272 </template> 284 </template>
@@ -498,12 +510,21 @@ export default { @@ -498,12 +510,21 @@ export default {
498 validateRequired() { 510 validateRequired() {
499 const checks = [ 511 const checks = [
500 { key: 'serialNumber', label: '编号' }, 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 for (const it of checks) { 522 for (const it of checks) {
504 const val = this.form[it.key] 523 const val = this.form[it.key]
505 if (val === undefined || val === null || String(val).trim() === '') { 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 return false 528 return false
508 } 529 }
509 } 530 }
@@ -14,6 +14,9 @@ @@ -14,6 +14,9 @@
14 </uni-list-item> 14 </uni-list-item>
15 15
16 <uni-list-item title="办事处"> 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 <template v-slot:footer> 20 <template v-slot:footer>
18 <view class="readonly-text">{{ form.deptName }}</view> 21 <view class="readonly-text">{{ form.deptName }}</view>
19 </template> 22 </template>
@@ -22,10 +25,13 @@ @@ -22,10 +25,13 @@
22 <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable 25 <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable
23 @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow> 26 @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow>
24 <template v-slot:body> 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 </template> 29 </template>
27 </uni-list-item> 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 <template v-slot:footer> 35 <template v-slot:footer>
30 <uni-easyinput v-model="form.customerShortName" placeholder="请输入简写名称" :inputBorder="false" /> 36 <uni-easyinput v-model="form.customerShortName" placeholder="请输入简写名称" :inputBorder="false" />
31 </template> 37 </template>
@@ -34,11 +40,14 @@ @@ -34,11 +40,14 @@
34 <uni-list-item class="select-item" :class="form.enterpriseType ? 'is-filled' : 'is-empty'" clickable 40 <uni-list-item class="select-item" :class="form.enterpriseType ? 'is-filled' : 'is-empty'" clickable
35 @click="openSheet('enterpriseType')" :rightText="displayLabel('enterpriseTypeName')" showArrow> 41 @click="openSheet('enterpriseType')" :rightText="displayLabel('enterpriseTypeName')" showArrow>
36 <template v-slot:body> 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 </template> 44 </template>
39 </uni-list-item> 45 </uni-list-item>
40 46
41 <uni-list-item class="mgb10" title="登记日期"> 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 <template v-slot:footer> 51 <template v-slot:footer>
43 <uni-datetime-picker type="date" v-model="form.registerDate" /> 52 <uni-datetime-picker type="date" v-model="form.registerDate" />
44 </template> 53 </template>
@@ -256,7 +265,7 @@ @@ -256,7 +265,7 @@
256 </uni-list-item> 265 </uni-list-item>
257 <uni-list-item class="amount-item"> 266 <uni-list-item class="amount-item">
258 <template v-slot:body> 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 </template> 269 </template>
261 <template v-slot:footer> 270 <template v-slot:footer>
262 <view class="amount-row"> 271 <view class="amount-row">
@@ -266,6 +275,9 @@ @@ -266,6 +275,9 @@
266 </template> 275 </template>
267 </uni-list-item> 276 </uni-list-item>
268 <uni-list-item title="结算期限"> 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 <template v-slot:footer> 281 <template v-slot:footer>
270 <uni-easyinput v-model="form.settlementPeriod" placeholder="请输入结算期限" :inputBorder="false" /> 282 <uni-easyinput v-model="form.settlementPeriod" placeholder="请输入结算期限" :inputBorder="false" />
271 </template> 283 </template>
@@ -512,12 +524,21 @@ export default { @@ -512,12 +524,21 @@ export default {
512 validateRequired() { 524 validateRequired() {
513 const checks = [ 525 const checks = [
514 { key: 'serialNumber', label: '编号' }, 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 for (const it of checks) { 536 for (const it of checks) {
518 const val = this.form[it.key] 537 const val = this.form[it.key]
519 if (val === undefined || val === null || String(val).trim() === '') { 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 return false 542 return false
522 } 543 }
523 } 544 }
@@ -622,6 +643,7 @@ export default { @@ -622,6 +643,7 @@ export default {
622 padding-bottom: calc(32rpx + env(safe-area-inset-bottom)); 643 padding-bottom: calc(32rpx + env(safe-area-inset-bottom));
623 background: #fff; 644 background: #fff;
624 box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.06); 645 box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.06);
  646 + z-index: 10;
625 647
626 .btn { 648 .btn {
627 height: 80rpx; 649 height: 80rpx;
@@ -14,6 +14,9 @@ @@ -14,6 +14,9 @@
14 </uni-list-item> 14 </uni-list-item>
15 15
16 <uni-list-item title="办事处"> 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 <template v-slot:footer> 20 <template v-slot:footer>
18 <view class="readonly-text">{{ form.deptName }}</view> 21 <view class="readonly-text">{{ form.deptName }}</view>
19 </template> 22 </template>
@@ -21,10 +24,13 @@ @@ -21,10 +24,13 @@
21 <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable 24 <uni-list-item class="select-item" :class="form.region ? 'is-filled' : 'is-empty'" clickable
22 @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow> 25 @click="openSheet('region')" :rightText="displayLabel('regionName')" showArrow>
23 <template v-slot:body> 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 </template> 28 </template>
26 </uni-list-item> 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 <template v-slot:footer> 34 <template v-slot:footer>
29 <uni-easyinput v-model="form.customerShortName" placeholder="请输入简写名称" :inputBorder="false" /> 35 <uni-easyinput v-model="form.customerShortName" placeholder="请输入简写名称" :inputBorder="false" />
30 </template> 36 </template>
@@ -33,11 +39,14 @@ @@ -33,11 +39,14 @@
33 <uni-list-item class="select-item" :class="form.enterpriseType ? 'is-filled' : 'is-empty'" clickable 39 <uni-list-item class="select-item" :class="form.enterpriseType ? 'is-filled' : 'is-empty'" clickable
34 @click="openSheet('enterpriseType')" :rightText="displayLabel('enterpriseTypeName')" showArrow> 40 @click="openSheet('enterpriseType')" :rightText="displayLabel('enterpriseTypeName')" showArrow>
35 <template v-slot:body> 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 </template> 43 </template>
38 </uni-list-item> 44 </uni-list-item>
39 45
40 <uni-list-item class="mgb10" title="登记日期"> 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 <template v-slot:footer> 50 <template v-slot:footer>
42 <uni-datetime-picker type="date" v-model="form.registerDate" /> 51 <uni-datetime-picker type="date" v-model="form.registerDate" />
43 </template> 52 </template>
@@ -255,7 +264,7 @@ @@ -255,7 +264,7 @@
255 </uni-list-item> 264 </uni-list-item>
256 <uni-list-item class="amount-item"> 265 <uni-list-item class="amount-item">
257 <template v-slot:body> 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 </template> 268 </template>
260 <template v-slot:footer> 269 <template v-slot:footer>
261 <view class="amount-row"> 270 <view class="amount-row">
@@ -265,6 +274,9 @@ @@ -265,6 +274,9 @@
265 </template> 274 </template>
266 </uni-list-item> 275 </uni-list-item>
267 <uni-list-item title="结算期限"> 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 <template v-slot:footer> 280 <template v-slot:footer>
269 <uni-easyinput v-model="form.settlementPeriod" placeholder="请输入结算期限" :inputBorder="false" /> 281 <uni-easyinput v-model="form.settlementPeriod" placeholder="请输入结算期限" :inputBorder="false" />
270 </template> 282 </template>
@@ -511,12 +523,21 @@ export default { @@ -511,12 +523,21 @@ export default {
511 validateRequired() { 523 validateRequired() {
512 const checks = [ 524 const checks = [
513 { key: 'serialNumber', label: '编号' }, 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 for (const it of checks) { 535 for (const it of checks) {
517 const val = this.form[it.key] 536 const val = this.form[it.key]
518 if (val === undefined || val === null || String(val).trim() === '') { 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 return false 541 return false
521 } 542 }
522 } 543 }
@@ -65,7 +65,10 @@ @@ -65,7 +65,10 @@
65 </view> 65 </view>
66 <view class="dialog_body"> 66 <view class="dialog_body">
67 <uni-list> 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 <template v-slot:footer> 72 <template v-slot:footer>
70 <uni-easyinput v-model="companyReview.companySettlementPeriod" placeholder="请输入结算期限" 73 <uni-easyinput v-model="companyReview.companySettlementPeriod" placeholder="请输入结算期限"
71 :inputBorder="false" /> 74 :inputBorder="false" />
@@ -84,7 +87,10 @@ @@ -84,7 +87,10 @@
84 <view class="item-title"><text>客户分类</text></view> 87 <view class="item-title"><text>客户分类</text></view>
85 </template> 88 </template>
86 </uni-list-item> 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 <template v-slot:footer> 94 <template v-slot:footer>
89 <view class="amount-row"> 95 <view class="amount-row">
90 <uni-easyinput type="number" v-model="companyReview.companyCreditLimit" 96 <uni-easyinput type="number" v-model="companyReview.companyCreditLimit"
@@ -336,6 +342,14 @@ export default { @@ -336,6 +342,14 @@ export default {
336 }, 342 },
337 // 公司评审 保存 343 // 公司评审 保存
338 onCompanyReviewSave() { 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 this.$refs.companyReviewPopup && this.$refs.companyReviewPopup.close(); 353 this.$refs.companyReviewPopup && this.$refs.companyReviewPopup.close();
340 console.log('审核__companyReview', this.companyReview) 354 console.log('审核__companyReview', this.companyReview)
341 uni.showToast({ title: '已保存', icon: 'none' }) 355 uni.showToast({ title: '已保存', icon: 'none' })
@@ -688,6 +702,14 @@ export default { @@ -688,6 +702,14 @@ export default {
688 margin-right: 32rpx; 702 margin-right: 32rpx;
689 color: rgba(0,0,0,0.9); 703 color: rgba(0,0,0,0.9);
690 padding-right: 0; 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