提交 99cf5ff8 编写于 作者: 张敬贤's avatar 张敬贤

Merge branch 'feature/zjx' into 'develop'

Feature/zjx

See merge request !34
...@@ -4,8 +4,8 @@ import '@/router'; ...@@ -4,8 +4,8 @@ import '@/router';
console.log('router, store, vueApp: ', router, store, vueApp); console.log('router, store, vueApp: ', router, store, vueApp);
import '@/assets/js/flexible'; import '@/assets/js/flexible';
import {isWeixin } from './utils/index'; import {isWeixin } from './utils/index';
import {PicaArea} from 'pica-area'; import Loading from '@/components/loading/loading.js';
console.log('PicaArea', PicaArea);
// 禁用双指放大 // 禁用双指放大
var lastTouchEnd = 0; var lastTouchEnd = 0;
document.addEventListener('touchstart', function (event) { document.addEventListener('touchstart', function (event) {
...@@ -56,7 +56,7 @@ if(dd.env.version) { ...@@ -56,7 +56,7 @@ if(dd.env.version) {
sessionStorage.setItem('headerHeight', 0); sessionStorage.setItem('headerHeight', 0);
window.Vue.use(PicaArea); window.Vue.use(Loading);
// 设置安全密钥 // 设置安全密钥
window._AMapSecurityConfig = { window._AMapSecurityConfig = {
securityJsCode: '5dfc1ae6a14ad5c005ffb2ad6d718ae4' securityJsCode: '5dfc1ae6a14ad5c005ffb2ad6d718ae4'
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
<van-field <van-field
v-model="dectionForm.beneficiaryName" v-model="dectionForm.beneficiaryName"
label="受检人" label="受检人"
:disabled="isDisabled"
class="appoint-form-items" class="appoint-form-items"
placeholder="请输入受检人姓名" placeholder="请输入受检人姓名"
:rules="[{ required: true, message: '请输入受检人姓名' },{ :rules="[{ required: true, message: '请输入受检人姓名' },{
...@@ -45,6 +46,7 @@ ...@@ -45,6 +46,7 @@
<van-field <van-field
v-model="dectionForm.beneficiaryPhone" v-model="dectionForm.beneficiaryPhone"
class="appoint-form-items" class="appoint-form-items"
:disabled="isDisabled"
label="手机号" label="手机号"
placeholder="请输入受检人手机号" placeholder="请输入受检人手机号"
:rules="[{ required: true, message: '请输入受检人手机号' }, :rules="[{ required: true, message: '请输入受检人手机号' },
...@@ -55,6 +57,7 @@ ...@@ -55,6 +57,7 @@
/> />
<van-field <van-field
v-model="dectionForm.beneficiaryIdNum" v-model="dectionForm.beneficiaryIdNum"
:disabled="isDisabled"
class="appoint-form-items" class="appoint-form-items"
label="身份证号" label="身份证号"
placeholder="请输入受检人真实身份证号" placeholder="请输入受检人真实身份证号"
...@@ -259,6 +262,7 @@ export default { ...@@ -259,6 +262,7 @@ export default {
projectEquityNo: '', projectEquityNo: '',
yunOrderNo: '', yunOrderNo: '',
externalData: {}, externalData: {},
isDisabled:false,
}; };
}, },
computed: { computed: {
...@@ -284,6 +288,7 @@ export default { ...@@ -284,6 +288,7 @@ export default {
); );
}, },
}, },
mounted() { mounted() {
...@@ -393,6 +398,7 @@ export default { ...@@ -393,6 +398,7 @@ export default {
this.dectionForm.beneficiaryName = res.data.beneficiaryName; this.dectionForm.beneficiaryName = res.data.beneficiaryName;
this.dectionForm.beneficiaryPhone = res.data.beneficiaryPhone; this.dectionForm.beneficiaryPhone = res.data.beneficiaryPhone;
this.dectionForm.beneficiaryIdNum = res.data.beneficiaryIdNum; this.dectionForm.beneficiaryIdNum = res.data.beneficiaryIdNum;
this.isDisabled = (this.dectionForm.beneficiaryName != '' && this.dectionForm.beneficiaryPhone != '' && this.dectionForm.beneficiaryIdNum != '') && (this.dectionForm.beneficiaryName && this.dectionForm.beneficiaryPhone && this.dectionForm.beneficiaryIdNum );
this.$store.dispatch('home/setOrderInfo', res.data); this.$store.dispatch('home/setOrderInfo', res.data);
}); });
......
...@@ -8,44 +8,42 @@ import {getDetectionName} from '@/api/appoint'; ...@@ -8,44 +8,42 @@ import {getDetectionName} from '@/api/appoint';
export default { export default {
data() { data() {
return { return {
// 无问卷-0001 有问卷未填写-0101 已填写问卷未出结果-0102 已出结果无需领用-0401 已出结果未预约-0201 已预约未采样-0301 已预约已采样-0302 // STATUS_CODE_0101("0101", "未填写问卷"),
// // 0102 已填写问卷 // STATUS_CODE_0102("0102", "已填写问卷"),
// // 0201 待预约 // STATUS_CODE_0201("0201", "待预约"),
// // 0202 已预约 // STATUS_CODE_0202("0202", "已预约"),
// // 0203 已取消待重新预约(暂时无用) // STATUS_CODE_0203("0203", "已取消待重新预约"),
// // 0301 待采样 (暂时无用) // STATUS_CODE_0301("0301", "待采样"),
// // 0302 已采样 // STATUS_CODE_0302("0302", "已采样"),
// // 0303 待重新采样 // STATUS_CODE_0303("0303", "待重新采样"),
// // 0901 已结束 // STATUS_CODE_0901("0901", "已出报告"),
// // 0902 已出报告 // STATUS_CODE_0902("0902", "已结束")
// // 变化如下:
// // 原来的 已出报告状态从0304变更为0901, 原来的已结束状态0401变更为0902
routerMap:{ routerMap:{
// '0001': '/appoint', '0001': '/appoint',
// '0101': null, '0101': null,
'0102': '/insuranceQuestionBack', '0102': '/insuranceQuestionBack',
// '0401': '/insuranceQuestionResult', // '0401': '/insuranceQuestionResult',
'0201': '/appoint', '0201': '/appoint',
'0202': '/appoint-details', '0202': '/appoint-details',
// '0203': '/appoint-details', '0203': '/appoint-details',
'0302': '/insuranceDetectionDetail', '0302': '/insuranceDetectionDetail',
'0303': '/insuranceBindCode', '0303': '/insuranceBindCode',
'0901': '/insuranceQuestionResult', '0901': '/insuranceQuestionResult',
// '0902': '/insuranceBindCode', '0902': '/insuranceQuestionResult',
}, },
dectionData: {}, dectionData: {},
projectEquityNo: '', projectEquityNo: '',
orderNo: '', externalOrderNo: '',
query:{} query:{}
}; };
}, },
mounted() { mounted() {
const { projectEquityNo, orderNo } = this.$route.query; const { projectEquityNo, externalOrderNo } = this.$route.query;
this.query = this.$route.query; this.query = this.$route.query;
this.projectEquityNo = projectEquityNo; this.projectEquityNo = projectEquityNo;
this.orderNo = orderNo; this.externalOrderNo = externalOrderNo;
this.getJumpPageStatus(); this.getJumpPageStatus();
}, },
methods: { methods: {
...@@ -65,8 +63,9 @@ export default { ...@@ -65,8 +63,9 @@ export default {
// 获取跳转状态 // 获取跳转状态
getJumpPageStatus() { getJumpPageStatus() {
const data = { const data = {
orderNo: this.orderNo, externalOrderNo: this.externalOrderNo,
projectEquityNo:this.projectEquityNo projectEquityNo: this.projectEquityNo
}; };
getJumpPageStatus(data).then(res => { getJumpPageStatus(data).then(res => {
if (res.code == '000000') { if (res.code == '000000') {
...@@ -85,34 +84,29 @@ export default { ...@@ -85,34 +84,29 @@ export default {
this.status = res.data.status; this.status = res.data.status;
this.getDetectionName(this.yunOrderNo); this.getDetectionName(this.yunOrderNo);
switch (res.data.status) { switch (res.data.status) {
case '0001': case '0101':
this.turnToPage(this.routerMap[ this.status], this.query); window.location.href = res.data.questionnaireUrl;
break; break;
case '0101': case '0001':
// this.turnToPage(this.routerMap[ this.status], this.query); case '0102':
// 跳转到问卷页面 case '0401':
window.location.href = res.data.questionnaireUrl; case '0201':
break; case '0202':
case '0102': case '0303':
// 跳转到结果页面; case '0902':
this.turnToPage(this.routerMap[this.status], this.query); this.turnToPage(this.routerMap[this.status], this.query);
break; break;
case '0401': case '0901':
this.query.needDetect = 1; this.query.needDetect = 1;
this.turnToPage(this.routerMap[this.status], this.query); this.turnToPage(this.routerMap[this.status], this.query);
break; break;
case '0201': case '0302':
this.turnToPage(this.routerMap[this.status], this.query); this.query.detectionRecordId = res.data.detectionRecordId;
break; this.turnToPage(this.routerMap[this.status], this.query);
case '0301': break;
this.turnToPage(this.routerMap[this.status], this.query); default:
break; break;
case '0302': }
this.turnToPage(this.routerMap[this.status], this.query);
break;
default:
break;
}
}, },
createOrder(data) { createOrder(data) {
createOrder(data).then(res => { createOrder(data).then(res => {
......
...@@ -82,16 +82,6 @@ export default { ...@@ -82,16 +82,6 @@ export default {
projectEquityNo: '', projectEquityNo: '',
orderNo: '', orderNo: '',
yunOrderNo:'', yunOrderNo:'',
// 无问卷-0001 有问卷未填写-0101 已填写问卷未出结果-0102 已出结果无需领用-0401 已出结果未预约-0201 已预约未采样-0301 已预约已采样-0302
routerMap: {
'0001': null,
'0101': null,
'0102': null,
'0401': null,
'0201': '/appoint',
'0301': null,
'0302': null,
},
status:null, status:null,
query: {}, query: {},
buttonStatus:false buttonStatus:false
...@@ -102,6 +92,7 @@ export default { ...@@ -102,6 +92,7 @@ export default {
console.log(11223); console.log(11223);
const { query } = this.$route; const { query } = this.$route;
this.query = query; this.query = query;
this.needDetect = query.needDetect === 1;
this.getButtonStatus(query.yunOrderNo); this.getButtonStatus(query.yunOrderNo);
}, },
methods: { methods: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册