zhengyiming
4 天以前 5664a1a616df498cba58b9a8e63a91ac0ba96bab
src/views/Home/Home.vue
@@ -53,6 +53,13 @@
          </QueryFilterItem>
        </template>
        <template #btn>
          <el-button
            @click="handleDownloadOccupationType()"
            type="primary"
            style="margin-right: 10px"
            link
            >职业类型对照表</el-button
          >
          <el-button @click="handleDownload()" type="primary" style="margin-right: 10px" link
            >模板下载</el-button
          >
@@ -87,7 +94,7 @@
            class="box-item"
            effect="dark"
            :content="row.auditRemark"
            placement="top-start"
            placement="top"
            v-if="row.auditStatus === InsurancePolicyAuditStatusEnum.Reject && row.auditRemark"
            popper-class="max-width-popper"
          >
@@ -104,6 +111,7 @@
    </AppContainer>
    <UploadInsurePersonDialog v-bind="dialogProps" />
    <UploadStampFileDialog v-bind="dialogStampFileProps" />
    <InsureInstructionsDialog v-bind="dialogInstructionsProps" />
  </LoadingLayout>
</template>
@@ -122,6 +130,7 @@
  SearchInput,
  FieldRadio,
  XLSXUtils,
  useDialog,
} from '@bole-core/components';
import * as insuranceOrderServices from '@/services/api/InsuranceOrder';
import { Message, OrderInputType, downloadFileByUrl } from '@bole-core/core';
@@ -141,9 +150,12 @@
  InsurancePolicyProductIdNumberEnum,
  InsurancePolicyListPayStatusEnum,
  InsurancePolicyListPayStatusEnumText,
  InsuranceOccupationTypeTempPath,
} from '@/constants';
import dayjs from 'dayjs';
import _ from 'lodash';
import InsureInstructionsDialog from './components/InsureInstructionsDialog.vue';
// import { Recorder } from '@/utils/record';
defineOptions({
  name: 'Home',
@@ -182,7 +194,6 @@
    },
    extraProps: {
      hide: (row: API.GetInsurancePageOutput) =>
        row.auditStatus !== InsurancePolicyAuditStatusEnum.Pass ||
        row.status !== InsurancePolicyStatusEnum.WaitEffect,
    },
  },
@@ -252,11 +263,22 @@
};
const state = reactive({ ...BaseState });
// const recorder = ref(new Recorder());
onMounted(async () => {
  await getList();
  state.loading = false;
  handleOpenInstructions();
  // setTimeout(() => {
  //   // recorder.value.init();
  //   recorder.value.replaySession('9cb24e5a-0423-4dcd-abd5-fa7a4117cadc');
  // }, 3000);
});
// onUnmounted(() => {
//   recorder.value.stopRecordingAndSave();
// });
const {
  getDataSource: getList,
@@ -383,6 +405,12 @@
  } catch (error) {}
}
const { dialogProps: dialogInstructionsProps, dialogState: dialogInstructionsState } = useDialog();
function handleOpenInstructions() {
  dialogInstructionsState.dialogVisible = true;
}
function handleUpload() {
  handleAdd({
    serialNum: `${dayjs().format('YYYYMMDD')}${_.random(0, 9999).toString().padStart(4, '0')}`,
@@ -424,6 +452,10 @@
      downloadFile(res.data, `在保人员导出`, 'xlsx');
    }
  } catch (error) {}
}
function handleDownloadOccupationType() {
  downloadFileByUrl(InsuranceOccupationTypeTempPath, '职业类型对照表');
}
function handleDownload() {
@@ -550,12 +582,15 @@
  });
}
function handleGoDownloadInvoice(row: API.GetInsurancePageOutput) {
  router.push({
    name: 'InsureDownloadInvoice',
    params: {
      id: row.id,
    },
  });
async function handleGoDownloadInvoice(row: API.GetInsurancePageOutput) {
  try {
    await insuranceOrderServices.getInvoiceId({ id: row.id });
    router.push({
      name: 'InsureDownloadInvoice',
      params: {
        id: row.id,
      },
    });
  } catch (error) {}
}
</script>