|
|
|
|
@ -14,18 +14,20 @@ |
|
|
|
|
<div v-for="item1 in row.details.map(item => item.apmStatus)" :key="item1"> |
|
|
|
|
<el-tag size="small" :type="item1 == 3 ? 'success' : item1 == 2 ? 'warning' : item1 == 3 ? 'danger' : 'info'"> |
|
|
|
|
{{ |
|
|
|
|
item1 == 3 ? '已报道' : item1 == 2 ? '未报道' : item1 == 1 ? '已取消' : '未报到' |
|
|
|
|
item1 == 3 ? '已报道' : item1 == 2 ? '未报道' : item1 == 1 ? '已取消' : '未报到' |
|
|
|
|
}} |
|
|
|
|
</el-tag> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{row}" slot="menu"> |
|
|
|
|
<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> |
|
|
|
|
</avue-crud> |
|
|
|
|
<el-drawer :wrapperClosable="false" :visible.sync="isRegister" :append-to-body="true" :direction="direction" class="my-info-dialog" |
|
|
|
|
custom-class="register_box" @close="closeDraw"> |
|
|
|
|
<el-drawer :wrapperClosable="false" :visible.sync="isRegister" :append-to-body="true" :direction="direction" |
|
|
|
|
class="my-info-dialog" custom-class="register_box" @close="closeDraw"> |
|
|
|
|
<div slot="title" class="title_box"> |
|
|
|
|
<div class="title_txt"> |
|
|
|
|
<div class="txt">预约人报道信息</div> |
|
|
|
|
@ -79,14 +81,15 @@ |
|
|
|
|
<div class="acc_box"> |
|
|
|
|
<div class="acc_text">预约时间</div> |
|
|
|
|
<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 class="btn" v-print="printObj" v-show="regData.resStatus == 1"> |
|
|
|
|
签到并打印 |
|
|
|
|
打印 |
|
|
|
|
</div> |
|
|
|
|
<!-- <div class="btn" v-print="printObj"> |
|
|
|
|
签到并打印 |
|
|
|
|
@ -167,17 +170,17 @@ |
|
|
|
|
}}</td> |
|
|
|
|
<td style="width:20px;text-align:center;">{{ |
|
|
|
|
regData.resData.cupCardNo && regData.resData.cupCardNo.length > |
|
|
|
|
15 ? regData.resData.cupCardNo.charAt(15) : '' |
|
|
|
|
15 ? regData.resData.cupCardNo.charAt(15) : '' |
|
|
|
|
}} |
|
|
|
|
</td> |
|
|
|
|
<td style="width:20px;text-align:center;">{{ |
|
|
|
|
regData.resData.cupCardNo && regData.resData.cupCardNo.length > |
|
|
|
|
15 ? regData.resData.cupCardNo.charAt(16) : '' |
|
|
|
|
15 ? regData.resData.cupCardNo.charAt(16) : '' |
|
|
|
|
}} |
|
|
|
|
</td> |
|
|
|
|
<td style="width:20px;text-align:center;">{{ |
|
|
|
|
regData.resData.cupCardNo && regData.resData.cupCardNo.length > |
|
|
|
|
15 ? regData.resData.cupCardNo.charAt(17) : '' |
|
|
|
|
15 ? regData.resData.cupCardNo.charAt(17) : '' |
|
|
|
|
}} |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
@ -361,7 +364,7 @@ import { mapGetters } from "vuex"; |
|
|
|
|
import print from "vue-print-nb"; |
|
|
|
|
import { calcSex } from "../../util/util"; |
|
|
|
|
import { dateFormat } from "../../util/date"; |
|
|
|
|
import {Base64} from 'js-base64'; |
|
|
|
|
import { Base64 } from 'js-base64'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
data() { |
|
|
|
|
@ -412,8 +415,8 @@ export default { |
|
|
|
|
type: "select", |
|
|
|
|
hide: true, |
|
|
|
|
search: true, |
|
|
|
|
viewDisplay:false, |
|
|
|
|
dicUrl:'/api/blade-system/dict-biz/get-hc-project', |
|
|
|
|
viewDisplay: false, |
|
|
|
|
dicUrl: '/api/blade-system/dict-biz/get-hc-project', |
|
|
|
|
props: { |
|
|
|
|
label: 'dictValue', |
|
|
|
|
value: 'dictValue' |
|
|
|
|
@ -431,7 +434,7 @@ export default { |
|
|
|
|
valueFormat: "yyyy-MM-dd", |
|
|
|
|
search: true, |
|
|
|
|
hide: true, |
|
|
|
|
searchValue: dateFormat(new Date(),'yyyy-MM-dd'), |
|
|
|
|
searchValue: dateFormat(new Date(), 'yyyy-MM-dd'), |
|
|
|
|
searchClearable: false, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
@ -501,30 +504,47 @@ export default { |
|
|
|
|
this.option.column.find(item => item.label == '身份证号码').searchValue = number |
|
|
|
|
}, |
|
|
|
|
handleRegister(row) { |
|
|
|
|
// console.log('13',row) |
|
|
|
|
let ids = [] |
|
|
|
|
row.details.map(item => { |
|
|
|
|
ids.push(item.id) |
|
|
|
|
}) |
|
|
|
|
let val = ids.join(','); |
|
|
|
|
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.cupName = res.data.data.resData.cupName.length > 7 ? Base64.decode(res.data.data.resData.cupName) : 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; |
|
|
|
|
// console.log('12',res.data); |
|
|
|
|
this.regData = res.data.data; |
|
|
|
|
this.isRegister = true |
|
|
|
|
console.log('13', row); |
|
|
|
|
this.$confirm(`确认体检人【${row.cupName}】【${row.cupCardNo}】已报到吗?`, { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning" |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
let ids = [] |
|
|
|
|
row.details.map(item => { |
|
|
|
|
ids.push(item.id) |
|
|
|
|
}) |
|
|
|
|
let val = ids.join(','); |
|
|
|
|
getStatus(val).then(res => { |
|
|
|
|
res.data.data.resData.cupCardNo = Base64.decode(res.data.data.resData.cupCardNo); |
|
|
|
|
res.data.data.resData.cupName = Base64.decode(res.data.data.resData.cupName); |
|
|
|
|
res.data.data.resData.cupPhone = Base64.decode(res.data.data.resData.cupPhone); |
|
|
|
|
// console.log('12',res.data); |
|
|
|
|
this.regData = res.data.data; |
|
|
|
|
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) { |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
beforeClose(done) { |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
searchReset(params,done) { |
|
|
|
|
params.releaseTimeRange = dateFormat(new Date(),'yyyy-MM-dd'); |
|
|
|
|
searchReset(params, done) { |
|
|
|
|
params.releaseTimeRange = dateFormat(new Date(), 'yyyy-MM-dd'); |
|
|
|
|
this.query = params; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
@ -563,8 +583,8 @@ export default { |
|
|
|
|
endTime: releaseTimeRange, |
|
|
|
|
}; |
|
|
|
|
} else { |
|
|
|
|
values.startTime = dateFormat(new Date(),'yyyy-MM-dd'); |
|
|
|
|
values.endTime = dateFormat(new Date(),'yyyy-MM-dd'); |
|
|
|
|
values.startTime = dateFormat(new Date(), 'yyyy-MM-dd'); |
|
|
|
|
values.endTime = dateFormat(new Date(), 'yyyy-MM-dd'); |
|
|
|
|
} |
|
|
|
|
values.createDept = this.userInfo.dept_id; |
|
|
|
|
values.cupCardNo = cupCardNo ? Base64.encode(cupCardNo) : ''; |
|
|
|
|
@ -586,9 +606,7 @@ export default { |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
|
<style lang="scss" scoped></style> |
|
|
|
|
<style lang="scss"> |
|
|
|
|
.el-drawer__wrapper { |
|
|
|
|
.register_box { |
|
|
|
|
|