pengjun 3 years ago
parent
commit
af11a1702c
  1. 20
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 6
      src/components/patientRegister/patientRegisterAsbItem.vue
  3. 148
      src/views/customerOrg/patientRegisterImport.vue

20
src/components/patientRegister/PatientRegisterEdit.vue

@ -9,7 +9,8 @@
<el-form-item label="单位名称" prop="customerOrgId">
<el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll"
:style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'"
:props="{checkStrictly: true,expandTrigger: 'hover',...customerOrg.treeprops,}" :show-all-levels="false" disabled>
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
:show-all-levels="false" disabled>
</el-cascader>
</el-form-item>
</el-col>
@ -49,8 +50,8 @@
<el-col :span="5">
<el-form-item label="出生日期" prop="birthDate">
<el-date-picker v-model="form.birthDate" type="date" value-format="yyyy-MM-dd" placeholder="出生日期"
:style="'width:'+ Math.floor((window.pageWidth - 530)/ 4.8)+'px;'"
@change="changeBirthDate" prefix-icon=""/>
:style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'" @change="changeBirthDate"
prefix-icon="" />
</el-form-item>
</el-col>
<el-col :span="5">
@ -111,7 +112,8 @@
<el-form-item label="民族" prop="nationId">
<el-select v-model="form.nationId" placeholder="请选择" filterable clearable
:style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
<el-option v-for="item in dict.nation" :key="item.nationId" :label="item.displayName" :value="item.nationId" />
<el-option v-for="item in dict.nation" :key="item.nationId" :label="item.displayName"
:value="item.nationId" />
</el-select>
</el-form-item>
</el-col>
@ -119,7 +121,8 @@
<el-form-item label="籍惯" prop="birthPlaceId">
<el-select v-model="form.birthPlaceId" placeholder="请选择" filterable clearable
:style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'">
<el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName" :value="item.id" />
<el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName"
:value="item.id" />
</el-select>
</el-form-item>
</el-col>
@ -290,7 +293,8 @@
</el-col>
</el-row>
</el-form>
<el-image :style="'position: absolute;top:65px;right:'+(110 + Math.floor((window.pageWidth - 360)/25))+'px; width: 150px; height: 160px;'"
<el-image
:style="'position: absolute;top:65px;right:' + (110 + Math.floor((window.pageWidth - 360) / 25)) + 'px; width: 150px; height: 160px;'"
:src="form.photo ? (apiurl + '/' + form.photo) : ''">
<div slot="placeholder" class="image-slot">
加载中<span class="dot">...</span>
@ -711,9 +715,9 @@ export default {
::v-deep .el-table--small .el-table__cell {
padding: 0px 0;
}
::v-deep .el-input__inner {
text-align: left;
padding-left: 5px;
padding-right: 15px;
}
</style>
}</style>

6
src/components/patientRegister/patientRegisterAsbItem.vue

@ -1,10 +1,8 @@
<template>
<div>
<div style="display: flex">
<el-table :data="patientRegister.patientRegisterAbs" border :height="patientRegister.prAsbItemHeight"
size="small" highlight-current-row
:summary-method="getSummaries" show-summary
ref="patientRegister.patientRegisterAbs">
<el-table :data="patientRegister.patientRegisterAbs" border :height="patientRegister.prAsbItemHeight" size="small"
highlight-current-row :summary-method="getSummaries" show-summary ref="patientRegister.patientRegisterAbs">
<el-table-column type="index" label="序号" width="50" />
<el-table-column prop="asbitemName" label="已选组合项目" width="120" />
<el-table-column prop="standardPrice" label="标准价" />

148
src/views/customerOrg/patientRegisterImport.vue

@ -0,0 +1,148 @@
<template>
<div>
<div>123</div>
<el-dialog title="选择文件" :visible.sync="dialogGroup[0]" width="400" height="800" :show-close="false"
:append-to-body="true" :close-on-click-modal="false">
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="btnNext">下一步</el-button>
<el-button @click="seq = -1">关闭</el-button>
</span>
</el-dialog>
<el-dialog title="选择文件" :visible.sync="dialogGroup[1]" width="400" height="800" :show-close="false"
:append-to-body="true" :close-on-click-modal="false">
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="btnPre">上一步</el-button>
<el-button type="primary" @click="btnNext">上一步</el-button>
<el-button @click="seq = -1">关闭</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { mapState, mapActions } from "vuex";
import ExcelJS from "exceljs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
export default {
components: {
},
data() {
return {
dialogGroup:[true,false,false],
seq: 0, //
excelCol: [], //excel
excelData: [], //excel
};
},
//
created() {
},
//
mounted() {
},
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
},
methods: {
//
btnPre() {
if(this.seq == 0) return;
this.seq--;
this.setDialogDisp();
},
//
btnNext() {
if(this.seq == 0) return;
this.seq++;
this.setDialogDisp();
},
//
setDialogDisp(){
this.dialogGroup.forEach((item,index) =>{
if(index == this.seq){
item = true;
}else{
item = false;
}
return item;
});
},
onFileChange(event) {
//
const file = event.target.files[0];
// Excel
this.importExcelFile(file);
},
importExcelFile(file) {
this.filepopupdialogVisible = true;
console.log("333");
// 簿
const workbook = new ExcelJS.Workbook();
// Excel
const reader = new FileReader();
console.log(reader);
reader.onload = () => {
const buffer = reader.result;
const typedArray = new Uint8Array(buffer);
const blob = new Blob([typedArray], {
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
});
// BlobExcel
workbook.xlsx.load(blob).then((workbook) => {
//
const worksheet = workbook.getWorksheet(1);
// Excel
worksheet.eachRow((row, rowNumber) => {
// const rowData = row.values;
// this.rowData = row.values;
// console.log(this.rowData,'rowdata');
// console.log(rowData);
//console.log('row,rowNumber',row,rowNumber);
this.importData.push(row.values);
// console.log(`${rowNumber}${rowData}`);
});
});
};
reader.readAsArrayBuffer(file);
},
parseImportData(importData) {
console.log("importData", importData.length, importData);
importData.forEach((item) => {
item.forEach((item2) => {
// this.$set(item2[0], "name", true);
item2[0]['names'] = true
console.log(item2);
// console.log(item2);
});
// console.log(item,'item',item.length);
});
},
},
};
</script>
<style scoped>
.box {
display: flex;
}
</style>
Loading…
Cancel
Save