From 9e4be4708bd75502e5695061f6a9c6e43a88e1e7 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Fri, 9 Jan 2026 21:10:57 +0800 Subject: [PATCH 1/3] seo --- package-lock.json | 59 +++++++++++++++++++ public/sysConfig.json | 2 +- .../patientRegister/PatientRegisterEdit.vue | 5 +- .../patientRegister/PatientRegisterItem.vue | 36 ++++++----- src/views/charge/charge.vue | 39 +++++++----- src/views/fee-settings/Asbitem.vue | 43 +++++++------- 6 files changed, 133 insertions(+), 51 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2216ef7..93a6a75 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,6 +15,7 @@ "exceljs": "^4.3.0", "file-saver": "^2.0.5", "html2canvas": "^1.4.1", + "markdown-it": "^14.1.0", "moment": "^2.29.4", "node-polyfill-webpack-plugin": "^2.0.1", "print-js": "^1.6.0", @@ -7934,6 +7935,14 @@ "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dependencies": { + "uc.micro": "^2.0.0" + } + }, "node_modules/listenercount": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/listenercount/-/listenercount-1.0.1.tgz", @@ -8335,6 +8344,38 @@ "node": ">=8" } }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/markdown-it/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/markdown-it/node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmmirror.com/md5.js/-/md5.js-1.3.5.tgz", @@ -8351,6 +8392,11 @@ "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", "dev": true }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz", @@ -10088,6 +10134,14 @@ "node": ">=6" } }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "engines": { + "node": ">=6" + } + }, "node_modules/qrcode": { "version": "1.5.4", "resolved": "https://registry.npmmirror.com/qrcode/-/qrcode-1.5.4.tgz", @@ -11667,6 +11721,11 @@ "resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==" + }, "node_modules/umy-table": { "version": "1.1.8", "resolved": "https://registry.npmmirror.com/umy-table/-/umy-table-1.1.8.tgz", diff --git a/public/sysConfig.json b/public/sysConfig.json index 0864a2d..5964923 100644 --- a/public/sysConfig.json +++ b/public/sysConfig.json @@ -1,5 +1,5 @@ { - "apiurl": "http://192.168.0.188:9527", + "apiurl": "http://192.168.0.188:9530", "softName": "神豚体检管理系统", "pacsApi": "http://192.168.0.188:9530", "dcmViewers": "https://app.mzaktj.com:4436", diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index d4205ea..6cb6aa6 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -208,8 +208,9 @@ + - + @@ -1322,6 +1323,8 @@ export default { // 业务员 {operatorTypes:["1","3"]} postapi('/api/identity/users/GetListByOperatorType', { operatorTypes: ["0", "1", "2", "3", "4"] }) + //roleSysParmId:'sale_role_id' + //postapi('/api/identity/users/GetUserListBySaleRole',{}) .then(res => { if (res.code > -1) { this.dictSalesman = res.data diff --git a/src/components/patientRegister/PatientRegisterItem.vue b/src/components/patientRegister/PatientRegisterItem.vue index 0dbfb37..2871cf3 100644 --- a/src/components/patientRegister/PatientRegisterItem.vue +++ b/src/components/patientRegister/PatientRegisterItem.vue @@ -120,19 +120,19 @@ + :disabled="scope.row.isCharge == 'Y' || scope.row.isDiscount == 'N' ? true : false" /> + :disabled="scope.row.isCharge == 'Y' || scope.row.isDiscount == 'N' ? true : false" /> + :disabled="scope.row.isCharge == 'Y' || scope.row.isDiscount == 'N' ? true : false" /> @@ -601,6 +601,7 @@ export default { discount: 100, amount: 1, total: asbItemChoosed[i].price, + isDiscount:asbItemChoosed[i].isDiscount } // 优化加最上面 //this.dataTransOpts.tableM.register_check_asbitem.push(pojo) @@ -861,10 +862,11 @@ export default { // 未收费,则更新价格 if (this.dataTransOpts.tableM.register_check_asbitem[i].isCharge != 'Y') { this.dataTransOpts.tableM.register_check_asbitem[i].payTypeFlag = payTypeFlag - this.dataTransOpts.tableM.register_check_asbitem[i].amount = tempRd.customerOrgGroupDetailAmount - this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = tempRd.price - this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = tempRd.customerOrgGroupDetailPrice - this.dataTransOpts.tableM.register_check_asbitem[i].discount = tempRd.discount + this.dataTransOpts.tableM.register_check_asbitem[i].amount = e.customerOrgGroupDetailAmount + this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = e.price + this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = e.customerOrgGroupDetailPrice + this.dataTransOpts.tableM.register_check_asbitem[i].discount = e.discount + this.dataTransOpts.tableM.register_check_asbitem[i].isDiscount = e.isDiscount } } else { tempRd = { @@ -878,6 +880,7 @@ export default { payTypeFlag, isCharge: "N", discount: e.discount, + isDiscount:e.isDiscount, amount: e.customerOrgGroupDetailAmount, total: Math.round(e.customerOrgGroupDetailAmount * e.customerOrgGroupDetailPrice * 100) / 100 } @@ -912,10 +915,11 @@ export default { // 未收费,则更新价格 if (this.dataTransOpts.tableM.register_check_asbitem[i].isCharge != 'Y') { this.dataTransOpts.tableM.register_check_asbitem[i].payTypeFlag = payTypeFlag - this.dataTransOpts.tableM.register_check_asbitem[i].amount = tempRd.customerOrgGroupDetailAmount - this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = tempRd.price - this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = tempRd.customerOrgGroupDetailPrice - this.dataTransOpts.tableM.register_check_asbitem[i].discount = tempRd.discount + this.dataTransOpts.tableM.register_check_asbitem[i].amount = e.customerOrgGroupDetailAmount + this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = e.price + this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = e.customerOrgGroupDetailPrice + this.dataTransOpts.tableM.register_check_asbitem[i].discount = e.discount + this.dataTransOpts.tableM.register_check_asbitem[i].isDiscount = e.isDiscount } } else { tempRd = { @@ -929,6 +933,7 @@ export default { payTypeFlag, isCharge: "N", discount: e.discount, + isDiscount: e.isDiscount, amount: e.medicalPackageDetailAmount, total: Math.round(e.medicalPackageDetailAmount * e.medicalPackageDetailPrice * 100) / 100 } @@ -1021,7 +1026,8 @@ export default { let total = Number(0) this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { - if (e.isCharge == 'N') { + // 未收费及允许折扣的项目,才允许修改折扣 + if (e.isCharge == 'N' && e.isDiscount == 'Y') { e.discount = this.discount e.chargePrice = Math.round(e.standardPrice * this.discount) / 100 e.total = Math.round(e.standardPrice * this.discount * e.amount) / 100 @@ -1051,7 +1057,8 @@ export default { let unChargeTotalStand = Number(this.totalStand) //未收费的总标准价 let chargeTotal = Number(0) // this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { - if (e.isCharge == 'Y') { + // 未收费及允许折扣的项目,才允许修改折扣 + if (e.isCharge == 'Y' || e.isDiscount == 'N') { chargeTotal = chargeTotal + Math.round(e.chargePrice * e.amount * 100) / 100 unChargeTotalStand = unChargeTotalStand - Math.round(e.standardPrice * e.amount * 100) / 100 } @@ -1061,7 +1068,8 @@ export default { this.discount = Math.round((100 * total / unChargeTotalStand) * 100) / 100 this.dataTransOpts.tableM.register_check_asbitem.forEach((e, index) => { - if (e.isCharge == 'N') { + // 未收费及允许折扣的项目,才允许修改折扣 + if (e.isCharge == 'N' && e.isDiscount == 'Y') { if (e.amount == 1 && e.standardPrice != 0) qtyIsOneLast = index e.discount = this.discount e.chargePrice = Math.round((e.standardPrice * this.discount / 100) * 100) / 100 diff --git a/src/views/charge/charge.vue b/src/views/charge/charge.vue index ff6bcfa..a0aad2a 100644 --- a/src/views/charge/charge.vue +++ b/src/views/charge/charge.vue @@ -152,12 +152,12 @@ - + - + @@ -231,7 +231,7 @@ {{ scope.row.discount }} @@ -240,7 +240,7 @@ {{ scope.row.chargePrice }} @@ -934,18 +934,21 @@ export default { let lfind = -1; this.selectedData.forEach(e => { totalOri += Number(e.amount * e.chargePriceOri); //原始实收价格 - lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id) + lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id) if (lfind > -1 && e.chargePriceOri != 0) { - e.chargePrice = Math.round(e.chargePriceOri * discount) / 100; - e.discount = Math.round(10000 * e.chargePrice / e.standardPrice) / 100; + // 允许折扣的项目,才可以调整折扣 + if(e.isDiscount == 'Y'){ + e.chargePrice = Math.round(e.standardPrice * discount) / 100; + e.discount = discount; + } totalCompute += Math.round(e.chargePrice * e.amount * 100) / 100; } }); - totalPlan = Math.round(totalOri * discount) / 100; + totalPlan = Math.round(totalCompute * 100) / 100; this.form.total = totalPlan; //this.form.preTotal = totalPlan; //明细和与总金额不符处理 - this.handleBalance(totalPlan, totalCompute); + // this.handleBalance(totalPlan, totalCompute); 通过折扣计算时,无需处理 this.findBalance() }, @@ -954,22 +957,29 @@ export default { totalToDetails() { let discount = 100; let totalOri = 0, totalCompute = 0, totalPlan = Number(this.form.total); + let totalUnDiscount = 0 // 不允许折扣的金额 let lfind = -1; this.selectedData.forEach(e => { - totalOri += Math.round(100 * e.amount * e.chargePriceOri) / 100; //原始实收价格 + totalOri += Math.round(100 * e.amount * e.standardPrice) / 100; //原始实收价格 + if(e.isDiscount == 'N'){ + totalUnDiscount += Math.round(100 * e.amount * e.standardPrice) / 100; //不允许折扣的金额 + } }); if (totalOri != 0) { - discount = Math.round(10000 * totalPlan / totalOri) / 100; + discount = Math.round(10000 * (totalPlan - totalUnDiscount) / (totalOri - totalUnDiscount)) / 100; this.form.discount = discount; } + // this.selectedData.forEach(e => { lfind = arrayExistObj(this.asbItemsForFee, 'id', e.id); if (lfind > -1) { - e.chargePrice = Math.round(e.chargePriceOri * discount) / 100; - e.discount = Math.round(10000 * e.chargePrice / e.standardPrice) / 100; + if(e.isDiscount == 'Y'){ + e.chargePrice = Math.round(e.standardPrice * discount) / 100; + e.discount = discount; + } totalCompute += Math.round(100 * e.chargePrice * e.amount) / 100; } }); @@ -992,7 +1002,8 @@ export default { // break; // } //console.log('this.selectedData[i].amount', this.selectedData[i].amount) - if (this.selectedData[i].amount == 1) { + // 允许折扣的项目,才可以调整折扣 + if (this.selectedData[i].amount == 1 && this.selectedData[i].isDiscount == 'Y') { let chargePrice = this.selectedData[i].chargePrice this.selectedData[i].chargePrice = Math.round((Number(chargePrice) + Number(totalPlan) - totalCompute)*100)/100 ; this.selectedData[i].discount = Math.round(this.selectedData[i].chargePrice * 10000/this.selectedData[i].standardPrice)/100 diff --git a/src/views/fee-settings/Asbitem.vue b/src/views/fee-settings/Asbitem.vue index 5a79641..1cff506 100644 --- a/src/views/fee-settings/Asbitem.vue +++ b/src/views/fee-settings/Asbitem.vue @@ -89,14 +89,14 @@ @row-click="rowick" @row-dblclick="dblClick" highlight-current-row - :row-style="{ height: '36px' }" - ref="tableData" + :row-style="{ height: '28px' }" + ref="tableData" border > - + - + - + - + {{ scope.row.creationTime | dateFormat }} @@ -154,7 +154,7 @@ {{ scope.row.lastModificationTime | dateFormat }} @@ -622,7 +622,7 @@ > - + - + + + + + + @@ -732,16 +741,7 @@ - - + Date: Fri, 9 Jan 2026 21:21:37 +0800 Subject: [PATCH 2/3] seo --- .../patientRegister/PatientRegisterItem.vue | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterItem.vue b/src/components/patientRegister/PatientRegisterItem.vue index 2871cf3..8185d55 100644 --- a/src/components/patientRegister/PatientRegisterItem.vue +++ b/src/components/patientRegister/PatientRegisterItem.vue @@ -857,16 +857,16 @@ export default { this.groupAsbs.forEach(e => { lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.asbitemId) if (lfind > -1) { - this.dataTransOpts.tableM.register_check_asbitem[i].groupPackageId = newId - this.dataTransOpts.tableM.register_check_asbitem[i].isBelongGroupPackage = 'Y' + this.dataTransOpts.tableM.register_check_asbitem[lfind].groupPackageId = newId + this.dataTransOpts.tableM.register_check_asbitem[lfind].isBelongGroupPackage = 'Y' // 未收费,则更新价格 - if (this.dataTransOpts.tableM.register_check_asbitem[i].isCharge != 'Y') { - this.dataTransOpts.tableM.register_check_asbitem[i].payTypeFlag = payTypeFlag - this.dataTransOpts.tableM.register_check_asbitem[i].amount = e.customerOrgGroupDetailAmount - this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = e.price - this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = e.customerOrgGroupDetailPrice - this.dataTransOpts.tableM.register_check_asbitem[i].discount = e.discount - this.dataTransOpts.tableM.register_check_asbitem[i].isDiscount = e.isDiscount + if (this.dataTransOpts.tableM.register_check_asbitem[lfind].isCharge != 'Y') { + this.dataTransOpts.tableM.register_check_asbitem[lfind].payTypeFlag = payTypeFlag + this.dataTransOpts.tableM.register_check_asbitem[lfind].amount = e.customerOrgGroupDetailAmount + this.dataTransOpts.tableM.register_check_asbitem[lfind].standardPrice = e.price + this.dataTransOpts.tableM.register_check_asbitem[lfind].chargePrice = e.customerOrgGroupDetailPrice + this.dataTransOpts.tableM.register_check_asbitem[lfind].discount = e.discount + this.dataTransOpts.tableM.register_check_asbitem[lfind].isDiscount = e.isDiscount } } else { tempRd = { @@ -910,16 +910,16 @@ export default { this.packageAsbs.forEach(e => { lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.id) if (lfind > -1) { - this.dataTransOpts.tableM.register_check_asbitem[i].groupPackageId = newId - this.dataTransOpts.tableM.register_check_asbitem[i].isBelongGroupPackage = 'Y' + this.dataTransOpts.tableM.register_check_asbitem[lfind].groupPackageId = newId + this.dataTransOpts.tableM.register_check_asbitem[lfind].isBelongGroupPackage = 'Y' // 未收费,则更新价格 - if (this.dataTransOpts.tableM.register_check_asbitem[i].isCharge != 'Y') { - this.dataTransOpts.tableM.register_check_asbitem[i].payTypeFlag = payTypeFlag - this.dataTransOpts.tableM.register_check_asbitem[i].amount = e.customerOrgGroupDetailAmount - this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = e.price - this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = e.customerOrgGroupDetailPrice - this.dataTransOpts.tableM.register_check_asbitem[i].discount = e.discount - this.dataTransOpts.tableM.register_check_asbitem[i].isDiscount = e.isDiscount + if (this.dataTransOpts.tableM.register_check_asbitem[lfind].isCharge != 'Y') { + this.dataTransOpts.tableM.register_check_asbitem[lfind].payTypeFlag = payTypeFlag + this.dataTransOpts.tableM.register_check_asbitem[lfind].amount = e.customerOrgGroupDetailAmount + this.dataTransOpts.tableM.register_check_asbitem[lfind].standardPrice = e.price + this.dataTransOpts.tableM.register_check_asbitem[lfind].chargePrice = e.customerOrgGroupDetailPrice + this.dataTransOpts.tableM.register_check_asbitem[lfind].discount = e.discount + this.dataTransOpts.tableM.register_check_asbitem[lfind].isDiscount = e.isDiscount } } else { tempRd = { From 74d27bbac9d2cd351c122dd45ac30f59a2452544 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Sat, 10 Jan 2026 11:44:25 +0800 Subject: [PATCH 3/3] seo --- src/components/report/TurnoverReport.vue | 14 ++- .../customerOrg/patientRegisterImport.vue | 87 +++++++++++-------- 2 files changed, 65 insertions(+), 36 deletions(-) diff --git a/src/components/report/TurnoverReport.vue b/src/components/report/TurnoverReport.vue index 9bbf247..6e3d39c 100644 --- a/src/components/report/TurnoverReport.vue +++ b/src/components/report/TurnoverReport.vue @@ -37,6 +37,10 @@ 包含预登记 + + 显示子单位 + + @@ -48,7 +52,12 @@ - + + + {{ query.isChild == 'Y' ? scope.row.customerOrgName + (scope.row.departmentName && scope.row.customerOrgName != scope.row.departmentName ? '--'+scope.row.departmentName:''):scope.row.customerOrgName}} + + + @@ -89,7 +98,8 @@ export default { customerOrgIds: [], // medicalTypeIds: [], // isMedicalTypeId: 'Y', - isPreRegistration:'N' + isPreRegistration:'N', + isChild:'Y', }, tableData: [], diff --git a/src/views/customerOrg/patientRegisterImport.vue b/src/views/customerOrg/patientRegisterImport.vue index 8f01833..f101150 100644 --- a/src/views/customerOrg/patientRegisterImport.vue +++ b/src/views/customerOrg/patientRegisterImport.vue @@ -1271,7 +1271,29 @@ export default { // 导入必填项验证 checkValide(body){ let msg = '' - // personnelTypeName,medicalTypeName,salesman + // patientName,personnelTypeName,medicalTypeName,salesman + let keys = Object.keys(this.masterCols) + for (let i = 0; i < keys.length; i++) { + const key = keys[i]; + switch (key) { + case 'patientName': + case 'name': + if(!body.patientName) msg = this.masterCols[key] + ' 未填值' + break; + case 'medicalTypeId': //体检类别 + if(!body.medicalTypeName) msg = this.masterCols[key] + ' 未填值' + break; + case 'personnelTypeId': //人员类别 + if(!body.personnelTypeName) msg = this.masterCols[key] + ' 未填值' + break; + case 'salesman': //介绍人 + if(!body.salesman) msg = this.masterCols[key] + ' 未填值' + break; + default: + break; + } + if(msg) break; + } return msg }, @@ -1292,47 +1314,44 @@ export default { console.log(`this.choosedData[${i}],startRowNameType,body`) // 判断是否必填: - let msg = checkValide(body) + let msg = this.checkValide(body) if(msg){ this.tableData.push(Object.assign({ importState: '导入失败', importDes: msg }, this.choosedData[i])) - continue - } - - try { - // 同一人判断 - if (this.choosedSameMan.patientNo) { - // 上一次循环已经判断是否同一人,此次循环不需再判断了 - if (this.choosedSameMan.patientNo == '$newPatient$') { - body.nameType = '3' - } else { - body.patientNo = this.choosedSameMan.patientNo - } - } else if (startRowNameType != '3') { - let result = await this.isSamePatient(startRowNameType, body) - if (result.isContinue) { - if (result.err) { - this.tableData.push(Object.assign({ importState: '导入失败', importDes: result.err }, this.choosedData[i])) - continue + }else{ + try { + // 同一人判断 + if (this.choosedSameMan.patientNo) { + // 上一次循环已经判断是否同一人,此次循环不需再判断了 + if (this.choosedSameMan.patientNo == '$newPatient$') { + body.nameType = '3' + } else { + body.patientNo = this.choosedSameMan.patientNo + } + } else if (startRowNameType != '3') { + let result = await this.isSamePatient(startRowNameType, body) + if (result.isContinue) { + if (result.err) { + this.tableData.push(Object.assign({ importState: '导入失败', importDes: result.err }, this.choosedData[i])) + } + } else { + this.dataImportOpts.startRow = i + break; // 跳出循环,重新从 i 开执行 this.importing } - } else { - this.dataImportOpts.startRow = i - break; // 跳出循环,重新从 i 开执行 this.importing } - } - // 旧接口:/api/app/patientregister/createpatientregisterexcel - let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromExcel', body) - this.choosedSameMan = {} // 清除选择同一人员的记录 - if (res.code >= 0) { - this.tableData.push(Object.assign({ importState: '导入成功' }, this.choosedData[i])) - } else { - this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.choosedData[i])) + // 旧接口:/api/app/patientregister/createpatientregisterexcel + let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromExcel', body) + this.choosedSameMan = {} // 清除选择同一人员的记录 + if (res.code >= 0) { + this.tableData.push(Object.assign({ importState: '导入成功' }, this.choosedData[i])) + } else { + this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.choosedData[i])) + } + } catch (error) { + this.tableData.push(Object.assign({ importState: '导入失败', importDes: `${error}` }, this.choosedData[i])) } - } catch (error) { - this.tableData.push(Object.assign({ importState: '导入失败', importDes: `${error}` }, this.choosedData[i])) } - // 结束导入 if (i == this.choosedData.length - 1) { this.elProgress.display = false;