回访打印

master
xy 1 year ago
parent 05ae7cc99b
commit 0ddf6e21fd

@ -0,0 +1,34 @@
import request from "@/utils/request";
export function getList(params,isLoading=true){
return request({
method:'get',
url:'/api/admin/long-insurance/get-list',
params,
isLoading
})
}
export function getForm(id,params){
return request({
method:'get',
url:`/api/admin/long-insurance/get-form/${id}`,
params
})
}
export function save(data){
return request({
method:'post',
url:'/api/admin/long-insurance/save',
data
})
}
export function destroy(id,data){
return request({
method:'post',
url:`/api/admin/long-insurance/delete/${id}`,
data
})
}

@ -12,6 +12,7 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/login'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
console.log(from.path,to.path)
// start progress bar
NProgress.start()

@ -92,46 +92,57 @@
</div>
</div>
</template>
<!-- <template #extraFormBottom>-->
<!-- <div class="xy-table-item">-->
<!-- <div class="xy-table-item-label">文件 </div>-->
<!-- <div class="xy-table-item-content">-->
<!-- <el-upload-->
<!-- style="width: 300px"-->
<!-- ref="upload"-->
<!-- multiple-->
<!-- :on-success="-->
<!-- (response, file, fileList) =>-->
<!-- successHandle(response, file, fileList, 'file')-->
<!-- "-->
<!-- :before-upload="uploadBefore"-->
<!-- accept=".rar,.zip,.doc,.docx,.pdf,.jpg,.png,.gif,.mp4,.xls,.xlsx"-->
<!-- :action="action"-->
<!-- :file-list="file"-->
<!-- :auto-upload="false"-->
<!-- :on-remove="-->
<!-- (file, fileList) => removeHande(file, fileList, 'file')-->
<!-- "-->
<!-- >-->
<!-- <el-button slot="trigger" size="small" type="primary"-->
<!-- >选取文件</el-button-->
<!-- >-->
<!-- <el-button-->
<!-- style="margin-left: 10px"-->
<!-- size="small"-->
<!-- type="success"-->
<!-- @click="$refs['upload'].submit()"-->
<!-- >开始上传</el-button-->
<!-- >-->
<!-- <div slot="tip" class="el-upload__tip">-->
<!-- 支持文件格式.rar .zip .doc .docx .pdf .jpg .png .gif .mp4 .xls-->
<!-- .xlsx-->
<!-- <br />单个文件不能超过20M-->
<!-- </div>-->
<!-- </el-upload>-->
<!-- </div>-->
<!-- </div>-->
<!-- </template>-->
<template #extraFormBottom>
<div class="xy-table-item">
<div class="xy-table-item-label">文件 </div>
<div class="xy-table-item-content">
<el-upload
style="width: 300px"
ref="upload"
multiple
:on-success="
(response, file, fileList) =>
successHandle(response, file, fileList, 'file')
"
:before-upload="uploadBefore"
accept=".rar,.zip,.doc,.docx,.pdf,.jpg,.png,.gif,.mp4,.xls,.xlsx"
:action="action"
:file-list="file"
:auto-upload="false"
:on-remove="
(file, fileList) => removeHande(file, fileList, 'file')
"
>
<el-button slot="trigger" size="small" type="primary"
>选取文件</el-button
>
<el-button
style="margin-left: 10px"
size="small"
type="success"
@click="$refs['upload'].submit()"
>开始上传</el-button
>
<div slot="tip" class="el-upload__tip">
支持文件格式.rar .zip .doc .docx .pdf .jpg .png .gif .mp4 .xls
.xlsx
<br />单个文件不能超过20M
</div>
</el-upload>
</div>
</div>
<div class="xy-table-item">
<div class="xy-table-item-label">文件地址 </div>
<div class="xy-table-item-content" style="width: 300px">
<div v-for="item in file">
<Tag color="success">{{ item.response ? item.response.original_name : '' }}</Tag>
<el-link @click="copyText(item.response ? item.response.url : '')">{{ item.response ? item.response.url : '' }}</el-link>
</div>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
@ -226,6 +237,22 @@ export default {
// }
},
copyText (text) {
const input = document.createElement("input");
input.setAttribute("readonly", "readonly"); // , ios
input.value = text;
document.body.appendChild(input);
input.setSelectionRange(0, 9999); // ios
input.select();
document.execCommand("copy");
document.body.removeChild(input);
this.$message({
type: "success",
message: `已复制:${input.value}`,
});
},
async getDetail() {
const res = await detail(this.id);
this.$integrateData(this.form, res);

@ -0,0 +1,195 @@
<template>
<div>
<Modal v-model="isShow" width="700" title="长护险回访">
<button @click="exportPrint">123</button>
<table id="print-table">
<thead style="border: none;">
<tr>
<th colspan="6">四世同堂长护险居家服务满意度调查表</th>
<!-- <th class="border-none" style="width: calc(100% / 6)"></th>-->
<!-- <th class="border-none" style="width: calc(100% / 6)"></th>-->
<!-- <th class="border-none" style="width: calc(100% / 6)"></th>-->
<!-- <th class="border-none" style="width: calc(100% / 6)"></th>-->
<!-- <th class="border-none" style="width: calc(100% / 6)"></th>-->
<!-- <th class="border-none" style="width: calc(100% / 6)"></th>-->
</tr>
</thead>
<tbody>
<tr>
<td colspan="2">服务对象名称{{ detail.customer ? detail.customer.name : '' }}</td>
<td colspan="4">服务人员</td>
</tr>
<tr>
<td colspan="6">服务对象住址{{ detail.customer ? detail.customer.idcard_address : '' }}</td>
</tr>
<tr>
<td rowspan="12" colspan="1" style="writing-mode: vertical-rl">调查内容记录</td>
<td colspan="5">1.服务满意度90分以上{{ detail.satisfy === 1 ? '✓' : '' }} 80-90{{ detail.satisfy === 2 ? '✓' : '' }} 80分以下{{ detail.satisfy === 3 ? '✓' : '' }}</td>
</tr>
<tr>
<td colspan="5" class="border-bottom-none">护理员护理情况调查护理中回访{{ detail.nurse_investigate === 1 ? '✓' : '' }} 日常回访{{ detail.nurse_investigate === 2 ? '✓' : '' }}</td>
</tr>
<tr>
<td colspan="5" class="border-bottom-none">2.在岗{{ detail.is_work === 1 ? '✓' : '' }} 不在岗{{ detail.is_work === 0 ? '✓' : '' }}</td>
</tr>
<tr>
<td colspan="5" class="border-bottom-none">3.按照排班时间上门服务{{ detail.is_on_time === 1 ? '✓' : '' }} {{ detail.is_on_time === 0 ? '✓' : '' }}</td>
</tr>
<tr>
<td colspan="5" class="border-bottom-none">4.护理工具携带护理包 服务计划表</td>
</tr>
<tr>
<td colspan="5" class="border-bottom-none">血压器 理发器 其他</td>
</tr>
<tr>
<td colspan="5" class="border-bottom-none">5.工作服 工作证</td>
</tr>
<tr>
<td colspan="5" class="border-bottom-none">6.服务内容理发 整理 康复训练</td>
</tr>
<tr>
<td colspan="5" class="border-bottom-none">洗澡 按摩 个人卫生清洁</td>
</tr>
<tr>
<td colspan="5" class="border-bottom-none">协助指导 生活照料 其他</td>
</tr>
<tr>
<td colspan="5">7.其他需求陪诊 康养 陪护其他</td>
</tr>
<tr>
<td colspan="5">8.建议{{ detail.tip }}</td>
</tr>
<tr>
<td>服务对象/家属签字</td>
<td colspan="5">
<img style="height: 60px;object-fit: contain;transform: rotate(270deg)" :src="detail.sign_image ? detail.sign_image.url : ''" alt="">
</td>
</tr>
<tr>
<td>调查人员签字</td>
<td colspan="5">
<img style="height: 60px;object-fit: contain;transform: rotate(270deg)" :src="detail.admin_sign_image ? detail.admin_sign_image.url : ''" alt="">
</td>
</tr>
<tr>
<td>调查日期</td>
<td colspan="5">{{ $moment(detail.created_at).format('YYYY年MM月DD日') }}</td>
</tr>
</tbody>
</table>
</Modal>
</div>
</template>
<script>
import { getForm } from "@/api/longInsurance"
export default {
data() {
return {
isShow: false,
id: "",
detail: {}
}
},
methods: {
show() {
this.isShow = true
},
hide() {
this.isShow = false
},
setId(id) {
this.id = id
},
async getDetail() {
const res = await getForm(this.id)
console.log(res)
this.detail = res
},
exportPrint() {
let table = document.getElementById('print-table').outerHTML;
let printWindow = window.open('', '_blank');
printWindow.document.write('<html><head><title>打印表格</title>');
printWindow.document.write(`</head><style>
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
thead {
background-color: #f2f2f2;
}
th {
word-break: keep-all;
text-align: center;
height: 40px;
}
.border-none {
border: none;
}
.border-bottom-none {
border-top: none;
border-bottom: none;
}</style><body>`);
printWindow.document.write(table);
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(() => {
printWindow.print();
},1000)
}
},
computed: {},
watch: {
isShow(newVal) {
if (newVal) {
this.getDetail()
}
}
}
}
</script>
<style scoped lang="scss">
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
thead {
background-color: #f2f2f2;
}
th {
word-break: keep-all;
text-align: center;
height: 40px;
}
.border-none {
border: none;
}
.border-bottom-none {
border-top: none;
border-bottom: none;
}
</style>

@ -204,6 +204,7 @@
@refresh="getCustomers"
></add-customer>
<imports ref="imports" @refresh="getCustomers"></imports>
<longInsuranceDetail ref="longInsuranceDetail"></longInsuranceDetail>
</div>
</template>
@ -218,12 +219,14 @@ import { getAuthAreas, getAuthTypes } from "@/utils/auth";
import addCustomer from "@/views/customer/component/addCustomer";
import addOrder from "./component/addOrder";
import imports from "./component/imports.vue"
import imports from "./component/imports.vue";
import longInsuranceDetail from './component/longInsuranceDetail.vue'
export default {
components: {
addCustomer,
addOrder,
imports
imports,
longInsuranceDetail
},
data() {
return {
@ -393,6 +396,147 @@ export default {
);
},
},
{
prop: "long_insurances",
width: 140,
label: "长护险回访数",
customFn: row => {
return (
<el-popover
placement="top-start"
title="已回访"
width="650"
trigger="hover">
<div class="sku-item" slot="reference" style="cursor: pointer;width: 80px;margin: auto;">
<div class="sku-item__name">
已回访
</div>
<div class="sku-item__time">
{row.long_insurances?.length ?? 0}
</div>
</div>
<Table slot="default"
size="small"
columns={[
{
key: 'created_at',
title: '回访日期',
align: 'center',
width: 160
},
{
key: 'satisfy',
title: '服务满意度',
width: 180,
align: 'center',
render: (h, {row}) => {
let arr = [
{
label: "90分以上",
value: 1
},
{
label: "80-90分",
value: 2
},
{
label: "80分以下",
value: 3
},
]
return h('span', arr.find(i => i.value === row.satisfy)?.label)
}
},
{
key: 'nurse_investigate',
title: '护理员护理情况调查',
width: 180,
render: (h, {row}) => {
let arr = [
{
label: "护理中回访",
value: 1
},
{
label: "日常回访",
value: 2
},
]
return h('span', arr.find(i => i.value === row.nurse_investigate)?.label)
}
},
{
key: 'is_work',
title: '是否在岗',
width: 120,
align: 'center',
render: (h, {row}) => {
return h('span', row.is_work ? '是' : '否')
}
},
{
key: 'is_on_time',
title: '按照排班时间上门服务',
width: 120,
align: 'center',
render: (h, {row}) => {
return h('span', row.is_on_time ? '是' : '否')
}
},
{
key: 'accessory',
title: '是否有工作证、工作服',
width: 160,
align: 'center',
},
{
key: 'tools',
title: '护理工具携带',
width: 180
},
{
key: 'serve',
title: '服务内容',
width: 180
},
{
key: 'other',
title: '其他需求',
width: 180
},
{
key: 'tip',
title: '建议',
minWidth: 180
},
{
key: 'operate',
title: '查看',
align: 'center',
fixed: 'right',
width: 100,
render: (h ,{ row }) => h('Button',{
props: {
type: "primary",
size: 'small',
},
on: {
click: _ => {
this.$refs['longInsuranceDetail'].setId(row.id)
this.$refs['longInsuranceDetail'].show()
}
}
},'查看')
}
]}
data={row.long_insurances}>
</Table>
</el-popover>
)
}
},
{
prop: "idcard",
label: "身份证号",
@ -572,6 +716,24 @@ export default {
::v-deep .el-table-column--selection .cell {
padding-right: 10px;
}
.sku{
&-item{
border: 1px solid $primaryColor;
border-radius: 4px;
margin-bottom: 4px;
margin-right: 6px;
&__name{
background: $primaryColor;
color:#fff;
padding: 0 4px;
}
&__time{
}
}
}
</style>
<style>
.el-table-column--selection .cell .el-checkbox:last-of-type {

@ -75,6 +75,25 @@
>
<xy-selectors @search="(select.page = 1), getList()" @reset="reset">
<template>
<div class="select-item">
<div class="select-item__label">产品</div>
<el-select
filterable
size="small"
v-model="select.product_type_id"
placeholder="选择产品"
clearable
style="width: 200px;"
>
<el-option
v-for="item in products"
:value="item.name"
:label="item.name"
:key="item.id"
></el-option>
</el-select>
</div>
<div class="select-item">
<div class="select-item__label">地址</div>
<el-input size="small" v-model="select.address_name" placeholder="请输入地址" style="width: 200px;"></el-input>
@ -204,7 +223,8 @@
</template>
<script>
import { scheduleDelete } from "@/api/schedule/index"
import { getList as productIndex } from "@/api/product"
import { scheduleDelete } from "@/api/schedule"
import { getList as customerIndex } from "@/api/customer"
import { scheduleList } from "@/api/schedule";
import { getList as nurseList} from "@/api/worker"
@ -268,6 +288,7 @@ export default {
start_start_time:"",
end_start_time:"",
status:"",
product_type_id: "",
village_name: "",
is_export:0
},
@ -553,7 +574,9 @@ export default {
page: 1,
page_size: 20,
keyword: ""
}
},
products: [],
};
},
methods: {
@ -638,6 +661,13 @@ export default {
})
this.nurses = res.data
},
async getProducts() {
const res = await productIndex({
page: 1,
page_size: 999
},false)
this.products = res.data;
},
async getList() {
const res = await scheduleList(this.select)
this.list = res.list.data
@ -680,6 +710,7 @@ export default {
this.getNurses()
this.getCustomers()
this.getList()
this.getProducts()
}
};
</script>

Loading…
Cancel
Save