master
xy 3 years ago
parent f36bf0697f
commit f68f2e75ba

@ -4,7 +4,7 @@
<template> <template>
<div style="overflow-y: scroll; height: 100%; padding-bottom: 100px"> <div style="overflow-y: scroll; height: 100%; padding-bottom: 100px">
<drawInfoItem title="被护理人" :info="rowFormat[0]"></drawInfoItem> <drawInfoItem title="被护理人" :info="rowFormat[0]"></drawInfoItem>
<drawInfoItem title="护理人" :info="rowFormat[1]"></drawInfoItem> <drawInfoItem v-if="type === 2" title="护理人" :info="rowFormat[1]"></drawInfoItem>
<div class="draw-title"> <div class="draw-title">
{{ type === 1 ? "服务列表" : "本次服务信息" }} {{ type === 1 ? "服务列表" : "本次服务信息" }}
</div> </div>
@ -180,22 +180,35 @@ export default {
computed: { computed: {
rowFormat() { rowFormat() {
if (this.selectedRow()) { if (this.selectedRow()) {
return [ if(this.type === 1){
{ return [
姓名: this.selectedRow().customer?.name, {
性别: this.selectedRow().customer?.sex, 姓名: this.selectedRow().customer?.name,
年龄: getAgeByIdcard(this.selectedRow().customer?.idcard), 性别: this.selectedRow().customer?.sex,
地址: this.selectedRow().customer_address?.address, 年龄: getAgeByIdcard(this.selectedRow().customer?.idcard),
联系人: this.selectedRow().customer?.contact_name, 联系人: this.selectedRow().customer?.contact_name,
联系人电话: this.selectedRow().customer?.contact_phone, 联系人电话: this.selectedRow().customer?.contact_phone,
}, }
{ ]
姓名: this.selectedRow().nurse?.name, }
性别: this.selectedRow().nurse?.sex, if(this.type === 2){
年龄: getAgeByIdcard(this.selectedRow().nurse?.idcard), return [
手机号: this.selectedRow().nurse?.mobile, {
}, 姓名: this.selectedRow().customer?.name,
]; 性别: this.selectedRow().customer?.sex,
年龄: getAgeByIdcard(this.selectedRow().customer?.idcard),
地址: this.selectedRow().customer_address?.address,
联系人: this.selectedRow().customer?.contact_name,
联系人电话: this.selectedRow().customer?.contact_phone,
},
{
姓名: this.selectedRow().nurse?.name,
性别: this.selectedRow().nurse?.sex,
年龄: getAgeByIdcard(this.selectedRow().nurse?.idcard),
手机号: this.selectedRow().nurse?.mobile,
},
];
}
} }
}, },
typeFormat() { typeFormat() {

@ -96,7 +96,7 @@
</template> </template>
</xy-table> </xy-table>
<serveDraw ref="serveDraw"></serveDraw> <serveDraw :type="1" ref="serveDraw"></serveDraw>
</div> </div>
</template> </template>
@ -221,11 +221,9 @@ export default {
}, },
detail(scope) { detail(scope) {
this.$refs["serveDraw"].row = scope.row; this.selectedRow = scope.row;
this.$refs["serveDraw"].select.id = scope.row.id; this.$refs["serveDraw"].select.order_id = scope.row.id;
this.$refs["serveDraw"].select.customer_id = scope.row.customer.id; //this.$refs["serveDraw"].select.customer_id = scope.row.customer.id;
this.$refs["serveDraw"].select.year = this.select.year;
this.$refs["serveDraw"].select.month = this.select.month;
this.$refs["serveDraw"].isShow = true; this.$refs["serveDraw"].isShow = true;
}, },
async getList() { async getList() {

Loading…
Cancel
Save