| | |
| | | <el-row |
| | | type="flex" |
| | | class="pam-paragraph"> |
| | | <UiField label="進件時間" :labelSize="20"> |
| | | <UiField label="進件時間" :labelSize="20" class="required"> |
| | | <DateTimePicker |
| | | :defaultValue="appointmentCloseInfo.policyEntryDate" |
| | | @changeDateTime="appointmentCloseInfo.policyEntryDate = $event"></DateTimePicker> |
| | | @changeDateTime="appointmentCloseDate = $event"></DateTimePicker> |
| | | </UiField> |
| | | </el-row> |
| | | </template> |
| | |
| | | <el-row |
| | | class="pam-paragraph"> |
| | | <UiField label="未成交原因" :labelSize="20" class="required"> |
| | | <UiSelect :closeReason.sync="appointmentCloseInfo.closedReason" |
| | | :options="appointmentFailReason"/> |
| | | </UiField> |
| | | <div class="appointment-client-detail-close__select-box"> |
| | | <select |
| | | class="appointment-client-detail-close__select" |
| | | name="closedReason" id="closedReason" v-model="appointmentCloseInfo.closedReason"> |
| | | <option :value="failReason.value" v-for="(failReason, index) in appointmentFailReason" :key="index"> |
| | | {{ failReason.key }} |
| | | </option> |
| | | </select> |
| | | <i class="icon-down down-icon"></i> |
| | | </div> |
| | | <div class="mt-10"> |
| | | <input |
| | | v-if="appointmentCloseInfo.closedReason === 'other' |
| | | || appointmentCloseInfo.closedReason === 'no_suitable_commodity'" |
| | | class="appointment-client-detail-close__input" |
| | | v-model="appointmentCloseInfo.closedOtherReason" |
| | | placeholder="請輸入原因,限50字。" |
| | | type="text"> |
| | | </div> |
| | | <input |
| | | v-if="appointmentCloseInfo.closedReason === 'other' |
| | | || appointmentCloseInfo.closedReason === 'no_suitable_commodity'" |
| | | class="appointment-client-detail-close__input mt-10" |
| | | v-model="appointmentCloseInfo.closedOtherReason" |
| | | placeholder="請輸入原因,限50字。" |
| | | type="text"> |
| | | </el-row> |
| | | </template> |
| | | |
| | |
| | | closedOtherReason : '', |
| | | closedReason : 'other', |
| | | planCode : '', |
| | | policyEntryDate : this.appointmentCloseDate, |
| | | policyEntryDate : '', |
| | | policyholderIdentityId: '', |
| | | remark : '', |
| | | selectCloseOption : this.contactStatus.DONE, |
| | |
| | | ? this.contactStatus.DONE |
| | | : this.contactStatus.CLOSE |
| | | }; |
| | | this.appointmentCloseDate = closedInfo?.policyEntryDate; |
| | | } |
| | | } |
| | | |
| | |
| | | appointmentId : appointmentId, |
| | | contactStatus : this.contactStatus.DONE, |
| | | planCode : this.appointmentCloseInfo.planCode, |
| | | policyEntryDate : this.appointmentCloseInfo.policyEntryDate, |
| | | policyEntryDate : this.appointmentCloseDate, |
| | | policyholderIdentityId: this.appointmentCloseInfo.policyholderIdentityId, |
| | | remark : this.appointmentCloseInfo.remark, |
| | | } |
| | |
| | | contactStatus : this.contactStatus.CLOSE, |
| | | remark : this.appointmentCloseInfo.remark, |
| | | } |
| | | appointmentService.closeAppointment(toCloseAppointment).then((_) => this.updateAppointmentDetail(appointmentId)); |
| | | this.isShowSuccessAlert = true; |
| | | appointmentService.closeAppointment(toCloseAppointment).then((_) => { |
| | | this.updateAppointmentDetail(appointmentId); |
| | | this.isShowSuccessAlert = true; |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | this.isShowSuccessAlert = false ; |
| | | this.$router.push(`/myAppointmentList/contactedList`); |
| | | } |
| | | |
| | | checkIdentityId (id) { |
| | | const tab = "ABCDEFGHJKLMNPQRSTUVXYWZIO"; |
| | | const A1 = [ 1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3 ]; |
| | | const A2 = [ 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5 ]; |
| | | const Mx = [ 9,8,7,6,5,4,3,2,1,1 ]; |
| | | |
| | | if ( id.length != 10 ) return false; |
| | | let i = tab.indexOf( id.charAt(0) ); |
| | | if ( i == -1 ) return false; |
| | | let sum = A1[i] + A2[i]*9; |
| | | |
| | | for ( i=1; i<10; i++ ) { |
| | | const v = parseInt( id.charAt(i) ); |
| | | if ( isNaN(v) ) return false; |
| | | sum = sum + v * Mx[i]; |
| | | } |
| | | |
| | | if ( sum % 10 != 0 ) return false; |
| | | return true; |
| | | } |
| | | |
| | | get isSubmitBtnDisabled() { |
| | | const { |
| | |
| | | closedOtherReason, |
| | | remark |
| | | } = this.appointmentCloseInfo; |
| | | // this.appointmentCloseInfo.policyEntryDate 並沒有辦法取值到 this.appointmentCloseDate |
| | | if (selectCloseOption === this.contactStatus.DONE) { |
| | | return !policyholderIdentityId || !this.identityIdValid || !planCode || !this.appointmentCloseInfo.policyEntryDate || !remark |
| | | return !policyholderIdentityId || !this.identityIdValid || !planCode || !this.appointmentCloseDate |
| | | } else if (closedReason === 'other' || closedReason === 'no_suitable_commodity') { |
| | | return !closedOtherReason |
| | | } |
| | |
| | | } |
| | | |
| | | get identityIdValid() { |
| | | const rule = /^[A-Z]\d{9}$/; |
| | | const identityId = this.appointmentCloseInfo.policyholderIdentityId; |
| | | return identityId ? rule.test(identityId) : true; |
| | | return identityId ? this.checkIdentityId(identityId) : true; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | <style lang="scss" scoped> |
| | | .appointment-close__remark, |
| | | .appointment-client-detail-close__input, |
| | | .appointment-client-detail-close__select { |
| | | .appointment-client-detail-close__input { |
| | | border-radius: 5px; |
| | | border : 1px solid #707070; |
| | | font-size: 20px; |
| | |
| | | } |
| | | &.is-invalid { |
| | | border-color: $PRIMARY_RED !important; |
| | | } |
| | | } |
| | | .appointment-client-detail-close__select-box { |
| | | position: relative; |
| | | |
| | | & .appointment-client-detail-close__select{ |
| | | appearance: none; |
| | | } |
| | | & .down-icon { |
| | | position: absolute; |
| | | right: 7px; |
| | | bottom: 10px; |
| | | } |
| | | } |
| | | .invite-review{ |
| | |
| | | |
| | | &::before { |
| | | content: '*'; |
| | | font-size: 20px; |
| | | font-size: 15px; |
| | | font-weight: bold; |
| | | position: absolute; |
| | | color: #FF0000; |
| | | transform: translateX(-5px); |
| | | transform: translateX(-2px); |
| | | z-index: 5; |
| | | } |
| | | } |