|
@@ -18,6 +18,7 @@
|
|
></el-input>
|
|
></el-input>
|
|
<el-divider direction="vertical" />
|
|
<el-divider direction="vertical" />
|
|
<el-button icon="Search" type="primary" @click="queryList">查询</el-button>
|
|
<el-button icon="Search" type="primary" @click="queryList">查询</el-button>
|
|
|
|
+ <el-button icon="Upload" type="primary" @click="beforeExtract">提取到体检</el-button>
|
|
</header>
|
|
</header>
|
|
<div class="layout_main layout_container layout-horizontal">
|
|
<div class="layout_main layout_container layout-horizontal">
|
|
<aside class="layout_el-table">
|
|
<aside class="layout_el-table">
|
|
@@ -42,11 +43,19 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+<!-- <div style="position:absolute; top:0; left: 0;right: 0;bottom: 0;background-color: white;z-index: 999">-->
|
|
|
|
+<!-- <AdiconItemMatch />-->
|
|
|
|
+<!-- </div>-->
|
|
|
|
+
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import useDateRange from "@/utils/cy-use/useDateRange";
|
|
import useDateRange from "@/utils/cy-use/useDateRange";
|
|
-import {getByteReport, getReportList} from "@/api/inspections";
|
|
|
|
|
|
+import {getByteReport, getReportItems, getReportList, getUnMatchedList, saveToTjResult} from "@/api/inspections/adicon";
|
|
|
|
+import AdiconItemMatch from "@/views/examination/component/AdiconItemMatch.vue";
|
|
|
|
+import useDialogToJs from "@/components/js-dialog-comp/useDialogToJs";
|
|
|
|
+import {xcMessage} from "@/utils/xiaochan-element-plus";
|
|
|
|
|
|
const {CyDateRange, dateRange} = useDateRange({aFewDaysAgo: 3, clearable: false})
|
|
const {CyDateRange, dateRange} = useDateRange({aFewDaysAgo: 3, clearable: false})
|
|
|
|
|
|
@@ -87,20 +96,9 @@ function queryList() {
|
|
}
|
|
}
|
|
|
|
|
|
const pdfSrc = ref('')
|
|
const pdfSrc = ref('')
|
|
|
|
+const currentRow = ref({})
|
|
function handleClickRow(row) {
|
|
function handleClickRow(row) {
|
|
- // let barcode = row.customerBarcode
|
|
|
|
- // inquiry.barcodeType = 'CUSTOMER'
|
|
|
|
- // if (!barcode || barcode.length < 5) {
|
|
|
|
- // barcode = row.adiconBarcode
|
|
|
|
- // inquiry.barcodeType = 'ADICON'
|
|
|
|
- // }
|
|
|
|
- // inquiry.barcode = barcode
|
|
|
|
- // inquiry.reportType = row.reportType
|
|
|
|
- // inquiry.key = key.value
|
|
|
|
- // getReportItems(inquiry).then(res => {
|
|
|
|
- // console.log(res)
|
|
|
|
- // })
|
|
|
|
-
|
|
|
|
|
|
+ currentRow.value = row
|
|
inquiry.key = key.value
|
|
inquiry.key = key.value
|
|
inquiry.id = row.id
|
|
inquiry.id = row.id
|
|
getByteReport(inquiry).then(res => {
|
|
getByteReport(inquiry).then(res => {
|
|
@@ -129,6 +127,51 @@ function filterReportTime(time) {
|
|
return time.split('.')[0].replace('T', ' ')
|
|
return time.split('.')[0].replace('T', ' ')
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const reportList = ref([])
|
|
|
|
+function beforeExtract() {
|
|
|
|
+ let barcode = currentRow.value.customerBarcode
|
|
|
|
+ inquiry.barcodeType = 'CUSTOMER'
|
|
|
|
+ if (!barcode || barcode.length < 5) {
|
|
|
|
+ barcode = currentRow.value.adiconBarcode
|
|
|
|
+ inquiry.barcodeType = 'ADICON'
|
|
|
|
+ }
|
|
|
|
+ inquiry.barcode = barcode
|
|
|
|
+ inquiry.reportType = currentRow.value.reportType
|
|
|
|
+ inquiry.key = key.value
|
|
|
|
+ getReportItems(inquiry).then(res => {
|
|
|
|
+ reportList.value = res
|
|
|
|
+ checkMatchState(res)
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function checkMatchState(list) {
|
|
|
|
+ console.log(list)
|
|
|
|
+ const params = []
|
|
|
|
+ list.forEach(item => {
|
|
|
|
+ params.push({ itemCode: item.itemCode, itemName: item.itemNameCN})
|
|
|
|
+ })
|
|
|
|
+ params.push({itemCode: '000', itemName:'肝脏脂肪衰减值'})
|
|
|
|
+ getUnMatchedList(params).then(res => {
|
|
|
|
+ if (res.length === 0) {
|
|
|
|
+ extractDataToTj()
|
|
|
|
+ } else {
|
|
|
|
+ useDialogToJs(AdiconItemMatch, {
|
|
|
|
+ rawItems: res
|
|
|
|
+ }).then(() => {
|
|
|
|
+ extractDataToTj()
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ console.log('adicon match canceled.')
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function extractDataToTj() {
|
|
|
|
+ saveToTjResult(reportList.value).then(res => {
|
|
|
|
+ xcMessage.success(res)
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
// adiconLogin().then(res => {
|
|
// adiconLogin().then(res => {
|
|
// jyKey.value = res.jyKey
|
|
// jyKey.value = res.jyKey
|