完工汇报导出 工位改为单选
This commit is contained in:
parent
45815cb602
commit
852d93e6fd
@ -29,7 +29,7 @@ export interface SubmitLog {
|
||||
// 派工工单汇报记录 API
|
||||
export const submitLogApi = {
|
||||
// 分页查询
|
||||
page(params: { page: number; pageSize: number; assingStatus?: number }) {
|
||||
page(params: { page: number; pageSize: number; submitStatus?: number }) {
|
||||
return request({ url: '/mes/report/page', method: 'get', params })
|
||||
},
|
||||
|
||||
@ -58,7 +58,7 @@ export const submitLogApi = {
|
||||
const p: Record<string, any> = {}
|
||||
if (params?.ids?.length) p.ids = params.ids.join(',')
|
||||
if (params?.id !== undefined && params?.id !== null) p.id = params.id
|
||||
return request({ url: `/biz/submitLog/export`, method: 'get', params: p, responseType: 'blob' })
|
||||
return request({ url: `/mes/report/export`, method: 'get', params: p, responseType: 'blob' })
|
||||
},
|
||||
|
||||
// 导入
|
||||
|
||||
@ -402,7 +402,7 @@ const dispatchLoading = ref(false)
|
||||
const dispatchformRef = ref()
|
||||
const dispatchform = reactive<any>({
|
||||
id: '', name: '', beginTime: '', endTime: '', quantity: '',
|
||||
list: [{ sectionId:'',deviceList:'',userList: '', quantity: '' }],
|
||||
list: [{ sectionId:'',deviceId:'',userList: '', quantity: '' }],
|
||||
})
|
||||
const dispatchrules = {}
|
||||
|
||||
@ -608,11 +608,11 @@ function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) {
|
||||
dispatchform.quantity = entity.quantity
|
||||
dispatchform.orderItemId = entity.orderItemId
|
||||
dispatchform.sort = entity.sort
|
||||
dispatchform.list = [{ sectionId:'',deviceList:'',userList: '', quantity: '' }]
|
||||
dispatchform.list = [{ sectionId:'',deviceId:'',userList: '', quantity: '' }]
|
||||
}
|
||||
|
||||
function addpgnum() {
|
||||
dispatchform.list.push({ sectionId:'',deviceList:'',userList: '', quantity: '' })
|
||||
dispatchform.list.push({ sectionId:'',deviceId:'',userList: '', quantity: '' })
|
||||
}
|
||||
|
||||
function deletenum(index: number) {
|
||||
|
||||
@ -27,28 +27,19 @@
|
||||
<n-gi :span="10">
|
||||
<n-form-item
|
||||
label="指派工位"
|
||||
:path="`${listname}[${index}].deviceList`"
|
||||
:path="`${listname}[${index}].deviceId`"
|
||||
:rule="{
|
||||
required:true,
|
||||
message:`请选择工位`,
|
||||
trigger: 'blur',
|
||||
validator: (rule, value, callback) => {
|
||||
// value 多选为数组,单选是单个值
|
||||
if (!Array.isArray(value) || value.length === 0) {
|
||||
callback(new Error('请选择工位'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
trigger: 'blur'
|
||||
}"
|
||||
>
|
||||
<n-select
|
||||
v-model:value="obj.deviceList"
|
||||
v-model:value="obj.deviceId"
|
||||
filterable
|
||||
placeholder="请选择工位"
|
||||
:options="deviceList"
|
||||
:loading="loadingRef"
|
||||
multiple
|
||||
clearable
|
||||
remote
|
||||
:clear-filter-after-select="false"
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
<!-- 搜索表单 -->
|
||||
<div class="search-form">
|
||||
<n-form inline :model="searchForm" label-placement="left">
|
||||
<n-form-item label="派工状态">
|
||||
<n-form-item label="汇报状态">
|
||||
<n-select
|
||||
v-model:value="searchForm.assingStatus"
|
||||
:options="qcAssingStatusOptions"
|
||||
v-model:value="searchForm.submitStatus"
|
||||
:options="submitStatusOptions"
|
||||
placeholder="请选择派工状态"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@ -35,14 +35,15 @@
|
||||
<template #icon></template>
|
||||
汇报统计
|
||||
</n-button>
|
||||
<!-- <n-button @click="importModalVisible = true">
|
||||
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
|
||||
导入
|
||||
</n-button>
|
||||
<n-button @click="handleExport">
|
||||
<template #icon><n-icon><DownloadOutline /></n-icon></template>
|
||||
导出{{ selectedIds.length > 0 ? `(${selectedIds.length})` : '' }}
|
||||
</n-button>
|
||||
<!-- <n-button @click="importModalVisible = true">
|
||||
<template #icon><n-icon><CloudUploadOutline /></n-icon></template>
|
||||
导入
|
||||
</n-button>
|
||||
|
||||
<n-button type="error" :disabled="selectedIds.length === 0" @click="handleBatchDelete">
|
||||
<template #icon><n-icon><TrashOutline /></n-icon></template>
|
||||
删除
|
||||
@ -211,7 +212,7 @@ const pagination = reactive({
|
||||
// 搜索表单
|
||||
const searchForm = reactive({
|
||||
page:pagination.page as number,
|
||||
assingStatus:undefined
|
||||
submitStatus:undefined
|
||||
})
|
||||
|
||||
// 弹窗
|
||||
@ -243,7 +244,6 @@ const formRules = {
|
||||
|
||||
// 表格列
|
||||
const columns: DataTableColumns<SubmitLog> = [
|
||||
{ type: 'selection' },
|
||||
{ title: '物料名称', key: 'materialName',align: 'center',
|
||||
render(rowData, rowIndex) {
|
||||
return rowData.materialName? rowData.materialName: '-'
|
||||
@ -299,7 +299,7 @@ async function loadData() {
|
||||
const res = await submitLogApi.page({
|
||||
page: pagination.page,
|
||||
pageSize: pagination.pageSize,
|
||||
assingStatus: searchForm.assingStatus
|
||||
submitStatus: searchForm.submitStatus
|
||||
})
|
||||
tableData.value = res.list
|
||||
pagination.itemCount = res.total
|
||||
@ -318,7 +318,7 @@ function handleSearch() {
|
||||
|
||||
// 重置
|
||||
function handleReset() {
|
||||
searchForm.assingStatus = undefined
|
||||
searchForm.submitStatus = undefined
|
||||
|
||||
handleSearch()
|
||||
}
|
||||
@ -423,7 +423,7 @@ async function handleExport() {
|
||||
try {
|
||||
const params: Record<string, any> = {}
|
||||
if (selectedIds.value.length > 0) params.ids = selectedIds.value
|
||||
if (searchForm.assingStatus != null) params.id = searchForm.assingStatus
|
||||
if (searchForm.submitStatus != null) params.id = searchForm.submitStatus
|
||||
const blob = await submitLogApi.export(params)
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user