Browse Source

版本号提交2

unknown 2 months ago
parent
commit
fa480614f1

+ 46 - 0
src/api/elderly/fee/consumpotion-coupon/index.ts

@@ -0,0 +1,46 @@
+import request from '@/config/axios'
+
+// 获得列表
+export const getConsumerVouchersPage = (query) => {
+  return request.get({
+    url: '/elderly/consumer-vouchers/page',
+    params: query
+  })
+}
+
+// 获取详情
+export const getBalanceDetail = (id) => {
+  return request.get({
+    url: `elderly/expenseSubsidy/get?id=${id}`
+  })
+}
+
+// 创建
+export const addConsumerVouchers = (data) => {
+  return request.post({
+    url: `/elderly/consumer-vouchers/create`,
+    data
+  })
+}
+
+// 更新
+export const editConsumerVouchers = (data) => {
+  return request.put({
+    url: '/elderly/consumer-vouchers/update',
+    data
+  })
+}
+
+// 删除
+export const consumerVouchersDelete = (id) => {
+  return request.delete({
+    url: `/elderly/consumer-vouchers/delete?id=${id}`
+  })
+}
+
+// 明细
+export const getConsumerVouchersDetail = (id, month=undefined) => {
+  return request.get({
+    url: `/elderly/consumer-vouchers/get?id=${id}&month=${month}`
+  })
+}

+ 4 - 0
src/components/TabBarBtn/index.vue

@@ -73,6 +73,10 @@ const permissionStr = ref('') // 权限字符串
 const arr = route.fullPath.substring(1).split('/')
 permissionStr.value = arr[1].split('?')[0]
 
