提交 d61a8e29 编写于 作者: 张磊's avatar 张磊

Merge branch 'release-zl' into 'release'

Release zl

See merge request !273
{
"singleQuote": true,
"singleAttributePerLine": true,
"bracketSameLine": false
}
......@@ -6,7 +6,7 @@ export const getEntitlementList = async (externalOrderNo, projectEquityNo) => {
method: 'get',
url: `/tis/insurance/projectEquityNo/externalOrderNo?externalOrderNo=${externalOrderNo}&projectEquityNo=${projectEquityNo}`,
withCredentials: true,
hasLoading: true,
// hasLoading: true,
});
};
......@@ -16,7 +16,7 @@ export const getBanner = async (pageType, yunOrderNo) => {
method: 'get',
url: `/tis/insurance/explain/${yunOrderNo}/${pageType}`,
withCredentials: true,
hasLoading: true,
// hasLoading: true,
});
};
......
......@@ -9,7 +9,7 @@ export const getButtonStatus = (id) => {
};
// 根据订单号获取跳转页状态/
// /tis/insurance/jumpPageStatus?orderNo=1&projectEquityNo=1
export const getJumpPageStatus = ({externalOrderNo, yunOrderNo, projectEquityNo}) => {
export const getJumpPageStatus = ({ externalOrderNo, yunOrderNo, projectEquityNo }) => {
return request({
method: 'get',
url: `/tis/insurance/jumpPageStatus?externalOrderNo=${externalOrderNo}&projectEquityNo=${projectEquityNo}&yunOrderNo=${yunOrderNo}`,
......@@ -51,7 +51,7 @@ export const createOrderSzV2 = (data) => {
});
};
export const uploadPointData = data => {
export const uploadPointData = (data) => {
return request({
url: '/tis/insurance/promotion_channel/report_data',
method: 'POST',
......@@ -59,3 +59,16 @@ export const uploadPointData = data => {
data,
});
};
/**
* 根据外部单号查询用户信息(太保项目使用)
* TB202309151004000001
* @returns
*/
export const taiBaoUserInfo = (externalOrderNo) => {
return request({
url: `/tis/insurance/common/taiBao/TB202309151004000001/${externalOrderNo}`,
method: 'get',
withCredentials: true,
});
};
export const formatDate = (datetime) => {
var date = new Date(datetime); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
var year = date.getFullYear(),
month = ('0' + (date.getMonth() + 1)).slice(-2),
sdate = ('0' + date.getDate()).slice(-2),
hour = ('0' + date.getHours()).slice(-2),
minute = ('0' + date.getMinutes()).slice(-2),
second = ('0' + date.getSeconds()).slice(-2);
// 拼接
var result =
year + '-' + month + '-' + sdate + ' ' + hour + ':' + minute + ':' + second;
// 返回
return result;
var date = new Date(datetime); // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
var year = date.getFullYear(),
month = ('0' + (date.getMonth() + 1)).slice(-2),
sdate = ('0' + date.getDate()).slice(-2),
hour = ('0' + date.getHours()).slice(-2),
minute = ('0' + date.getMinutes()).slice(-2),
second = ('0' + date.getSeconds()).slice(-2);
// 拼接
var result =
year + '-' + month + '-' + sdate + ' ' + hour + ':' + minute + ':' + second;
// 返回
return result;
};
export const formatDay = (datetime) => {
var date = new Date(datetime);
var year = date.getFullYear(),
month = ('0' + (date.getMonth() + 1)).slice(-2),
day = ('0' + date.getDate()).slice(-2);
// 拼接
var result = year + '-' + month + '-' + day;
// 返回
return result;
var date = new Date(datetime);
var year = date.getFullYear(),
month = ('0' + (date.getMonth() + 1)).slice(-2),
day = ('0' + date.getDate()).slice(-2);
// 拼接
var result = year + '-' + month + '-' + day;
// 返回
return result;
};
// 判断是否是微信
export function isWeixin() {
const ua = window.navigator.userAgent.toLowerCase();
if(ua.match(/MicroMessenger/i) == 'micromessenger' || ua.match(/_SQ_/i) == '_sq_') {
// if(ua.match(/MicroMessenger/i) == 'micromessenger' || ua.match(/_SQ_/i) == '_sq_') {
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
return true;
} else{
} else {
return false;
}
}
// 时间戳 格式化为 时分秒(00: 00: 00)
export const formatDuring = (time) => {
const s = Math.floor(time / 1000);
if (!s) {
return '';
const s = Math.floor(time / 1000);
if (!s) {
return '';
}
let t = '';
if (s > -1) {
const hour = Math.floor(s / 3600);
const min = Math.floor(s / 60) % 60;
const sec = s % 60;
if (hour) {
if (hour < 10) {
t = '0' + hour + ':';
} else {
t = hour + ':';
}
}
if (min < 10) {
t += '0';
}
let t = '';
if (s > -1) {
const hour = Math.floor(s / 3600);
const min = Math.floor(s / 60) % 60;
const sec = s % 60;
if (hour) {
if (hour < 10) {
t = '0' + hour + ':';
} else {
t = hour + ':';
}
}
if (min < 10) {
t += '0';
}
t += min + ':';
if (sec < 10) {
t += '0';
}
t += sec.toFixed(0);
t += min + ':';
if (sec < 10) {
t += '0';
}
return t;
t += sec.toFixed(0);
}
return t;
};
export function toDecimal2(x) {
if (isNaN(x)) {
return '';
}
const f = x / 100;
let s = f.toString();
let rs = s.indexOf('.');
if (rs < 0) {
rs = s.length;
s += '.';
}
while (s.length <= rs + 2) {
s += '0';
}
return s;
if (isNaN(x)) {
return '';
}
const f = x / 100;
let s = f.toString();
let rs = s.indexOf('.');
if (rs < 0) {
rs = s.length;
s += '.';
}
while (s.length <= rs + 2) {
s += '0';
}
return s;
}
/**
......@@ -89,18 +90,18 @@ export function toDecimal2(x) {
* birthDay:yyyy-MM-dd
*/
export function getBirthdayAndSex(idCard) {
const info = {};
const birth = (idCard.length === 18) ? idCard.slice(6, 14) : idCard.slice(6, 12);
// 18位:提取第17位数字;15位:提取最后一位数字
const order = (idCard.length === 18) ? idCard.slice(-2, -1) : idCard.slice(-1);
info.birthDay = (idCard.length === 18) ? ([birth.slice(0, 4),
birth.slice(4, 6), birth.slice(-2)
]).join('-') : ([
'19' + birth.slice(0, 2), birth.slice(2, 4),
birth.slice(-2)
]).join('-');
// 余数为0代表女性,不为0代表男性
info.sex = (order % 2 === 0 ? 0 : 1);
return info;
const info = {};
const birth =
idCard.length === 18 ? idCard.slice(6, 14) : idCard.slice(6, 12);
// 18位:提取第17位数字;15位:提取最后一位数字
const order = idCard.length === 18 ? idCard.slice(-2, -1) : idCard.slice(-1);
info.birthDay =
idCard.length === 18
? [birth.slice(0, 4), birth.slice(4, 6), birth.slice(-2)].join('-')
: ['19' + birth.slice(0, 2), birth.slice(2, 4), birth.slice(-2)].join(
'-'
);
// 余数为0代表女性,不为0代表男性
info.sex = order % 2 === 0 ? 0 : 1;
return info;
}
......@@ -18,7 +18,8 @@
<span
v-if="item.detectionPayType == 1"
class="pay-icon"
>付费</span>
>付费</span
>
</div>
<div
class="status"
......@@ -35,9 +36,7 @@
</div>
<div class="content">
<div class="item">
<div class="label">
检测项目:
</div>
<div class="label">检测项目:</div>
<div class="value">
{{ item.detectionName || '--' }}
</div>
......@@ -45,17 +44,13 @@
<div v-if="item.expressContent">
<div class="item">
<div class="label">
运单号:
</div>
<div class="label">运单号:</div>
<div class="value">
{{ item.expressNo || '--' }}
</div>
</div>
<div class="item">
<div class="label">
物流进度:
</div>
<div class="label">物流进度:</div>
<div class="value">
{{ item.expressContent || '--' }}
</div>
......@@ -64,19 +59,21 @@
<div v-else>
<div class="item">
<div class="label">
领取机构:
</div>
<div class="label">领取机构:</div>
<div class="value">
{{ item.hospitalName || '--' }}
</div>
</div>
<div class="item">
<div class="label">
{{ item.detectionTime ? "检测时间" : "预约时间" }}
{{ item.detectionTime ? '检测时间' : '预约时间' }}
</div>
<div class="value">
{{ item.detectionTime ? item.detectionTime : item.appointmentTimeStr || '--' }}
{{
item.detectionTime
? item.detectionTime
: item.appointmentTimeStr || '--'
}}
</div>
</div>
</div>
......@@ -110,9 +107,7 @@
class="empty-icon"
:src="emptyIconPath"
/>
<div class="empty-text">
暂无领取记录
</div>
<div class="empty-text">暂无领取记录</div>
</div>
</div>
</div>
......@@ -353,7 +348,7 @@ export default {
.item {
font-size: 14px;
display: flex;
align-items: top;
align-items: center;
margin-bottom: 5px;
.label {
display: inline-block;
......@@ -403,9 +398,9 @@ export default {
}
}
}
.pay-icon{
.pay-icon {
padding: 2px 3px;
background: #FF4B33;
background: #ff4b33;
border-radius: 6px;
color: #ffffff;
text-align: center;
......
......@@ -34,6 +34,10 @@ export default {
type: String,
default: '',
},
readonly: {
type: Boolean,
default: false,
},
},
data() {
return {
......@@ -46,6 +50,7 @@ export default {
methods: {
handleOpenPopup() {
if (this.readonly) return;
this.visible = true;
},
......
......@@ -7,14 +7,14 @@
/>
<div class="insurance-register-bg">
<div class="bg-img back-img">
<img :src="bgPath">
<img :src="bgPath" />
</div>
<div class="wrap-reg">
<div class="choose-section">
<div class="sz-appoint-form-tips">
<img
src="https://files.yunqueyi.com/image/png/common/20230628155802981.png"
>
/>
</div>
<van-form
ref="dectionForm"
......@@ -26,6 +26,8 @@
clearable
required
class="appoint-form-items"
:class="{ 'field-readonly': isReadonly('name') }"
:readonly="isReadonly('name')"
placeholder="点击此处输入"
:rules="[
{ required: true, message: '请输入参保人姓名' },
......@@ -36,26 +38,40 @@
]"
/>
<van-field
:value="cardTypeName"
label="证件类型"
required
disabled
class="appoint-form-items"
right-icon="arrow"
@click="showCardTypeVisible = true"
/>
:class="{ 'field-readonly': isReadonly('cardTypeName') }"
:right-icon="isReadonly('cardTypeName') ? '' : 'arrow'"
:readonly="isReadonly('cardTypeName')"
@click="
!isReadonly('cardTypeName') && (showCardTypeVisible = true)
"
>
<template #input>
<van-field
class="van-inner-field"
:value="cardTypeName"
readonly
/>
</template>
</van-field>
<van-field
v-model="dectionForm.idCard"
class="appoint-form-items"
:class="{ 'field-readonly': isReadonly('idCard') }"
clearable
required
label="参保人证件号"
placeholder="点击此处输入"
:rules="rules"
:readonly="isReadonly('idCard')"
/>
<van-field
v-if="dectionForm.idType != 1"
class="appoint-form-items"
:class="{ 'field-readonly': isReadonly('sex') }"
required
label="参保人性别"
>
......@@ -63,30 +79,33 @@
<van-radio-group
v-model="dectionForm.sex"
direction="horizontal"
:disabled="isReadonly('sex')"
>
<van-radio :name="1">
</van-radio>
<van-radio :name="2">
</van-radio>
<van-radio :name="1"></van-radio>
<van-radio :name="2"></van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-if="dectionForm.idType != 1"
class="appoint-form-items"
:class="{ 'field-readonly': isReadonly('birthTime') }"
required
label="参保人出生日期"
right-icon="arrow"
:right-icon="isReadonly('birthTime') ? '' : 'arrow'"
:readonly="isReadonly('birthTime')"
>
<template #input>
<DatePicker v-model="dectionForm.birthTime" />
<DatePicker
v-model="dectionForm.birthTime"
:readonly="isReadonly('birthTime')"
/>
</template>
</van-field>
<van-field
v-model="dectionForm.mobilePhone"
class="appoint-form-items"
:class="{ 'field-readonly': isReadonly('mobilePhone') }"
label="参保人手机号"
label-width="100%"
clearable
......@@ -99,6 +118,7 @@
message: '手机号格式填写有误',
},
]"
:readonly="isReadonly('mobilePhone')"
>
<template #label>
<div class="phone-wrap">
......@@ -114,7 +134,7 @@
:key="ind"
class="bg-img mt20"
>
<img :src="i">
<img :src="i" />
</div>
<!-- <div class="bg-img mt20">-->
<!-- <img-->
......@@ -156,9 +176,7 @@
</van-popup>
<!-- 校验通过弹框 -->
<van-overlay
:show="showProtocol"
>
<van-overlay :show="showProtocol">
<div class="check-popup-wrapper">
<van-icon
name="close"
......@@ -166,9 +184,7 @@
size="25"
@click="showProtocol = false"
/>
<p class="title">
身份校验通过
</p>
<p class="title">身份校验通过</p>
<span class="content">请点击“下一步”进入权益领取流程</span>
<div class="submit-button submit-button-empty">
<wx-open-launch-weapp
......@@ -197,9 +213,15 @@
</template>
<script>
import { createOrderSzV2, uploadPointData } from '@/api/question';
import {
createOrderSzV2,
uploadPointData,
taiBaoUserInfo,
} from '@/api/question';
import { getBanner, getCardTypes } from '@/api/entitlement';
import DatePicker from './date-picker.vue';
import { isWeixin } from '@/utils/index';
let that;
export default {
components: { DatePicker },
......@@ -209,7 +231,7 @@ export default {
externalOrderNo: '',
picaWechat: window._picaWechat,
headerInfo: {
title: '惠民保癌筛权益领取',
title: '癌筛权益领取',
isBlack: true,
backMethod: 'web',
style: 'backgroundColor:#ffffff;zIndex:100;',
......@@ -237,6 +259,8 @@ export default {
staticINFO: {
logoUrlList: [],
},
// 太保项目用户信息
inherentUserInfo: null,
};
},
computed: {
......@@ -273,11 +297,25 @@ export default {
return rules;
},
},
created() {
if (!isWeixin()) {
this.$dialog
.alert({
type: 'warning',
title: '提示',
message: '请在微信中扫码打开!',
confirmButtonText: '我知道了',
})
.then(() => {
// on close
});
}
},
mounted() {
document.title = '癌筛权益领取';
document.title = this.headerInfo.title;
that = this;
const { externalOrderNo, projectEquityNo, channelCode } = this.$route.query;
if(channelCode) {
if (channelCode) {
this.uploadPointData(channelCode);
}
this.projectEquityNo = projectEquityNo;
......@@ -285,16 +323,60 @@ export default {
// this.$loading.show();
this.getBanner(7, projectEquityNo);
this.loadCardTypes();
if (
this.projectEquityNo === 'TB202309151004000001' &&
this.externalOrderNo
) {
this.getTaiBaoUserInfo();
}
this.$sendBuriedData({
action: 'ACTION_WEB_ENTER',
component_tag: '7802964#0#0#保险入口页面',
web_data:{projectEquityNo: projectEquityNo, externalOrderNo: externalOrderNo, channelCode: channelCode || ''},
web_data: {
projectEquityNo: projectEquityNo,
externalOrderNo: externalOrderNo,
channelCode: channelCode || '',
},
});
},
methods: {
getTaiBaoUserInfo() {
taiBaoUserInfo(this.externalOrderNo)
.then((res) => {
console.log('taibao userinfo', res);
if (!res?.data) return;
const { data } = res;
// const data = {
// mobilePhone: '17621344556',
// idCard: '411302199009092234',
// idType: 2 /** 默认为1:身份证 */,
// name: '乔先生',
// sex: 1,
// birthTime: '1990-09-09',
// };
this.inherentUserInfo = data;
data.mobilePhone && (this.dectionForm.mobilePhone = data.mobilePhone);
data.idCard && (this.dectionForm.idCard = data.idCard);
data.idType && (this.dectionForm.idType = data.idType);
data.name && (this.dectionForm.name = data.name);
data.sex && (this.dectionForm.sex = data.sex);
data.birthTime && (this.dectionForm.birthTime = data.birthTime);
})
.catch((err) => {
console.log(err);
});
},
isReadonly(fieldName) {
if (!this.inherentUserInfo) return false;
return (
this.inherentUserInfo[fieldName] !== null &&
this.inherentUserInfo[fieldName] !== ''
);
},
uploadPointData(channelCode) {
uploadPointData({channelCode});
uploadPointData({ channelCode });
},
async loadCardTypes() {
......@@ -338,7 +420,6 @@ export default {
versionNumber,
projectEquityNo,
lanZhouOldflag,
} = res.data;
if (lanZhouOldflag) {
const url = '/home';
......@@ -347,10 +428,14 @@ export default {
l +
`/pica-insurance${url}?projectEquityNo=${projectEquityNo}&externalOrderNo=${externalOrderNo}`;
window.location.href = hr;
}else if (statusCode == '0103' || versionNumber == 4) {
} else if (statusCode == '0103' || [4, 5].includes(versionNumber)) {
this.showProtocol = true;
this.openWebAppConfigPositive.path = `pagesInsurance/all-entrance/index?channelSource=insurance_channel&projectEquityNo=${projectEquityNo}&yunOrderNo=${yunOrderNo}&externalOrderNo=${externalOrderNo}`;
console.log('-this.openWebAppConfigPositive.path', versionNumber, this.openWebAppConfigPositive.path);
console.log(
'-this.openWebAppConfigPositive.path',
versionNumber,
this.openWebAppConfigPositive.path
);
} else {
this.$router.replace({
path: '/entitlement',
......@@ -428,7 +513,7 @@ export default {
}
/deep/ .van-field__control:disabled {
color: #323233;
-webkit-text-fill-color: #323233;
-webkit-text-fill-color: inherit;
}
.item {
color: #212121;
......@@ -469,10 +554,32 @@ export default {
}
}
.appoint-form-items {
.van-inner-field {
padding: 0;
}
/deep/ .van-field__label {
color: #212121;
width: auto;
}
&.field-readonly {
/deep/ .van-field__label {
color: #999999;
width: auto;
}
&::before {
color: #999999;
}
/deep/ .van-field__control {
&:disabled,
&:read-only {
color: #999999;
-webkit-text-fill-color: inherit;
.van-radio__label {
color: inherit;
}
}
}
}
}
.appoint-form-placeholder {
color: #999999;
......@@ -534,7 +641,6 @@ export default {
justify-content: center;
width: 242px;
margin: 0px auto;
}
/deep/.van-popup--center {
border-radius: 20px;
......@@ -569,17 +675,18 @@ export default {
margin-top: 10px;
background-color: #bee2fd;
}
.check-popup-wrapper{
.check-popup-wrapper {
width: 295px;
height: 227px;
position: fixed;
background: url("https://files.yunqueyi.com/image/png/common/20230830115339979.png") no-repeat center;
background: url('https://files.yunqueyi.com/image/png/common/20230830115339979.png')
no-repeat center;
background-size: 100% 100%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
.delete-icon{
.delete-icon {
// width: 25px;
// height: 25px;
position: absolute;
......@@ -588,15 +695,15 @@ export default {
top: -36px;
}
.title{
.title {
font-size: 18px;
font-weight: 800;
color: #3C877D;
color: #3c877d;
margin-top: 36px;
padding: 0 24px;
}
.content{
.content {
display: inline-block;
font-size: 16px;
color: #212121;
......@@ -604,11 +711,11 @@ export default {
padding: 0 24px;
}
.next-btn{
.next-btn {
width: 247px;
height: 39px;
margin: 0 auto;
background: #00BDA5;
background: #00bda5;
border-radius: 23px;
color: #fff;
font-size: 18px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册