414 lines
14 KiB
Vue
414 lines
14 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="合同号" prop="contract">
|
|
<el-input
|
|
v-model="queryParams.contract"
|
|
placeholder="请输入合同号"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="产品号" prop="cases">
|
|
<el-input
|
|
v-model="queryParams.cases"
|
|
placeholder="请输入产品号"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="代号" prop="managementNo">
|
|
<el-input
|
|
v-model="queryParams.managementNo"
|
|
placeholder="请输入代号"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="台次" prop="units">
|
|
<el-input
|
|
v-model="queryParams.units"
|
|
placeholder="请输入台次"
|
|
clearable
|
|
@keyup.enter.native="handleQuery"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item label="托盘条码" prop="trayCode">
|
|
<el-input
|
|
v-model="queryParams.trayCode"
|
|
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 label="起始时间" prop="dateStart">
|
|
<el-date-picker clearable
|
|
v-model="queryParams.dateStart"
|
|
type="datetime"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
placeholder="请选择起始时间">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item label="结束日期" prop="dateEnd">
|
|
<el-date-picker clearable
|
|
v-model="queryParams.dateEnd"
|
|
type="datetime"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
placeholder="请选择结束日期">
|
|
</el-date-picker>
|
|
</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="primary"
|
|
plain
|
|
icon="el-icon-plus"
|
|
size="mini"
|
|
:disabled="multiple"
|
|
@click="handleCreateReturnStockIn"
|
|
v-hasPermi="['in:stockIn:productBack']"
|
|
>生成退料入库单</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" max-height="550">
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<!-- <el-table-column label="仓库编码" align="center" prop="warehouseId" />-->
|
|
<!-- <el-table-column label="子任务" align="center" prop="jobDetailId" width="160"/>-->
|
|
<!-- <el-table-column label="任务编码" align="center" prop="jobId" width="160"/>-->
|
|
<!-- <el-table-column label="单据编码" align="center" prop="inOrOutId" width="160"/>-->
|
|
<!-- <el-table-column label="子单据编码" align="center" prop="inOrOutDId" width="160" />-->
|
|
<!-- <el-table-column label="任务号" align="center" prop="taskNo" />-->
|
|
<!-- <el-table-column 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 label="任务类型" align="center" prop="inOrOut" width="160">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <dict-tag :options="dict.type.out_job_type" :value="scope.row.inOrOut"/>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<el-table-column label="托盘码" align="center" prop="trayCode" width="160"/>
|
|
<!-- <el-table-column label="出口" align="center" prop="exitId">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <dict-tag :options="dict.type.exit_type" :value="scope.row.exitId"/>-->
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<el-table-column label="合同号" align="center" prop="contract" width="160"/>
|
|
<el-table-column label="产品号" align="center" prop="cases" width="160"/>
|
|
<el-table-column label="代号" align="center" prop="managementNo" width="160"/>
|
|
<el-table-column label="台次" align="center" prop="units" width="160"/>
|
|
<el-table-column label="物料编码" align="center" prop="productId" />
|
|
<el-table-column label="物料名称" align="center" prop="productName" width="160" show-overflow-tooltip/>
|
|
<!-- <el-table-column label="规格" align="center" prop="spec" width="160"/>-->
|
|
<el-table-column label="出库数量" align="center" prop="outQuantity" />
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="160"/>
|
|
<el-table-column label="开始时间" align="center" prop="startTime" width="160"/>
|
|
<el-table-column label="结束时间" align="center" prop="finishTime" width="160"/>
|
|
</el-table>
|
|
|
|
<pagination
|
|
v-show="total>0"
|
|
:total="total"
|
|
:page.sync="queryParams.pageNum"
|
|
:limit.sync="queryParams.pageSize"
|
|
@pagination="getList"
|
|
/>
|
|
|
|
<!-- 退料入库单生成弹窗 -->
|
|
<el-dialog title="生成退料入库单" :visible.sync="returnStockInOpen" width="1000px" append-to-body>
|
|
<el-table :data="returnStockInList">
|
|
<el-table-column label="合同号" align="center" prop="contract" />
|
|
<el-table-column label="产品号" align="center" prop="cases" />
|
|
<el-table-column label="代号" align="center" prop="managementNo" />
|
|
<el-table-column label="台次" align="center" prop="units" />
|
|
<el-table-column label="物料编码" align="center" prop="productId" />
|
|
<el-table-column label="物料名称" align="center" prop="productName" />
|
|
<el-table-column label="数量" align="center" prop="outQuantity">
|
|
<template slot-scope="scope">
|
|
<el-input-number v-model="scope.row.outQuantity" :min="1" size="small" />
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="submitReturnStockIn">提 交</el-button>
|
|
<el-button @click="returnStockInOpen = false">取 消</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
addViewOutJobFlow,
|
|
delViewOutJobFlow,
|
|
getViewOutJobFlow,
|
|
listViewOutJobFlow,
|
|
updateViewOutJobFlow
|
|
} from "@/api/search/ViewOutJobFlow"
|
|
import { productBack } from "@/api/in/stockIn"
|
|
|
|
export default {
|
|
name: "ViewOutJobFlow",
|
|
dicts: ['product_type', 'turnover_type', 'exit_type', 'quality_type', 'purpose_type', 'sys_job_status', 'product_status', 'sys_yes_no', 'account_type', 'out_job_type'],
|
|
data() {
|
|
return {
|
|
// 遮罩层
|
|
loading: true,
|
|
// 选中数组
|
|
ids: [],
|
|
// 非单个禁用
|
|
single: true,
|
|
// 非多个禁用
|
|
multiple: true,
|
|
// 显示搜索条件
|
|
showSearch: true,
|
|
// 总条数
|
|
total: 0,
|
|
// 出库作业流水Controller表格数据
|
|
ViewOutJobFlowList: [],
|
|
// 弹出层标题
|
|
title: "",
|
|
// 是否显示弹出层
|
|
open: false,
|
|
// 退料入库单弹窗控制
|
|
returnStockInOpen: false,
|
|
// 退料入库单表格数据
|
|
returnStockInList: [],
|
|
// 选中行原始数据
|
|
selectedRows: [],
|
|
// 查询参数
|
|
queryParams: {
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
jobDetailId: null,
|
|
jobId: null,
|
|
taskNo: null,
|
|
status: null,
|
|
inOrOut: null,
|
|
trayCode: null,
|
|
startTime: null,
|
|
finishTime: null,
|
|
exitId: null,
|
|
warehouseId: null,
|
|
productId: null,
|
|
productName: null,
|
|
parentId: null,
|
|
price: null,
|
|
cargoNo: null,
|
|
unit: null,
|
|
spec: null,
|
|
productType: null,
|
|
systemItem: null,
|
|
productCtm: null,
|
|
productCtu: null,
|
|
upperNum: null,
|
|
limitNum: null,
|
|
enableFlag: null,
|
|
outQuantity: null,
|
|
lotNo: null,
|
|
inOrOutId: null,
|
|
inOrOutDId: null,
|
|
priceTotal: null,
|
|
origin: null,
|
|
turnovertype: null,
|
|
account: null,
|
|
purpose: null,
|
|
units: null,
|
|
contract: null,
|
|
cases: null,
|
|
quality: null,
|
|
managementNo: null,
|
|
dateStart: null,
|
|
dateEnd: null,
|
|
},
|
|
// 表单参数
|
|
form: {},
|
|
// 表单校验
|
|
rules: {
|
|
taskNo: [
|
|
{ required: true, message: "任务号不能为空", trigger: "blur" }
|
|
],
|
|
status: [
|
|
{ required: true, message: "状态不能为空", trigger: "change" }
|
|
],
|
|
}
|
|
}
|
|
},
|
|
created() {
|
|
//this.getList()
|
|
this.loading = false
|
|
},
|
|
methods: {
|
|
/** 查询出库作业流水Controller列表 */
|
|
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 = {
|
|
jobDetailId: null,
|
|
jobId: null,
|
|
taskNo: null,
|
|
status: null,
|
|
inOrOut: null,
|
|
trayCode: null,
|
|
createTime: null,
|
|
startTime: null,
|
|
finishTime: null,
|
|
exitId: null,
|
|
warehouseId: null,
|
|
productId: null,
|
|
productName: null,
|
|
parentId: null,
|
|
price: null,
|
|
cargoNo: null,
|
|
unit: null,
|
|
spec: null,
|
|
remark: null,
|
|
productType: null,
|
|
systemItem: null,
|
|
productCtm: null,
|
|
productCtu: null,
|
|
upperNum: null,
|
|
limitNum: null,
|
|
enableFlag: null,
|
|
outQuantity: null,
|
|
lotNo: null,
|
|
inOrOutId: null,
|
|
inOrOutDId: null,
|
|
priceTotal: null,
|
|
origin: null,
|
|
turnovertype: null,
|
|
account: null,
|
|
purpose: null,
|
|
units: null,
|
|
contract: null,
|
|
cases: null,
|
|
quality: null,
|
|
managementNo: null
|
|
}
|
|
this.resetForm("form")
|
|
},
|
|
/** 搜索按钮操作 */
|
|
handleQuery() {
|
|
this.queryParams.pageNum = 1
|
|
this.getList()
|
|
},
|
|
/** 重置按钮操作 */
|
|
resetQuery() {
|
|
this.resetForm("queryForm")
|
|
//this.handleQuery()
|
|
this.ViewOutJobFlowList = []
|
|
this.total = 0
|
|
},
|
|
// 多选框选中数据
|
|
handleSelectionChange(selection) {
|
|
this.ids = selection.map(item => item.jobDetailId)
|
|
this.selectedRows = selection
|
|
this.single = selection.length!==1
|
|
this.multiple = !selection.length
|
|
},
|
|
/** 新增按钮操作 */
|
|
handleAdd() {
|
|
this.reset()
|
|
this.open = true
|
|
this.title = "添加出库作业流水Controller"
|
|
},
|
|
/** 修改按钮操作 */
|
|
handleUpdate(row) {
|
|
this.reset()
|
|
const jobDetailId = row.jobDetailId || this.ids
|
|
getViewOutJobFlow(jobDetailId).then(response => {
|
|
this.form = response.data
|
|
this.open = true
|
|
this.title = "修改出库作业流水Controller"
|
|
})
|
|
},
|
|
/** 提交按钮 */
|
|
submitForm() {
|
|
this.$refs["form"].validate(valid => {
|
|
if (valid) {
|
|
if (this.form.jobDetailId != 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 jobDetailIds = row.jobDetailId || this.ids
|
|
this.$modal.confirm('是否确认删除出库作业流水Controller编号为"' + jobDetailIds + '"的数据项?').then(function() {
|
|
return delViewOutJobFlow(jobDetailIds)
|
|
}).then(() => {
|
|
this.getList()
|
|
this.$modal.msgSuccess("删除成功")
|
|
}).catch(() => {})
|
|
},
|
|
/** 导出按钮操作 */
|
|
handleExport() {
|
|
this.download('search/ViewOutJobFlow/export', {
|
|
...this.queryParams
|
|
}, `ViewOutJobFlow_${new Date().getTime()}.xlsx`)
|
|
},
|
|
/** 生成退料入库单按钮操作 */
|
|
handleCreateReturnStockIn() {
|
|
if (this.selectedRows.length === 0) {
|
|
this.$modal.msgWarning("请选择要生成退料入库单的数据");
|
|
return;
|
|
}
|
|
// 深拷贝选中的数据到弹窗列表
|
|
this.returnStockInList = JSON.parse(JSON.stringify(this.selectedRows));
|
|
this.returnStockInOpen = true;
|
|
},
|
|
/** 提交退料入库单 */
|
|
submitReturnStockIn() {
|
|
if (this.returnStockInList.length === 0) {
|
|
return;
|
|
}
|
|
productBack(this.returnStockInList).then(response => {
|
|
this.$modal.msgSuccess("生成成功");
|
|
this.returnStockInOpen = false;
|
|
this.getList();
|
|
});
|
|
}
|
|
}
|
|
}
|
|
</script>
|