+onMounted(() => {
+  console.log("AAA",permissionStr.value)
+})
+
 const props = defineProps({
   moveDisabled: {
     type: Boolean,

+ 1 - 1
src/main.ts

@@ -51,7 +51,7 @@ import { Flex } from 'ant-design-vue'
 import 'ant-design-vue/dist/reset.css'
 import fetchPlugin from './config/axios/fetch';
 //版本号
-export const MAIN_VERSION = '4.2.6'
+export const MAIN_VERSION = '4.2.7'
 
 // 创建实例
 const setupAll = async () => {

+ 108 - 0
src/views/elderly/consumption-coupon/Details.vue

@@ -0,0 +1,108 @@
+<template>
+  <Dialog
+    v-model="dialogVisible"
+    title="明细"
+    class="form-tag-dialog expense-allowance-details"
+    width="60%"
+    @close="handleClosed"
+  >
+    <el-form
+      class="-mb-15px"
+      :model="dataForm"
+      ref="formRef"
+      label-width="110px"
+      :rules="dataRule"
+      :toggleType="true"
+    >
+      <div class="info-title">费用补贴</div>
+      <div class="info-wrap">
+        <el-row :gutter="20">
+          <el-col :span="12" :xs="24">
+            <el-form-item label="长者姓名" prop="elderName">
+              <TgInput v-model="dataForm.elderName" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" :xs="24">
+            <el-form-item label="可用余额(元)" prop="balance" class="bg">
+              <TgInput v-model="dataForm.balance" class="orange" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" :xs="24">
+            <el-form-item label="社会保障卡" prop="elderId">
+              <TgInput v-model="dataForm.socialSecurityCardNumber" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" :xs="24">
+            <el-form-item label="总补贴金额(元)" prop="totalAmount" class="bg grey">
+              <TgInput v-model="dataForm.totalAmount" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </div>
+    </el-form>
+    <template #footer>
+      <el-button @click="handleClosed">关闭</el-button>
+    </template>
+  </Dialog>
+</template>
+<script setup lang="ts">
+import { getExpenseSubsidyDetail } from '@/api/elderly/fee/expense-allowance'
+import { DICT_TYPE, getDictLabel } from '@/utils/dict'
+import { dateFormatter } from '@/utils/formatTime'
+import {getConsumerVouchersDetail} from "@/api/elderly/fee/consumpotion-coupon";
+defineOptions({ name: 'ExpenseAllowanceDetail' })
+const { t } = useI18n() // 国际化
+const dialogVisible = ref(false) // 弹窗
+const formRef = ref() // 表单 Ref
+const state = reactive({
+  dataForm: {
+    // 表单字段
+    id: '',
+    elderName: '',
+    totalAmount: '',
+    balance: '',
+    socialSecurityCardNumber: '',
+    records: []
+  },
+  dataRule: {
+    // 表单规则
+  }
+})
+const { dataForm, dataRule } = toRefs(state)
+
+/** 打开弹窗 */
+const open = async (id) => {
+  dialogVisible.value = true
+  try {
+    const res = await getConsumerVouchersDetail(id)
+    dataForm.value = res
+  } catch (err) {
+    console.log('err', err)
+  }
+}
+defineExpose({ open }) // 提供 open 方法,用于打开弹窗
+
+// 关闭表单
+const handleClosed = () => {
+  formRef.value?.resetFields()
+  dialogVisible.value = false
+}
+</script>
+<style lang="scss" scoped>
+.expense-allowance-details {
+  .bg {
+    background: #f8f9fb;
+  }
+
+  .orange {
+    color: #fe9e6d;
+  }
+
+  .grey {
+    color: #9e9ca0;
+    :deep(.el-form-item__label) {
+      color: #9e9ca0;
+    }
+  }
+}
+</style>

+ 199 - 0
src/views/elderly/consumption-coupon/Form.vue

@@ -0,0 +1,199 @@
+<template>
+  <Dialog
+    v-model="dialogVisible"
+    :title="itemTitle"
+    class="expense-allowance-form"
+    width="60%"
+    @close="handleClosed"
+  >
+    <el-form
+      class="-mb-15px"
+      :model="dataForm"
+      ref="formRef"
+      label-width="120px"
+      :rules="dataRule"
+      :toggleType="isDetail"
+    >
+      <el-row :gutter="20">
+        <el-col :span="12" :xs="24">
+          <el-form-item label="长者姓名" prop="elderId">
+            <SelectElder v-model="dataForm.elderId" :tId="dataForm.tenantId" inStatus="" @elder="(arg) => handleSelectElder(arg)"/>
+          </el-form-item>
+        </el-col>
+        <el-col :span="12" :xs="24">
+          <el-form-item label="床位号" prop="bedName">
+            <TgInput v-model="dataForm.bedName" :toggleType="true" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12" :xs="24">
+          <el-form-item label="账单归属月" prop="billingMonth">
+            <TgDatePicker v-model="dataForm.billingMonth" type="month" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="12" :xs="24">
+          <el-form-item label="消费券金额" prop="amount">
+            <TgInput v-model="dataForm.amount" appendText="¥" />
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="24">
+          <el-form-item label="备注" prop="remarks">
+            <TgTextarea v-model="dataForm.remarks" show-word-limit :maxlength="255" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <template #footer>
+      <el-button @click="handleClosed">关闭</el-button>
+      <el-button v-loading="formLoading" type="primary" @click="submitForm" v-if="!isDetail"
+        >确定</el-button
+      >
+    </template>
+  </Dialog>
+</template>
+<script setup lang="ts">
+import {
+  getBalanceDetail,
+  addExpenseSubsidy,
+  editExpenseSubsidy
+} from '@/api/elderly/fee/expense-allowance'
+import { FormRules } from 'element-plus'
+import { DICT_TYPE, getDictOptions, getIntDictOptions } from '@/utils/dict'
+import {
+  addConsumerVouchers,
+  editConsumerVouchers,
+  getConsumerVouchersDetail
+} from "@/api/elderly/fee/consumpotion-coupon";
+defineOptions({ name: 'ExpenseAllowanceForm' })
+const message = useMessage() // 消息弹窗
+const { t } = useI18n() // 国际化
+const dialogVisible = ref(false) // 弹窗
+const formRef = ref() // 表单 Ref
+const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
+const isDetail = ref(false)
+const state = reactive({
+  dataForm: {
+    // 表单字段
+    id: '',
+    elderId: '',
+    bedName: '',
+    billingMonth: '',
+    amount: '',
+    // subsidyDestination: '',
+    // returnStatus: '',
+    // deductionBillMonth: '',
+    remarks: '',
+    tenantId: undefined
+  },
+  dataRule: {
+    // 表单规则
+    elderId: [
+      {
+        required: true,
+        message: '姓名不能为空',
+        trigger: 'blur'
+      }
+    ],
+    billingMonth: [
+      {
+        required: true,
+        message: '账单归属月不能为空',
+        trigger: ['blur', 'change']
+      }
+    ],
+    amount: [
+      {
+        required: true,
+        message: '补贴金额不能为空',
+        trigger: ['blur']
+      }
+    ],
+    subsidyDestination: [
+      {
+        required: true,
+        message: '补贴去向不能为空',
+        trigger: ['blur']
+      }
+    ],
+    deductionBillMonth: [
+      {
+        required: true,
+        message: '账单抵扣月不能为空',
+        trigger: ['blur']
+      }
+    ]
+  }
+})
+const { dataForm, dataRule } = toRefs(state)
+
+// 弹窗标题
+const itemTitle = computed(() => {
+  return isDetail.value ? '详情' : !dataForm.value.id ? '新增' : '修改'
+})
+
+/** 打开弹窗 */
+const open = async (tId, id, detail) => {
+  dialogVisible.value = true
+  isDetail.value = detail
+  dataForm.value.tenantId = tId
+  if (id) {
+    const res = await getConsumerVouchersDetail(id)
+    dataForm.value = res
+  }
+}
+defineExpose({ open }) // 提供 open 方法,用于打开弹窗
+
+const handleSelectElder = (e) => {
+  dataForm.value.bedName = e.bedName
+}
+
+/** 提交表单 */
+const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
+const submitForm = async () => {
+  if(formLoading.value){
+    return
+  }
+  // 提交请求
+  formLoading.value = true
+  try {
+    // 校验表单
+    if (!formRef.value) return
+    const valid = await formRef.value.validate()
+    if (!valid) return
+    const res = dataForm.value.id
+      ? await editConsumerVouchers(dataForm.value)
+      : await addConsumerVouchers(dataForm.value)
+    if (res) {
+      message.success(t('common.updateSuccess'))
+      dialogVisible.value = false
+      // 发送操作成功的事件
+      emit('success')
+    }
+  } finally {
+    setTimeout(()=>{
+      formLoading.value = false
+    },500)
+  }
+}
+
+// 关闭表单
+const handleClosed = () => {
+  dataForm.value = {
+    // 表单字段
+    id: '',
+    elderId: '',
+    bedName: '',
+    billingMonth: '',
+    amount: '',
+    remarks: '',
+    tenantId: undefined
+  }
+  formRef.value?.resetFields()
+  dialogVisible.value = false
+}
+
+const change = () => {
+  dataForm.value.deductionBillMonth = ''
+  dataForm.value.returnStatus = ''
+}
+</script>

+ 378 - 0
src/views/elderly/consumption-coupon/column.ts

@@ -0,0 +1,378 @@
+import { DICT_TYPE } from '@/utils/dict'
+// =================收费分类=====================
+export const ChargeCategoryColumns = reactive([
+  {
+    label: '所属机构',
+    field: 'tenantName',
+    type: '99'
+  },
+  {
+    label: '类别名称',
+    field: 'name'
+  },
+  {
+    label: '级别',
+    field: 'parentId',
+    dictArr: DICT_TYPE.LEVEL_ARR,
+    type: '1'
+  },
+  {
+    label: '状态',
+    field: 'status',
+    type: '2',
+    dictArr: DICT_TYPE.COMMON_STATUS2
+  },
+  {
+    label: '备注',
+    field: 'remark'
+  }
+])
+// =================收费项目=====================
+export const OverheadChargeColumns = reactive([
+  {
+    label: '所属机构',
+    field: 'tenantName',
+    type: '99'
+  },
+  {
+    label: '项目名称',
+    field: 'chargeName',
+    align: 'left'
+  },
+  {
+    label: '价格(元)',
+    field: 'price'
+  },
+  {
+    label: '单位',
+    field: 'chargeType',
+    type: '1',
+    dictArr: DICT_TYPE.FEE_CHARGE_TYPE
+  },
+  {
+    label: '状态',
+    field: 'status',
+    type: '2',
+    dictArr: DICT_TYPE.COMMON_STATUS2
+  },
+  {
+    label: '金蝶编码',
+    field: 'kingdeeCostid',
+  },
+])
+
+// ======================账单缴费=====================
+export const BillPayColumns = reactive([
+  {
+    label: '所属机构',
+    field: 'tenantName',
+    type: '99',
+    fixed: true,
+    width: 180
+  },
+  {
+    label: '长者姓名',
+    field: 'elderName',
+    width: 120,
+    fixed: true
+  },
+  {
+    label: '床位号',
+    field: 'bedName',
+    width: 180,
+    fixed: true
+  },
+  {
+    label: '账单月',
+    field: 'billingMonth',
+    width: 120,
+    fixed: true
+  },
+  // {
+  //   label: '推送状态',
+  //   field: 'pushStatus',
+  //   dictArr: DICT_TYPE.PUSH_STATUS,
+  //   type: '1',
+  //   width: 120
+  // },
+  {
+    label: '缴费状态',
+    field: 'payStatus',
+    dictArr: DICT_TYPE.PAY_TYPE,
+    type: '2',
+    width: 100
+  },
+  {
+    label: '缴费时间',
+    field: 'payTime',
+    type: '9',
+    format: true,
+    width: 180
+  },
+  {
+    label: '出纳',
+    field: 'payeeName',
+    width: 120
+  },
+  // {
+  //   label: '已缴费用',
+  //   field: 'actualAmount',
+  //   type: '14',
+  //   width: 120
+  // },
+  {
+    label: '本月账单应收',
+    field: 'actualAmount',
+    type: '14',
+    width: 120
+  },
+  {
+    label: '床位费',
+    field: 'bedAmount',
+    type: '15',
+    width: 120
+  },
+  {
+    label: '护理费',
+    field: 'nurseAmount',
+    type: '15',
+    width: 120
+  },
+  {
+    label: '餐饮费',
+    field: 'mealAmount',
+    type: '15',
+    width: 120
+  },
+  {
+    label: '其他',
+    field: 'otherAmount',
+    otherField: 'otherRoundAmount',
+    type: '13',
+    width: 120
+  },
+  {
+    label: '医保',
+    field: 'insuranceAmount',
+    type: '3',
+    width: 120
+  },
+  {
+    label: '已缴费用',
+    field: 'payableAmount',
+    type: '17',
+    width: 120
+  }
+])
+
+// ======================日常费用=====================
+export const DailyFeeColumns = reactive([
+  {
+    label: '所属机构',
+    field: 'tenantName',
+    type: '99',
+  },
+  {
+    label: '长者姓名',
+    field: 'elderName',
+    width: 120
+  },
+  {
+    label: '床位号',
+    field: 'bedName',
+    width: 180
+  },
+  {
+    label: '账单归属月',
+    field: 'attributionBillTime',
+  },
+  {
+    label: '费用来源',
+    field: 'type',
+    type: '1',
+    dictArr: DICT_TYPE.COST_FROM_TYPE,
+  },
+  {
+    label: '收费项目',
+    field: 'itemName',
+    width: 180
+  },
+  {
+    label: '费用(元)',
+    field: 'amount',
+    type: '3'
+  },
+  {
+    label: '缴费状态',
+    field: 'status',
+    dictArr: DICT_TYPE.PAYMENT_STATUS,
+    type: '1'
+  },
+  {
+    label: '费用产生时间',
+    field: 'createdTime',
+    format: true,
+    type: '9',
+    width: 180
+  },
+  {
+    label: '缴费单号',
+    field: 'expenseBillCode'
+  },
+  {
+    label: '记账人',
+    field: 'createdBy'
+  },
+  {
+    label: '备注',
+    field: 'remarks'
+  }
+])
+
+// ==============入住押金====================
+export const depositColumn = [
+  {
+    label: '所属机构',
+    field: 'tenantName',
+    type: '99',
+  },
+  {
+    label: '长者姓名',
+    field: 'elderName'
+  },
+  {
+    label: '床位号',
+    field: 'bedName'
+  },
+  {
+    label: '长者状态',
+    field: 'inStatus',
+    type: '1',
+    dictArr: DICT_TYPE.IN_STATUS_ARR
+  },
+  {
+    label: '押金金额(元)',
+    field: 'amount',
+    type: '3'
+  }
+]
+
+// ==============退住结算====================
+export const levelSettleColumn = [
+  {
+    label: '所属机构',
+    field: 'tenantName',
+    type: '99',
+  },
+  {
+    label: '长者姓名',
+    field: 'elderName'
+  },
+  {
+    label: '床位号',
+    field: 'bedName'
+  },
+  {
+    label: '结算状态',
+    field: 'status',
+    dictArr: DICT_TYPE.SETTLEMENT_STATUS,
+    type: '1'
+  },
+  {
+    label: '结算时间',
+    field: 'settlementTime',
+    format: true
+  },
+  {
+    label: '结算人',
+    field: 'settlementPersonName'
+  }
+]
+
+// =================长护险===================
+export const expenseAllowanceColumn = [
+  {
+    label: '所属机构',
+    field: 'tenantName',
+    type: '99',
+  },
+  {
+    label: '长者姓名',
+    field: 'elderName'
+  },
+  {
+    label: '账单归属月',
+    field: 'billingMonth'
+  },
+  {
+    label: '消费券金额',
+    field: 'amount',
+    type: '3'
+  },
+  {
+    label: '缴费单号',
+    field: 'orderNumber'
+  },
+  {
+    label: '备注',
+    field: 'remarks'
+  }
+]
+
+// ==================余额预存===================
+export const balanceColumn = [
+  {
+    label: '长者姓名',
+    field: 'elderName'
+  },
+  {
+    label: '床位号',
+    field: 'bedName'
+  },
+  {
+    label: '入住状态',
+    field: 'inStatus',
+    dictArr: DICT_TYPE.IN_STATUS_ARR,
+    type: '1'
+  },
+  {
+    label: '预存金额(元)',
+    field: 'amount',
+    type: '3'
+  }
+]
+
+// ===================外出费用配置=========================
+export const outRefundColumn = [
+  {
+    label: '所属机构',
+    field: 'tenantName',
+    type: '99'
+  },
+  {
+    label: '类型名称',
+    field: 'name'
+  },
+  {
+    label: '是否退费',
+    field: 'isRefund',
+    dictArr: DICT_TYPE.COMMON_STATUS6,
+    type: '1'
+  },
+  {
+    label: '返院当日退费',
+    field: 'isSameDayRefund',
+    dictArr: DICT_TYPE.REFUND_TERMS_TYPE,
+    type: '1'
+  },
+  {
+    label: '状态',
+    field: 'status',
+    dictArr: DICT_TYPE.COMMON_STATUS2,
+    type: '1'
+  },
+  {
+    label: '备注',
+    field: 'remarks'
+  }
+]

+ 237 - 0
src/views/elderly/consumption-coupon/index.vue

@@ -0,0 +1,237 @@
+<template>
+  <ContentWrap>
+    <!-- 搜索工作栏 -->
+    <el-form
+      class="-mb-15px"
+      :model="queryParams"
+      ref="queryFormRef"
+      :inline="true"
+      label-width="100px"
+    >
+      <TenantSelect v-model="queryParams.tenantIds" placeholder="请选择机构名称" prop="tenantIds"/>
+      <el-form-item label="长者姓名" prop="elderName">
+        <el-input @keyup.enter="handleQuery" v-model="queryParams.elderName" placeholder="请输入长者姓名" class="!w-240px" />
+      </el-form-item>
+      <el-form-item label="缴费单号" prop="elderName">
+        <el-input @keyup.enter="handleQuery" v-model="queryParams.orderNumber" placeholder="请输入缴费单号" class="!w-240px" />
+      </el-form-item>
+      <el-form-item label="账单归属月" prop="billingMonth">
+        <TgDatePicker v-model="queryParams.billingMonth" type="month" class="!w-240px" />
+      </el-form-item>
+      <el-form-item label="使用状态" prop="subsidyDestination">
+        <el-select v-model="queryParams.status" placeholder="请选择" class="!w-240px">
+          <el-option
+            v-for="(dict, index) in [{value: 0, label: '未抵扣'}, {value: 1, label: '已抵扣'}]"
+            :key="index"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+<!--      <el-form-item label="补贴状态" prop="status">-->
+<!--        <el-select v-model="queryParams.status" placeholder="请选择" class="!w-240px">-->
+<!--          <el-option-->
+<!--            v-for="(dict, index) in getStrDictOptions(DICT_TYPE.COMMON_STATUS2)"-->
+<!--            :key="index"-->
+<!--            :label="dict.label"-->
+<!--            :value="dict.value"-->
+<!--          />-->
+<!--        </el-select>-->
+<!--      </el-form-item>-->
+      <el-form-item>
+        <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
+        <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
+      </el-form-item>
+    </el-form>
+  </ContentWrap>
+
+  <!-- 列表 -->
+  <ContentWrap>
+    <TabBarBtn @add="openForm()" @import="handleImport" @export="handleExport"/>
+
+    <Table2
+      v-loading="loading"
+      :data="list"
+      :columns="expenseAllowanceColumn"
+      :queryParams="queryParams"
+      :opWidth="270"
+      :showEditCondition="showEditCondition"
+      @edit="openForm"
+      @del="h_delete"
+      @detail="(arg) => openForm(arg, true)"
+    >
+<!--      <template #pre="scope">-->
+<!--        <el-button-->
+<!--          link-->
+<!--          type="primary"-->
+<!--          @click="handleOpenDetails(scope.scope)"-->
+<!--          v-hasPermi="['consumption-coupon:details']"-->
+<!--        >-->
+<!--          明细-->
+<!--        </el-button>-->
+<!--      </template>-->
+    </Table2>
+    <!-- 分页 -->
+    <Pagination
+      :total="total"
+      v-model:page="queryParams.pageNo"
+      v-model:limit="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </ContentWrap>
+
+  <Form ref="formRef" @success="getList" />
+  <Details ref="detailsRef" />
+
+  <Import
+    ref="importRef"
+    @success="getList"
+    :config="{
+      title: '导入',
+      downloadUrl: '/elderly/expenseSubsidy/downloadExpenseSubsidyExcel',
+      excelTempName: '长护险导入模板',
+      importUrl: '/elderly/expenseSubsidy/importExpenseSubsidy',
+      failExportUrl: ''
+    }"
+  />
+</template>
+<script lang="ts" setup>
+import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
+import {expenseSubsidyDelete, getExpenseSubsidyPage} from '@/api/elderly/fee/expense-allowance'
+import { expenseAllowanceColumn } from './column'
+import Form from './Form.vue'
+import Details from './Details.vue'
+import Import from "@/components/ImportFile/index.vue";
+import { useUserStore } from '@/store/modules/user'
+import {ElMessageBox} from "element-plus";
+import {exportWithCustomHeaders} from "@/utils/excel-export";
+import {formatToDateTime} from "@/utils/dateUtil";
+import {
+  consumerVouchersDelete,
+  getConsumerVouchersPage
+} from "@/api/elderly/fee/consumpotion-coupon";
+defineOptions({ name: 'ExpenseAllowance' })
+const userStore = useUserStore()
+const message = useMessage() // 消息弹窗
+const { t } = useI18n() // 国际化
+
+const loading = ref(true) // 列表的加载中
+const total = ref(0) // 列表的总页数
+const list = ref([]) // 列表的数据
+const queryParams = reactive({
+  pageNo: 1,
+  pageSize: 10,
+  elderName: undefined,
+  billingMonth: undefined,
+  status: undefined,
+  orderNumber: undefined,
+  tenantIds: userStore.orgTenantId
+})
+const queryFormRef = ref() // 搜索的表单
+
+/** 查询列表 */
+const getList = async () => {
+  loading.value = true
+  try {
+    const data = await getConsumerVouchersPage(queryParams)
+    list.value = data.list
+    total.value = data.total
+    return list.value
+  } finally {
+    loading.value = false
+  }
+}
+
+/** 搜索按钮操作 */
+const handleQuery = async () => {
+  if (!queryFormRef.value) return
+  const valid = await queryFormRef.value.validate()
+  if (!valid) return
+  queryParams.pageNo = 1
+  queryParams.status=undefined
+  getList()
+}
+
+/** 重置按钮操作 */
+const resetQuery = () => {
+  queryFormRef.value.resetFields()
+  handleQuery()
+}
+
+//删除
+const h_delete = (id) =>{
+  ElMessageBox.confirm('确定要删除该消费券?', '提示', {
+    confirmButtonText: '确 认',
+    cancelButtonText: '取 消'
+  })
+    .then(async () => {
+      const res = await consumerVouchersDelete(id)
+      if(res){
+        message.success("删除成功")
+        await getList()
+      }
+    })
+    .catch((_) =>{})
+
+}
+
+/** 添加/修改操作 */
+const formRef = ref()
+const openForm = (row: any = {}, isDetail: boolean = false) => {
+  if(queryParams.tenantIds.length == 0 || queryParams.tenantIds.length > 1 && !row.tenantId){
+    message.error('新增只能选择一个机构')
+    return
+  }
+  formRef.value.open(row.tenantId || queryParams.tenantIds[0], row.id, isDetail)
+}
+
+const detailsRef = ref()
+const handleOpenDetails = (row) => {
+  detailsRef.value.open(row.id)
+}
+
+const showEditCondition = (row) => {
+  return row.status == 0
+}
+
+/** 用户导入 */
+const importRef = ref()
+const handleImport = () => {
+  importRef.value.open()
+}
+//导出
+const handleExport = async ()=>{
+  if(loading.value){
+    return
+  }
+  try {
+    loading.value = true
+    queryParams.pageSize = 10000
+    const list = await getList()
+    if (list.length <= 0) {
+      message.error('暂无数据可以导出!')
+      return
+    }
+    const headers = [
+      { key: 'elderName', title: '长者姓名' },
+      { key: 'month', title: '所属月份' },
+      { key: 'subsidyDestination', title: '补贴去向(1线下返还,2账单抵扣)' },
+      { key: 'status', title: '使用状态(1已抵扣,0未抵扣)' },
+      { key: 'amount', title: '补贴金额' },
+      { key: 'deductionBillMonth', title: '抵扣账单月' },
+      { key: 'remarks', title: '备注' }
+    ]
+    exportWithCustomHeaders(list, headers, `长护险-${formatToDateTime()}.xlsx`, '长护险补贴')
+  } catch (e) {
+    message.error('暂无数据可以导出!')
+    console.log(e)
+  }finally {
+    queryParams.pageSize = 10
+    loading.value = false
+  }
+}
+/** 初始化 **/
+onMounted(() => {
+  getList()
+})
+</script>

+ 21 - 15
src/views/elderly/fee/bill-pay/preview.vue

@@ -6,28 +6,33 @@
           <div class="header">
             <p class="title">{{ tenantName }}对账单预览</p>
             <div class="info-wrap">
-              <span><b>姓名:</b> {{ dataForm.elderName }}</span>
+              <span><b>姓名:</b> {{
+                  dataForm.elderName
+                }}{{ (dataForm.contractNumber == null || dataForm.contractNumber == '')?'':`(${dataForm.contractNumber})`}}</span>
               <span><b>床位号:</b> {{ dataForm.bedName }}</span>
-              <span><b>账单月:</b> {{ dataForm.billingMonth }}</span>
-              <span><b>打印时间:</b> {{ dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss') }}</span>
+              <span><b>缴费时间:</b> {{ formatTime(dataForm.payTime, 'yyyy-MM-dd') }}</span>
+<!--              <span><b>应收金额:</b> {{ totalPayAmount }}元</span>-->
+              <span><b>经手人:</b> {{ dataForm.payeeName }}</span>
+<!--              <span><b>账单月:</b> {{ dataForm.billingMonth }}</span>-->
+<!--              <span><b>打印时间:</b> {{ dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss') }}</span>-->
             </div>
-            <div class="info-wrap" style="margin-top: -10px">
+<!--            <div class="info-wrap" style="margin-top: -10px">-->
               <!-- <span><b>发票号:</b> {{ dataForm.invoiceNumber }}</span> -->
-              <span><b>应收金额:</b> {{ totalPayAmount }}元</span>
+<!--              <span><b>应收金额:</b> {{ totalPayAmount }}元</span>-->
               <!-- <span><b>医保费用:</b> {{ formatNum(dataForm.insuranceAmount) || '0' }}元</span>
               <span><b>个人应缴:</b> {{ formatNum(dataForm.payAmount) }}元</span> -->
-              <span><b>长护险余额:</b> {{ formatNum(longTermAmount) || '0' }}元</span>
-              <span><b>抹零金额:</b> {{ roundDown }}元</span>
-              <span><b>个人应缴:</b> {{ payTotal }}元</span>
-            </div>
-            <div class="info-wrap" style="margin-top: -10px">
-              <span><b>缴费时间:</b> {{ formatTime(dataForm.payTime, 'yyyy-MM-dd') }}</span>
-              <span><b>经手人:</b> {{ dataForm.payeeName }}</span>
-            </div>
+<!--              <span><b>长护险余额:</b> {{ formatNum(longTermAmount) || '0' }}元</span>-->
+<!--              <span><b>抹零金额:</b> {{ roundDown }}元</span>-->
+<!--              <span><b>个人应缴:</b> {{ payTotal }}元</span>-->
+<!--            </div>-->
+<!--            <div class="info-wrap" style="margin-top: -10px">-->
+<!--              <span><b>缴费时间:</b> {{ formatTime(dataForm.payTime, 'yyyy-MM-dd') }}</span>-->
+
+<!--            </div>-->
           </div>
-          <el-divider style="margin-top: 8px"/>
+          <el-divider style="margin-top: 2px"/>
           <div class="content">
-            <p class="info">以下是账单明细</p>
+<!--            <p class="info">以下是账单明细</p>-->
             <div class="flex">
               <b>{{ dataForm.description ? tTitle + '(' + dataForm.description + ')' : tTitle + '(' + bTitle + ')' }}</b>
               <span><b>金额小计:</b>¥ {{ tableSubtotal }}</span>
@@ -155,6 +160,7 @@ const dataForm = ref({
   insuranceAmount: 0,
   payAmount: 0,
   billingMonth: '',
+  contractNumber: '',
   items: [],
   payInfos:[],
   otherName: '',

+ 10 - 10
src/views/elderly/fee/bill-pay/unpay-preview.vue

@@ -20,21 +20,21 @@
           <span><b>性别:</b> {{ getDictLabel(DICT_TYPE.SYSTEM_USER_SEX, dataForm.elderSex) }}</span>
           <span><b>经手人:</b> {{ dataForm.createdBy }}</span>
         </div>
-        <div class="info-wrap">
-          <span><b>账单月:</b> {{ dataForm.billingMonth }}</span>
+<!--        <div class="info-wrap">-->
+<!--          <span><b>账单月:</b> {{ dataForm.billingMonth }}</span>-->
           <!-- <span><b>账单总额:</b> {{ billTotalPrice }}元</span> -->
           <!-- <span><b>长护险:</b> {{ formatNum(longTermAmount) }}元</span> -->
-          <span><b>应缴:</b> {{ formatNum(unPayTotal) }}元</span>
-          <span><b>发票号:</b> {{ dataForm.invoiceNumber }}</span>
-        </div>
-        <div class="info-wrap">
+<!--          <span><b>应缴:</b> {{ formatNum(unPayTotal) }}元</span>-->
+<!--          <span><b>发票号:</b> {{ dataForm.invoiceNumber }}</span>-->
+<!--        </div>-->
+<!--        <div class="info-wrap">-->
           <!-- <span><b>已缴费用:</b> {{ formatNum(payTotal) }}元</span> -->
-          <span><b>打印时间:</b> {{ dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss') }}</span>
-        </div>
+<!--          <span><b>打印时间:</b> {{ dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss') }}</span>-->
+<!--        </div>-->
       </div>
-      <el-divider />
+      <el-divider style="margin-top: 2px"/>
       <div class="content">
-        <p class="info">以下是账单明细</p>
+<!--        <p class="info">以下是账单明细</p>-->
         <div class="flex">
           <b>{{ dataForm.description ? tTitle + '(' + dataForm.description + ')' : tTitle + '(' + bTitle + ')' }}</b>
         </div>

+ 4 - 1
src/views/elderly/nursing/records/rehabilitation-assessment/index.vue

@@ -125,7 +125,7 @@ import { getTenantId } from '@/utils/auth'
 import { dateFormatter } from '@/utils/formatTime'
 import {trainingPage} from "@/api/elderly/nursing/records/rehabilitation-training";
 import {exportWithExpandedObjectArrays} from "@/utils/excel-export";
-import {formatToDateTime} from "@/utils/dateUtil";
+import {formatToDate, formatToDateTime} from "@/utils/dateUtil";
 import Import from "@/components/ImportFile/index.vue";
 
 const AddForm = defineAsyncComponent(() => import('./AddForm.vue'))
@@ -198,6 +198,9 @@ const outTab = async () => {
       { key: 'expectedEffect', title: '预期效果' },
       { key: 'therapist', title: '康复师' }
     ]
+    list.list.forEach(item => {
+      item.assessmentTime = formatToDate(item.assessmentTime)
+    })
     exportWithExpandedObjectArrays(list.list, headers, `康复评估记录${formatToDateTime()}.xlsx`, '康复评估记录')
   } catch (_) {}finally {
     loading.value = false

+ 4 - 1
src/views/elderly/nursing/records/rehabilitation-training/index.vue

@@ -125,7 +125,7 @@ import { trainingPage, trainingDelete } from "@/api/elderly/nursing/records/reha
 import download from "@/utils/download";
 import { getTenantId } from '@/utils/auth'
 import { dateFormatter } from '@/utils/formatTime'
-import {formatToDateTime} from "@/utils/dateUtil";
+import {formatToDate, formatToDateTime} from "@/utils/dateUtil";
 import {exportWithExpandedObjectArrays} from "@/utils/excel-export";
 import {careRecordsPage} from "@/api/member/appointment";
 import Import from "@/components/ImportFile/index.vue";
@@ -205,6 +205,9 @@ const outTab = async () => {
         { key: 'recordContent', title: '记录内容' },
         { key: 'therapist', title: '康复师' }
       ]
+      list.list.forEach(item => {
+        item.trainingTime = formatToDate(item.trainingTime)
+      })
       exportWithExpandedObjectArrays(list.list, headers, `康复训练记录${formatToDateTime()}.xlsx`, '康复训练记录')
     } catch (_) {}finally {
       loading.value = false