已报到补充报到详情按钮

main
xuechunyuan 3 years ago
parent d6e6124b75
commit ed51425a9c
  1. 40
      src/views/booklist/index.vue
  2. 4
      vue.config.js

@ -22,10 +22,12 @@
<template slot-scope="{row}" slot="menu"> <template slot-scope="{row}" slot="menu">
<el-button type="text" @click="handleRegister(row)" <el-button type="text" @click="handleRegister(row)"
:disabled="(row.details.find(item => item.apmStatus == 2) && Date.parse(new Date(row.apmDay.substring(0, 10) + ' 23:59:59')) > Date.parse(new Date(systemTime))) ? false : true">预约报道</el-button> :disabled="(row.details.find(item => item.apmStatus == 2) && Date.parse(new Date(row.apmDay.substring(0, 10) + ' 23:59:59')) > Date.parse(new Date(systemTime))) ? false : true">预约报道</el-button>
<el-button v-if="calcStatus(row)" type="text" @click="queryBookDetail(row)">报道详情</el-button>
</template> </template>
</avue-crud> </avue-crud>
<el-drawer :wrapperClosable="false" :visible.sync="isRegister" :append-to-body="true" :direction="direction" class="my-info-dialog" <el-drawer :wrapperClosable="false" :visible.sync="isRegister" :append-to-body="true" :direction="direction"
custom-class="register_box" @close="closeDraw"> class="my-info-dialog" custom-class="register_box" @close="closeDraw">
<div slot="title" class="title_box"> <div slot="title" class="title_box">
<div class="title_txt"> <div class="title_txt">
<div class="txt">预约人报道信息</div> <div class="txt">预约人报道信息</div>
@ -79,14 +81,15 @@
<div class="acc_box"> <div class="acc_box">
<div class="acc_text">预约时间</div> <div class="acc_text">预约时间</div>
<div class="acc_txt" v-for="item in regData.resData ? regData.resData.details : []" :key="item"> <div class="acc_txt" v-for="item in regData.resData ? regData.resData.details : []" :key="item">
{{ regData.resData ? regData.resData.apmDay.substring(0, 10) : '' }} {{ item.period }}{{ item.timeFrame }} {{ regData.resData ? regData.resData.apmDay.substring(0, 10) : '' }} {{ item.period }}{{ item.timeFrame
}}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="btn" v-print="printObj" v-show="regData.resStatus == 1"> <div class="btn" v-print="printObj" v-show="regData.resStatus == 1">
签到并打印 打印
</div> </div>
<!-- <div class="btn" v-print="printObj"> <!-- <div class="btn" v-print="printObj">
签到并打印 签到并打印
@ -501,22 +504,39 @@ export default {
this.option.column.find(item => item.label == '身份证号码').searchValue = number this.option.column.find(item => item.label == '身份证号码').searchValue = number
}, },
handleRegister(row) { handleRegister(row) {
// console.log('13',row) console.log('13', row);
this.$confirm(`确认体检人【${row.cupName}】【${row.cupCardNo}】已报到吗?`, {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
let ids = [] let ids = []
row.details.map(item => { row.details.map(item => {
ids.push(item.id) ids.push(item.id)
}) })
let val = ids.join(','); let val = ids.join(',');
getStatus(val).then(res => { getStatus(val).then(res => {
res.data.data.resData.cupCardNo = res.data.data.resData.cupCardNo.length > 18 ? Base64.decode(res.data.data.resData.cupCardNo) : res.data.data.resData.cupCardNo; res.data.data.resData.cupCardNo = Base64.decode(res.data.data.resData.cupCardNo);
res.data.data.resData.cupName = res.data.data.resData.cupName.length > 7 ? Base64.decode(res.data.data.resData.cupName) : res.data.data.resData.cupName; res.data.data.resData.cupName = Base64.decode(res.data.data.resData.cupName);
res.data.data.resData.cupPhone = res.data.data.resData.cupPhone.length > 11 ? Base64.decode(res.data.data.resData.cupPhone) : res.data.data.resData.cupPhone; res.data.data.resData.cupPhone = Base64.decode(res.data.data.resData.cupPhone);
// console.log('12',res.data); // console.log('12',res.data);
this.regData = res.data.data; this.regData = res.data.data;
this.isRegister = true this.isRegister = true
}) })
});
}, },
//
calcStatus(row) {
let arr = row.details.find(item => item.apmStatus == 3);
return arr == undefined ? false : true;
},
//
queryBookDetail(row) {
this.regData = {resData: row,resStatus: 1};
this.isRegister = true
},
beforeOpen(done, type) { beforeOpen(done, type) {
done(); done();
}, },
@ -586,9 +606,7 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>
<style lang="scss"> <style lang="scss">
.el-drawer__wrapper { .el-drawer__wrapper {
.register_box { .register_box {

@ -27,8 +27,8 @@ module.exports = {
"/api": { "/api": {
//本地服务接口地址 //本地服务接口地址
// target: "http://www.qdscgs.com:80",//生成 // target: "http://www.qdscgs.com:80",//生成
target: "http://192.168.1.3:8080", // target: "http://192.168.1.3:8080",
// target: "http://192.168.1.106", target: "http://192.168.1.106",
//远程演示服务地址,可用于直接启动项目 //远程演示服务地址,可用于直接启动项目
// target: 'https://saber.bladex.vip/api', // target: 'https://saber.bladex.vip/api',
ws: true, ws: true,

Loading…
Cancel
Save