|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
<template>
|
|
|
|
|
<el-card class="hl-card">
|
|
|
|
|
<template #header>
|
|
|
|
|
<span>领料审核</span>
|
|
|
|
|
<span>出库审核</span>
|
|
|
|
|
</template>
|
|
|
|
|
<ContentWrap class="borderxx">
|
|
|
|
|
<!-- 搜索工作栏 -->
|
|
|
|
@ -40,14 +40,14 @@
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料名称" prop="matName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.matName"
|
|
|
|
|
placeholder="物料名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.matName"
|
|
|
|
|
placeholder="物料名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter="handleQuery"
|
|
|
|
|
class="!w-240px"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="出库类型" prop="stockInType">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.stockInType"
|
|
|
|
@ -85,8 +85,10 @@
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item style="margin-left:15px">
|
|
|
|
|
<el-button @click="handleQuery" type="primary"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
|
|
|
|
|
<el-form-item style="margin-left: 15px">
|
|
|
|
|
<el-button @click="handleQuery" type="primary"
|
|
|
|
|
><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
|
|
|
|
|
<!-- <el-button type="primary" plain @click="openDetail('create')">
|
|
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
|
|
|
@ -100,19 +102,31 @@
|
|
|
|
|
>
|
|
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
|
|
</el-button> -->
|
|
|
|
|
<el-button @click="openDispatching" type="success"> 打印 </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"
|
|
|
|
|
:row-key="getRowKey"
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
@row-click="clickRow"
|
|
|
|
|
ref="multipleTable"
|
|
|
|
|
>
|
|
|
|
|
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
|
|
|
|
<el-table-column fixed type="selection" width="40" :reserve-selection="true" />
|
|
|
|
|
<el-table-column type="index" width="100" fixed label="序号" align="center" />
|
|
|
|
|
<el-table-column label="出库单号" align="center" prop="stockNo" fixed min-width="220" >
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button text type="primary" @click="openDetail('review',scope.row.id)">
|
|
|
|
|
{{scope.row.stockNo}}
|
|
|
|
|
<el-table-column label="出库单号" align="center" prop="stockNo" fixed min-width="220">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button text type="primary" @click="openDetail('review', scope.row.id)">
|
|
|
|
|
{{ scope.row.stockNo }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -121,13 +135,18 @@
|
|
|
|
|
<dict-tag :type="DICT_TYPE.BIZ_STORAGE_OUT_TYPE" :value="scope.row.stockInType" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="生产订单号" align="center" prop="projectOrderCode" min-width="180" />
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="生产订单号"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="projectOrderCode"
|
|
|
|
|
min-width="180"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="出库仓库" align="center" prop="whId" min-width="140">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
{{ warehouseList.find((tag) => tag.id === scope.row.whId)?.whName }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="备注" align="center" prop="description" min-width="120"/>
|
|
|
|
|
<el-table-column label="备注" align="center" prop="description" min-width="120" />
|
|
|
|
|
<el-table-column label="创建人" align="center" prop="creator" min-width="120">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
{{ userList.find((user) => user.id === scope.row.creator)?.nickname }}
|
|
|
|
@ -165,19 +184,28 @@
|
|
|
|
|
:formatter="dateFormatter"
|
|
|
|
|
min-width="240"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="单据状态" align="center" prop="status" min-width="120" fixed="right">
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="单据状态"
|
|
|
|
|
align="center"
|
|
|
|
|
prop="status"
|
|
|
|
|
min-width="120"
|
|
|
|
|
fixed="right"
|
|
|
|
|
>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<dict-tag :type="DICT_TYPE.BIZ_STORAGE_STATUS" :value="scope.row.status" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="right" width="180" fixed="right">
|
|
|
|
|
<template #header>
|
|
|
|
|
<span style="margin-right:35%">
|
|
|
|
|
操作
|
|
|
|
|
</span>
|
|
|
|
|
<span style="margin-right: 35%"> 操作 </span>
|
|
|
|
|
</template>
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button link type="primary" @click="openDetail('Check', scope.row.id)" v-if="scope.row.status ==2">
|
|
|
|
|
<el-button
|
|
|
|
|
link
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="openDetail('Check', scope.row.id)"
|
|
|
|
|
v-if="scope.row.status == 2"
|
|
|
|
|
>
|
|
|
|
|
审核
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button link type="primary" @click="openDetail('review', scope.row.id)">
|
|
|
|
@ -202,6 +230,7 @@
|
|
|
|
|
/>
|
|
|
|
|
</ContentWrap>
|
|
|
|
|
</el-card>
|
|
|
|
|
<Outprint ref="outprintref" />
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
@ -211,7 +240,8 @@ import download from '@/utils/download'
|
|
|
|
|
import * as StorageApi from '@/api/biz/storage'
|
|
|
|
|
import * as WarehouseApi from '@/api/biz/warehouse'
|
|
|
|
|
import * as UserApi from '@/api/system/user'
|
|
|
|
|
|
|
|
|
|
import Outprint from './outprint.vue'
|
|
|
|
|
import { ElTable } from 'element-plus'
|
|
|
|
|
defineOptions({ name: 'Storage' })
|
|
|
|
|
import { useCommonStateWithOut } from '@/store/modules/common'
|
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
|
@ -244,7 +274,7 @@ const queryParams = reactive({
|
|
|
|
|
cancelTime: [],
|
|
|
|
|
matNo: undefined,
|
|
|
|
|
matName: undefined,
|
|
|
|
|
projectOrderCode:undefined
|
|
|
|
|
projectOrderCode: undefined
|
|
|
|
|
})
|
|
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
|
|
@ -295,7 +325,6 @@ onMounted(async () => {
|
|
|
|
|
})
|
|
|
|
|
warehouseList.value = await WarehouseApi.getWarehouseSimpList()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
userList.value = await UserApi.getSimpleUserList()
|
|
|
|
|
|
|
|
|
|
await getList()
|
|
|
|
@ -303,4 +332,38 @@ onMounted(async () => {
|
|
|
|
|
onActivated(() => {
|
|
|
|
|
getList()
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
//多选
|
|
|
|
|
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 fuid = ref([])
|
|
|
|
|
const outprintref = ref()
|
|
|
|
|
const openDispatching = () => {
|
|
|
|
|
if (multipleSelection.value.length === 0) {
|
|
|
|
|
message.warning('请至少选择一条数据')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fuid.value = []
|
|
|
|
|
multipleSelection.value.filter((item) => {
|
|
|
|
|
fuid.value.push(item.id)
|
|
|
|
|
})
|
|
|
|
|
console.log(fuid.value)
|
|
|
|
|
outprintref.value.open(fuid.value)
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|