生产任务派工单打印包装条码

dev
qiuhongwu 5 months ago
parent 79e5cc7962
commit 76f3045b7e

@ -44,13 +44,19 @@
<el-button @click="resetQuery">
<Icon icon="ep:refresh" class="mr-5px" /> 重置
</el-button>
<el-button type="success" @click="handlePrint">
打印包装条码
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table">
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table" @selection-change="handleSelectionChange"
@row-click="clickRow" ref="multipleTable" selection>
<!-- 选择框 -->
<el-table-column type="selection" width="55" align="left" />
<el-table-column fixed type="index" min-width="70" label="序号" align="center" />
<el-table-column fixed label="生产派工单号" align="center" prop="code" min-width="195">
<template #default="scope">
@ -101,6 +107,7 @@
</ContentWrap>
</el-card>
<ProductProcessPrint ref="printref" />
</template>
<script setup lang="ts">
@ -110,6 +117,8 @@ import download from '@/utils/download'
import * as TaskDispatchApi from '@/api/biz/taskdispatch'
import { useCommonStore } from '@/store/modules/common'
import { useUserStore } from '@/store/modules/user'
import ProductProcessPrint from './ProductProcessPrint.vue'
import { ElTable } from 'element-plus'
defineOptions({ name: 'TaskDispatch' })
@ -161,12 +170,38 @@ const handleQuery = () => {
getList()
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
//
const multipleTable = ref<InstanceType<typeof ElTable>>()
const multipleSelection = ref([])
const handleSelectionChange = (val: []) => {
multipleSelection.value = val
}
const clickRow = (row: any) => {
if(row){
multipleTable.value!.toggleRowSelection(row, undefined)
}else{
multipleTable.value!.clearSelection()
}
}
const printref =ref<ProductProcessPrint>()
const handlePrint =()=>{
if (multipleSelection.value.length === 0) {
message.warning('请至少选择一条数据')
return
}
printref.value.open(multipleSelection.value)
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {

Loading…
Cancel
Save