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