|
@@ -11,7 +11,15 @@
|
|
|
@search-reset="resetChange"
|
|
|
@size-change="dataList"
|
|
|
@current-change="dataList"
|
|
|
+ @selection-change="selectionChange1"
|
|
|
>
|
|
|
+ <template #menu-left="{}">
|
|
|
+ <el-button
|
|
|
+ :disabled="toDeleteIds.length < 1"
|
|
|
+ class="ml-3"
|
|
|
+ @click="printCode">打印
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
<template #menu-right="{}">
|
|
|
<el-dropdown split-button
|
|
|
>导入
|
|
@@ -35,7 +43,25 @@
|
|
|
<template #icon> <i-ep-download /> </template>导出
|
|
|
</el-button>
|
|
|
</template>
|
|
|
+
|
|
|
</avue-crud>
|
|
|
+ <el-dialog
|
|
|
+ v-model="dialog.visible"
|
|
|
+ :title="dialog.title"
|
|
|
+ width="1250px"
|
|
|
+ @close="dialog.visible = false"
|
|
|
+ >
|
|
|
+ <div style="display: flex;flex-wrap: wrap;" ref="toPrintRef">
|
|
|
+ <div v-for="item of toDeleteIds" style="width: 200px;height:220px;">
|
|
|
+ <vue-qrcode :value="item.seqNo" size="45" error-level="H"></vue-qrcode>
|
|
|
+ <div style="font-size:14px;">{{item.seqNo}}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="dialog-footer" align="center">
|
|
|
+ <el-button @click="dialog.visible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="printPage">打印</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<ExcelUpload ref="uploadRef" @finished="uploadFinished" />
|
|
|
</div>
|
|
|
</template>
|
|
@@ -43,7 +69,9 @@
|
|
|
import {defineProps, ref} from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
import { useCommonStoreHook } from "@/store";
|
|
|
+import { html2CanvasPrint } from "@/utils/common";
|
|
|
const { isShowTable, tableType } = toRefs(useCommonStoreHook());
|
|
|
+const toPrintRef = ref(null);
|
|
|
const test = () => {
|
|
|
isShowTable.value = true;
|
|
|
tableType.value = tableType.value == 1 ? 2 : 1;
|
|
@@ -56,6 +84,16 @@ const props = defineProps({
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+const printPage = ()=>{
|
|
|
+ html2CanvasPrint(toPrintRef.value);
|
|
|
+}
|
|
|
+const dialog = reactive({
|
|
|
+ title: "二维码打印",
|
|
|
+ visible: false,
|
|
|
+});
|
|
|
+const selectionChange1 =(row)=>{
|
|
|
+ toDeleteIds.value = row
|
|
|
+}
|
|
|
watch(
|
|
|
() => props.workOrderCode,
|
|
|
() => {
|
|
@@ -73,11 +111,18 @@ const { selectionChange, multipleDelete } = Methords; //选中和批量删除事
|
|
|
const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
|
|
|
+const printCode = () =>{
|
|
|
+ dialog.visible = true
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
// 设置表格列或者其他自定义的option
|
|
|
option.value = Object.assign(option.value, {
|
|
|
delBtn: false,
|
|
|
- selection: false,
|
|
|
+ selection: true,
|
|
|
search: false,
|
|
|
+ filterBtn: false,
|
|
|
+ columnBtn: false,
|
|
|
editBtn: false,
|
|
|
addBtn: false,
|
|
|
viewBtn: false,
|
|
@@ -86,6 +131,7 @@ option.value = Object.assign(option.value, {
|
|
|
{
|
|
|
label: "流转卡号",
|
|
|
prop: "seqNo",
|
|
|
+ width: 220,
|
|
|
search: true,
|
|
|
overHidden: true,
|
|
|
},
|
|
@@ -104,7 +150,7 @@ option.value = Object.assign(option.value, {
|
|
|
{
|
|
|
label: "状态",
|
|
|
prop: "state",
|
|
|
- minWidth: 100,
|
|
|
+ minWidth: 60,
|
|
|
type: "select",
|
|
|
dicData: [{label: '正常',value: 0},{label: '冻结',value: 1},{label: '完成',value: 2}],
|
|
|
},
|