diff --git a/src/api/mzcx/cydj.js b/src/api/mzcx/cydj.js index dc43b77..dccfefb 100644 --- a/src/api/mzcx/cydj.js +++ b/src/api/mzcx/cydj.js @@ -31,10 +31,10 @@ export function queryPatList() { }) } -// 新增采样登记 -export function addReqmain(data) { +// 打印回单 +export function printBackpaper(data) { return request({ - url: '/system/reqmain', + url: '/mzcx/printBackpaper', method: 'post', data: data }) diff --git a/src/views/mzcx/cydj/index.vue b/src/views/mzcx/cydj/index.vue index 8ba5e48..93c1ae2 100644 --- a/src/views/mzcx/cydj/index.vue +++ b/src/views/mzcx/cydj/index.vue @@ -45,7 +45,7 @@ - + 单打条码 @@ -81,7 +81,7 @@ plain icon="Printer" :disabled="freesingle" - @click="printBackpaper" + @click="printBack" v-hasPermi="['system:reqmain:edit']" >单打回单 @@ -94,10 +94,9 @@ v-hasPermi="['system:reqmain:export']" >取消采样 - - - + + @@ -145,6 +144,7 @@ +
@@ -160,6 +160,7 @@ {{ totalPrice.toFixed(2) }}
+ @@ -167,7 +168,7 @@ import { querySQD, queryPatList, - printBarcode, + printBackpaper, printBarcodeall } from "@/api/mzcx/cydj.js"; import PatSearchDialog from './components/OutPatList.vue' @@ -289,7 +290,7 @@ function getSubday() { } /** 查询采样登记列表 */ function getList() { - + freesingle.value=true; if(isEmptyData(queryParams.value.brdh)) proxy.$modal.alert("请刷卡或输入门诊号!"); else { loading.value = true; @@ -392,8 +393,12 @@ function handleSelectionChange(selection) { /** 打印选择 */ function printAll(row) { - console.log('idsnew:', idsnew.value); - if (idsnew.value.length=== 0) { + printSigne(); + printBack(); +} +/** 单打条码*/ +function printSigne(row) { + if (idsnew.value.length === 0) { return; } printBarcodeall(idsnew.value).then(response => { @@ -403,26 +408,14 @@ function printAll(row) { }).catch(() => { }); } -/** 单打条码*/ -function printSigne(row) { - if (idsnew.value.length === 0) { - return; - } - apiprintAll(idsnew.value).then(response => { - proxy.$modal.msgSuccess("打印成功"); - open.value = false; - freesingle.value=false; - }).catch(() => { - }); -} /** 打印回单 */ -function printBackpaper(row) { +function printBack(row) { if (idsnew.value.length === 0) { return; } - apiprintAll(idsnew.value).then(response => { + printBackpaper(idsnew.value).then(response => { proxy.$modal.msgSuccess("打印成功"); open.value = false; }).catch(() => { @@ -515,6 +508,26 @@ const getContrastTextColor = (bgColor) => {