|
|
|
@ -74,6 +74,21 @@
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="完成状态" prop="procedureStatus">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.procedureStatus"
|
|
|
|
|
placeholder="请选择单据状态"
|
|
|
|
|
clearable
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in statuslist"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item style="margin-left: 20px">
|
|
|
|
|
<el-button @click="handleQuery" type="primary">
|
|
|
|
|
<Icon icon="ep:search" class="mr-5px" /> 查询
|
|
|
|
@ -81,6 +96,9 @@
|
|
|
|
|
<el-button @click="resetQuery">
|
|
|
|
|
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="danger" @click="openDispatching">
|
|
|
|
|
<Icon icon="ep:refresh" class="mr-5px" /> 批量删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</ContentWrap>
|
|
|
|
@ -93,7 +111,12 @@
|
|
|
|
|
:stripe="true"
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
class="hl-table"
|
|
|
|
|
:row-key="getRowKey"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
@row-click="clickRow"
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column fixed type="selection" width="40" :reserve-selection="true" />
|
|
|
|
|
<el-table-column fixed type="index" width="100" label="序号" align="center" />
|
|
|
|
|
<el-table-column label="派工单号" align="center" prop="dispatchCode" min-width="180">
|
|
|
|
|
<template #default="scope">
|
|
|
|
@ -108,24 +131,18 @@
|
|
|
|
|
prop="projectCode"
|
|
|
|
|
min-width="210"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="产品编码" align="center" prop="materialCode" min-width="180" />
|
|
|
|
|
<el-table-column label="产品名称" align="center" prop="materialName" min-width="220" />
|
|
|
|
|
<el-table-column label="规格型号" align="center" prop="spec" min-width="160" />
|
|
|
|
|
<el-table-column label="生产车间" align="center" prop="workshopName" min-width="160" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
fixed
|
|
|
|
|
label="产品编码"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="materialCode"
|
|
|
|
|
min-width="180"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
fixed
|
|
|
|
|
label="产品名称"
|
|
|
|
|
label="派工工序"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="materialName"
|
|
|
|
|
min-width="220"
|
|
|
|
|
prop="procedureName"
|
|
|
|
|
min-width="160"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="规格型号" align="center" prop="spec" min-width="160" />
|
|
|
|
|
<el-table-column label="生产车间" align="center" prop="workshopName" min-width="160" />
|
|
|
|
|
<el-table-column label="派工工序" align="center" prop="procedureName" min-width="160" />
|
|
|
|
|
<el-table-column label="负责人" align="center" prop="ownerName" min-width="120" />
|
|
|
|
|
<el-table-column fixed label="负责人" align="center" prop="ownerName" min-width="120" />
|
|
|
|
|
<el-table-column label="生产设备" align="center" prop="deviceName" min-width="120" />
|
|
|
|
|
<!-- <el-table-column
|
|
|
|
|
label="预计生产日期"
|
|
|
|
@ -161,7 +178,7 @@
|
|
|
|
|
label="完成状态"
|
|
|
|
|
fixed="right"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="status"
|
|
|
|
|
prop="procedureStatus"
|
|
|
|
|
min-width="100"
|
|
|
|
|
>
|
|
|
|
|
<template #default="scope">
|
|
|
|
@ -222,8 +239,19 @@ const queryParams = reactive({
|
|
|
|
|
spec: undefined,
|
|
|
|
|
workshopId: undefined,
|
|
|
|
|
procedureName: undefined,
|
|
|
|
|
ownerName: undefined
|
|
|
|
|
ownerName: undefined,
|
|
|
|
|
procedureStatus: undefined
|
|
|
|
|
})
|
|
|
|
|
const statuslist = ref([
|
|
|
|
|
{
|
|
|
|
|
label: '未完成',
|
|
|
|
|
value: 1
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '已完成',
|
|
|
|
|
value: 2
|
|
|
|
|
}
|
|
|
|
|
])
|
|
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
|
|
|
|
@ -253,6 +281,61 @@ const resetQuery = () => {
|
|
|
|
|
handleQuery()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const multipleTable = ref<InstanceType<typeof ElTable>>()
|
|
|
|
|
const multipleSelection = ref([])
|
|
|
|
|
const handleSelectionChange = (val: []) => {
|
|
|
|
|
multipleSelection.value = val
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const getRowKey = (row) => {
|
|
|
|
|
return row.id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const clickRow = (row: any) => {
|
|
|
|
|
if (row) {
|
|
|
|
|
multipleTable.value!.toggleRowSelection(row, undefined)
|
|
|
|
|
} else {
|
|
|
|
|
multipleTable.value!.clearSelection()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const clearSelections = (multipleSelection: []) => {
|
|
|
|
|
if (multipleSelection) {
|
|
|
|
|
multipleSelection.forEach((item) => {
|
|
|
|
|
multipleTable.value!.toggleRowSelection(item, undefined)
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
multipleTable.value!.clearSelection()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const Dispatchingref = ref()
|
|
|
|
|
const fuid = ref([])
|
|
|
|
|
const openDispatching = () => {
|
|
|
|
|
if (multipleSelection.value.length === 0) {
|
|
|
|
|
message.warning('请至少选择一条数据')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fuid.value = []
|
|
|
|
|
multipleSelection.value.filter((item) => {
|
|
|
|
|
fuid.value.push(item.dispatchId)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
ElMessageBox.confirm('是否批量删除?', '提示', {
|
|
|
|
|
confirmButtonText: '确认',
|
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
.then(async () => {
|
|
|
|
|
await TaskReportApi.TaskDispatchRemove(fuid.value)
|
|
|
|
|
ElMessage({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '删除成功'
|
|
|
|
|
})
|
|
|
|
|
getList()
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 添加/修改操作 */
|
|
|
|
|
const formRef = ref()
|
|
|
|
|
const openForm = (id?: number, val?: any) => {
|
|
|
|
|