入库逻辑修改
This commit is contained in:
408
ruoyi-ui/src/views/out/cargoSpaceOut.vue
Normal file
408
ruoyi-ui/src/views/out/cargoSpaceOut.vue
Normal file
@@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" :label-width="labelWidthForSearch">
|
||||
|
||||
|
||||
<el-form-item label="巷道" prop="roadwayId">
|
||||
<el-input
|
||||
v-model="queryParams.roadwayId"
|
||||
placeholder="请输入巷道"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 排 -->
|
||||
<el-form-item label="排" prop="thePlatoon">
|
||||
<el-input
|
||||
v-model="queryParams.thePlatoon"
|
||||
placeholder="请输入排"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 列 -->
|
||||
<el-form-item label="列" prop="theColumn">
|
||||
<el-input
|
||||
v-model="queryParams.theColumn"
|
||||
placeholder="请输入列"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 层 -->
|
||||
<el-form-item label="层" prop="theFloor">
|
||||
<el-input
|
||||
v-model="queryParams.theFloor"
|
||||
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="primary"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleCargoSpaceOut(1)"
|
||||
v-hasPermi="['job:outmydoJob:cargoSpaceOut']"
|
||||
>指定出库</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleCargoSpaceOut(1)"
|
||||
v-hasPermi="['job:outmydoJob:cargoSpaceOut1']"
|
||||
>入库端出库</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleCargoSpaceOut(2)"
|
||||
v-hasPermi="['job:outmydoJob:cargoSpaceOut2']"
|
||||
>出库端出库</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="cargoSpaceList" @selection-change="handleSelectionChange" max-height="650">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- 货位ID -->
|
||||
<el-table-column label="货位编号" align="left" prop="cargoSpaceId" />
|
||||
<!-- 仓库名称 -->
|
||||
<!-- <el-table-column label="仓库名称" align="left" prop="warehouseName" />-->
|
||||
<el-table-column label="巷道ID" align="left" prop="roadwayId" />
|
||||
<!-- 货位名称 -->
|
||||
<el-table-column label="货位名称" align="center" prop="cargoSpaceName" />
|
||||
<!-- 排 -->
|
||||
<el-table-column label="排" align="left" prop="thePlatoon" />
|
||||
<!-- 列 -->
|
||||
<el-table-column label="列" align="left" prop="theColumn" />
|
||||
<!-- 层 -->
|
||||
<el-table-column label="层" align="left" prop="theFloor" />
|
||||
<!-- 货位编码 -->
|
||||
<el-table-column label="货位状态" align="left" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.cargo_space_status" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 是否锁定 -->
|
||||
<el-table-column label="锁定状态" align="left" prop="locked" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.cargo_space_lock_status" :value="scope.row.locked"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- 托盘编码 -->
|
||||
<el-table-column label="托盘编号" align="left" prop="trayCode" />
|
||||
<!-- 货物高度 -->
|
||||
<el-table-column label="货物高度(MM)" align="left" prop="cargoHight" />
|
||||
<!-- 货物重量 -->
|
||||
<el-table-column label="货位重量(KG)" align="left" prop="theType" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCargoSpace, getCargoSpace, delCargoSpace, addCargoSpace, updateCargoSpace } from "@/api/bas/cargoSpace"
|
||||
import { listWarehouse } from "@/api/bas/warehouse"
|
||||
import { cargoSpaceOut } from "@/api/job/OutmydoJob"
|
||||
|
||||
export default {
|
||||
name: "CargoSpace",
|
||||
dicts:['cargo_space_status','cargo_space_lock_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 选中行数据
|
||||
selection: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 库存信息表格数据
|
||||
cargoSpaceList: [],
|
||||
warehouseOptions:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
warehouseId: null,
|
||||
roadwayId: null,
|
||||
cargoAreaId: null,
|
||||
theType: null,
|
||||
theTypeName: null,
|
||||
cargoSpaceName: null,
|
||||
cargoSpaceId: null,
|
||||
thePlatoon: null,
|
||||
theColumn: null,
|
||||
theFloor: null,
|
||||
status: null,
|
||||
locked: null,
|
||||
trayCode: null,
|
||||
cargoHight: null,
|
||||
issDouble: null,
|
||||
groupCodingNo: null,
|
||||
groupCoding: null,
|
||||
cargoSpaceLogo: null,
|
||||
thisCargoArea: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
cargoSpaceId: [
|
||||
// 校验---货位ID是否为空
|
||||
{ required: true, message: "请输入货位编号", trigger: "blur" }
|
||||
],
|
||||
warehouseId: [
|
||||
// 校验---仓库是否为空
|
||||
{ required: true, message: "请选择仓库", trigger: "change" }
|
||||
],
|
||||
cargoSpaceName: [
|
||||
// 校验---货位名称是否为空
|
||||
{ required: true, message: "请输入货位名称", trigger: "blur" }
|
||||
],
|
||||
thePlatoon: [
|
||||
// 校验---排是否为空
|
||||
{ required: true, message: "请输入排号", trigger: "blur" }
|
||||
],
|
||||
theColumn: [
|
||||
// 校验---列是否为空
|
||||
{ required: true, message: "请输入列号", trigger: "blur" }
|
||||
],
|
||||
theFloor: [
|
||||
// 校验---层是否为空
|
||||
{ required: true, message: "请输入层号", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
// 校验---货位状态是否为空
|
||||
{ required: true, message: "请选择货位状态", trigger: "change" }
|
||||
],
|
||||
locked: [
|
||||
// 校验---锁定状态是否为空
|
||||
{ required: true, message: "请选择锁定状态", trigger: "change" }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loading = false
|
||||
},
|
||||
methods: {
|
||||
/** 获取仓库列表 */
|
||||
getWarehouseList() {
|
||||
listWarehouse().then(response => {
|
||||
this.warehouseOptions = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询库存信息列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listCargoSpace(this.queryParams).then(response => {
|
||||
this.cargoSpaceList = response.rows
|
||||
this.total = response.total
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
cargoSpaceId: null,
|
||||
warehouseId: null,
|
||||
roadwayId: null,
|
||||
cargoAreaId: null,
|
||||
theType: null,
|
||||
theTypeName: null,
|
||||
cargoSpaceName: null,
|
||||
thePlatoon: null,
|
||||
theColumn: null,
|
||||
theFloor: null,
|
||||
status: null,
|
||||
locked: null,
|
||||
trayCode: null,
|
||||
cargoHight: null,
|
||||
issDouble: null,
|
||||
groupCodingNo: null,
|
||||
groupCoding: null,
|
||||
cargoSpaceLogo: null,
|
||||
thisCargoArea: null
|
||||
}
|
||||
this.resetForm("form")
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm")
|
||||
//this.handleQuery()
|
||||
this.cargoSpaceList = []
|
||||
this.total = 0
|
||||
this.loading = false
|
||||
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.cargoSpaceId)
|
||||
this.selection = selection
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset()
|
||||
this.open = true
|
||||
this.title = "新增货位"
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
const cargoSpaceId = row.cargoSpaceId || this.ids
|
||||
getCargoSpace(cargoSpaceId).then(response => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = "修改货位"
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
// 检查cargoSpaceId是否存在且不为空
|
||||
if (this.form.cargoSpaceId && this.form.cargoSpaceId.trim() !== '') {
|
||||
// 检查数据库中是否存在该ID的记录
|
||||
getCargoSpace(this.form.cargoSpaceId).then(response => {
|
||||
// 检查返回的数据是否为null或空对象
|
||||
if (response.data && response.data.cargoSpaceId) {
|
||||
// 如果能获取到有效数据,说明记录存在,调用修改方法
|
||||
updateCargoSpace(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
// 如果返回数据为空,说明记录不存在,调用新增方法
|
||||
addCargoSpace(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}).catch(() => {
|
||||
// 如果请求失败,调用新增方法
|
||||
addCargoSpace(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// 如果cargoSpaceId为空,直接调用新增方法
|
||||
addCargoSpace(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功")
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const cargoSpaceIds = row.cargoSpaceId || this.ids
|
||||
this.$modal.confirm('确认要删除货位编号为 "' + cargoSpaceIds + '" 的货位吗?').then(function() {
|
||||
return delCargoSpace(cargoSpaceIds)
|
||||
}).then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 生成任务接口 */
|
||||
handleCargoSpaceOut(exitId) {
|
||||
if (!this.selection || this.selection.length === 0) {
|
||||
this.$modal.msgError("请至少选择一个货位");
|
||||
return;
|
||||
}
|
||||
|
||||
const promises = this.selection.map(row => {
|
||||
const params = {
|
||||
warehouseId: row.warehouseId,
|
||||
exitId: exitId,
|
||||
cargoSpaceId: row.cargoSpaceId
|
||||
};
|
||||
return cargoSpaceOut(params);
|
||||
});
|
||||
|
||||
Promise.all(promises).then(() => {
|
||||
this.$modal.msgSuccess("出库任务生成成功");
|
||||
this.getList();
|
||||
}).catch(err => {
|
||||
// 错误处理通常由拦截器完成,这里可以根据需要补充
|
||||
});
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
labelWidthForSearch() {
|
||||
const lang = this.$i18n.locale;
|
||||
return lang.startsWith('en') ? '84px' : '68px';
|
||||
},
|
||||
labelWidthForFunction() {
|
||||
const lang = this.$i18n.locale;
|
||||
return lang.startsWith('en') ? '150px' : '120px';
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
/* 统一表单控件宽度 */
|
||||
.el-select,
|
||||
.el-input {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
409
ruoyi-ui/src/views/out/outJobFlow.vue
Normal file
409
ruoyi-ui/src/views/out/outJobFlow.vue
Normal file
@@ -0,0 +1,409 @@
|
||||
<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"
|
||||
>生成退料入库单</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 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" />
|
||||
<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" width="160"/>
|
||||
<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()
|
||||
},
|
||||
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()
|
||||
},
|
||||
// 多选框选中数据
|
||||
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>
|
||||
Reference in New Issue
Block a user