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

Merge branch 'feature/zjx' into 'develop'

Feature/zjx

See merge request !165
......@@ -65,3 +65,13 @@ export const getCheckInUserInfo = async(data) => {
withCredentials: true,
});
};
// /tis/insurance / save / order / detection / result
export const saveOrder = async(data) => {
return request({
method: 'post',
data,
url: '/tis/insurance/save/order/detection/result',
withCredentials: true,
});
};
......@@ -212,6 +212,8 @@
</template>
<script>
import { getQuickDetectionDetailProces, detectionRecordInfo } from '@/api/detection';
import { saveOrder } from '@/api/appoint';
import {createOrder} from '@/api/question';
// 0待完善信息、1待采样、2已采样、21已送检、22快递已签收、 25实验室已收样、 27已上机、 3已完成、5样本失效、 6待支付
export default {
filters: {
......@@ -262,7 +264,8 @@ export default {
dataList: [],
openWebAppBtnName: '提交检测结果',
yunOrderNo: '',
imageslist:[]
imageslist: [],
projectEquityNo:''
};
},
created() {
......@@ -317,13 +320,49 @@ export default {
});
},
getJumpToWebapp() {
this.saveOrder();
},
saveOrder() {
const { yunOrderNo, externalOrderNo} = this.$route.query;
const data = {};
if (this.result) {
// const data = {
// yunOrderNo,
// resultFlag:this.result
// };
data.yunOrderNo = yunOrderNo;
data.resultFlag = this.result;
} else {
this.$toast('请选择结果');
}
saveOrder(data).then(res => {
console.log(res);
this.projectEquityNo = res.data.projectEquityNo;
const item = JSON.parse(localStorage.getItem('chooseInfo'));
const data = {
hospitalId: 139136,
idType:1,
hospitalName:'人民医院和平社区健康服务中心',
yunOrderNoOne:yunOrderNo,
idCard: item.idCard,
externalOrderNo,
projectEquityNo:this.projectEquityNo,
mobilePhone: item.phoneNum,
patientName: item.name
};
createOrder(data).then(res => {
console.log(res);
if (res.code === '000000' && res.data.questionnaireUrl) {
window.location.href = res.data.questionnaireUrl;
}
});
});
},
showSample(index) {
this.showImg = true;
this.index = 1;
if (index === 1) {
this.imageslist = this.resultImages;
} else {
this.imageslist = this.sampleImages;
}
......
......@@ -108,6 +108,8 @@ export default {
const externalOrderNo = Math.floor(new Date().getTime() / 1000);
const projectEquityNo = 'SZ202305031000597601';
console.log(externalOrderNo);
const item = this.userinfo.filter(ele => ele.name === this.person)[0];
localStorage.setItem('chooseInfo', JSON.stringify(item));
this.$router.push({
path: '/appoint-demo',
query: {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册