Files
FT542-WMS/ruoyi-ui/src/views/search/ViewOutJobFlow/index.vue
猫猫guowen b13d29ec53 查询统计
2025-12-10 09:49:57 +08:00

357 lines
12 KiB
Vue

<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="作业ID" prop="jobId">
<el-input
v-model="queryParams.jobId"
placeholder="请输入作业ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="子作业ID" prop="jobDetailId">
<el-input
v-model="queryParams.jobDetailId"
placeholder="请输入子作业ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单据ID" prop="inOrOutId">
<el-input
v-model="queryParams.inOrOutId"
placeholder="请输入单据ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="子单据ID" prop="inOrOutDId">
<el-input
v-model="queryParams.inOrOutDId"
placeholder="请输入子单据ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务号" prop="taskNo">
<el-input
v-model="queryParams.taskNo"
placeholder="请输入任务号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料编码" prop="productId">
<el-input
v-model="queryParams.productId"
placeholder="请输入物料编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['search:ViewOutJobFlow:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="ViewOutJobFlowList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column width="180" label="作业ID" align="center" prop="jobId" />
<el-table-column width="180" label="子作业ID" align="center" prop="jobDetailId" />
<el-table-column width="180" label="任务号" align="center" prop="taskNo" />
<el-table-column width="180" label="单据ID" align="center" prop="inOrOutId" />
<el-table-column width="180" label="子单据ID" align="center" prop="inOrOutDId" />
<el-table-column width="180" label="物料编码" align="center" prop="productId" />
<el-table-column width="180" label="物料名称" align="center" prop="productName" />
<el-table-column width="180" label="unitPrices" align="center" prop="spare5" />
<el-table-column width="180" label="units" align="center" prop="spare6" />
<el-table-column width="180" label="托盘码" align="center" prop="trayCode" />
<!-- <el-table-column width="180" label="入库数量" align="center" prop="inQuantity" />-->
<el-table-column width="180" label="出库数量" align="center" prop="outQuantity" />
<el-table-column width="180" label="库存数量" align="center" prop="stockQuantity" />
<el-table-column width="180" label="供应商id" align="center" prop="supplierNo" />
<el-table-column width="180" label="供应商名称" align="center" prop="supplierName" />
<el-table-column width="180" label="客户id" align="center" prop="customerNo" />
<el-table-column width="180" label="客户名称" align="center" prop="customerName" />
<el-table-column width="120" label="任务状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_job_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column width="180" label="货位ID" align="center" prop="cargoSpaceId" />
<el-table-column width="180" label="目标巷道ID" align="center" prop="targetCargoSpaceId" />
<el-table-column width="180" label="开始时间" align="center" prop="startTime" />
<el-table-column width="180" label="结束时间" align="center" prop="finishTime" />
<el-table-column width="120" label="执行阶段" align="center" prop="executionPhase">
<template slot-scope="scope">
<dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>
</template>
</el-table-column>
<el-table-column width="180" label="库存ID" align="center" prop="stockId" />
<el-table-column width="180" label="批次号" align="center" prop="lotNo" />
<el-table-column width="120" label="库存状态" align="center" prop="stockStatus">
<template slot-scope="scope">
<dict-tag :options="dict.type.stock_status" :value="scope.row.stockStatus"/>
</template>
</el-table-column>
<el-table-column width="180" label="产品分类" align="center" prop="parentId" />
<el-table-column width="180" label="价格" align="center" prop="price" />
<el-table-column width="180" label="产品编码" align="center" prop="cargoNo" />
<el-table-column width="180" label="单位id" align="center" prop="unit" />
<el-table-column width="180" label="型号" align="center" prop="spec" />
<el-table-column width="180" label="单位名称" align="center" prop="spare1" />
<el-table-column width="180" label="url" align="center" prop="spare3" />
<el-table-column width="180" label="btnurl" align="center" prop="spare4" />
<el-table-column width="180" label="unitjb" align="center" prop="spare7" />
<el-table-column width="180" label="备注" align="center" prop="remark" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listViewOutJobFlow, getViewOutJobFlow, delViewOutJobFlow, addViewOutJobFlow, updateViewOutJobFlow } from "@/api/search/ViewOutJobFlow"
export default {
name: "ViewOutJobFlow",
dicts: ['execution_phase_type', 'mydo_job_status', 'stock_status'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 出库作业流水表格数据
ViewOutJobFlowList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
jobId: null,
status: null,
taskNo: null,
trayCode: null,
cargoSpaceId: null,
targetCargoSpaceId: null,
startTime: null,
finishTime: null,
executionPhase: null,
jobDetailId: null,
stockId: null,
lotNo: null,
inOrOutId: null,
inOrOutDId: null,
stockStatus: null,
inQuantity: null,
stockQuantity: null,
outQuantity: null,
supplierNo: null,
supplierName: null,
customerNo: null,
customerName: null,
productId: null,
productName: null,
parentId: null,
price: null,
cargoNo: null,
unit: null,
spec: null,
spare1: null,
spare3: null,
spare4: null,
spare5: null,
spare6: null,
spare7: null
},
// 表单参数
form: {},
// 表单校验
rules: {
jobId: [
{ required: true, message: "作业ID不能为空", trigger: "blur" }
],
status: [
{ required: true, message: "任务状态不能为空", trigger: "change" }
],
taskNo: [
{ required: true, message: "任务号不能为空", trigger: "blur" }
],
}
}
},
created() {
this.getList()
},
methods: {
/** 查询出库作业流水列表 */
getList() {
this.loading = true
listViewOutJobFlow(this.queryParams).then(response => {
this.ViewOutJobFlowList = response.rows
this.total = response.total
this.loading = false
})
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
jobId: null,
status: null,
taskNo: null,
trayCode: null,
cargoSpaceId: null,
targetCargoSpaceId: null,
createTime: null,
startTime: null,
finishTime: null,
executionPhase: null,
jobDetailId: null,
stockId: null,
lotNo: null,
inOrOutId: null,
inOrOutDId: null,
stockStatus: null,
inQuantity: null,
stockQuantity: null,
outQuantity: null,
supplierNo: null,
supplierName: null,
customerNo: null,
customerName: null,
productId: null,
productName: null,
parentId: null,
price: null,
cargoNo: null,
unit: null,
spec: null,
remark: null,
spare1: null,
spare3: null,
spare4: null,
spare5: null,
spare6: null,
spare7: null
}
this.resetForm("form")
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.jobId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = "添加出库作业流水"
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const jobId = row.jobId || this.ids
getViewOutJobFlow(jobId).then(response => {
this.form = response.data
this.open = true
this.title = "修改出库作业流水"
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.jobId != null) {
updateViewOutJobFlow(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
this.getList()
})
} else {
addViewOutJobFlow(this.form).then(response => {
this.$modal.msgSuccess("新增成功")
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const jobIds = row.jobId || this.ids
this.$modal.confirm('是否确认删除出库作业流水编号为"' + jobIds + '"的数据项?').then(function() {
return delViewOutJobFlow(jobIds)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")
}).catch(() => {})
},
/** 导出按钮操作 */
handleExport() {
this.download('search/ViewOutJobFlow/export', {
...this.queryParams
}, `ViewOutJobFlow_${new Date().getTime()}.xlsx`)
}
}
}
</script>