庞晓磊 1 year ago
commit c17b693651

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询成品生产入库列表
export function listPut(query) {
return request({
url: '/wms/put/list',
method: 'get',
params: query
});
}
// 查询成品生产入库详细
export function getPut(id) {
return request({
url: '/wms/put/' + id,
method: 'get'
});
}
// 新增成品生产入库
export function addPut(data) {
return request({
url: '/wms/put',
method: 'post',
data: data
});
}
// 修改成品生产入库
export function updatePut(data) {
return request({
url: '/wms/put',
method: 'put',
data: data
});
}
// 删除成品生产入库
export function delPut(id) {
return request({
url: '/wms/put/' + id,
method: 'delete'
});
}

@ -280,6 +280,17 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<br/>
<!-- 底部 -->
<el-row class="my-print-foot">
<el-col :offset="1" :span="3">SAP-No:{{printData.SAPNo}}</el-col>
<el-col :offset="1" :span="3">Z-PM-F-030-A.1</el-col>
</el-row>
<el-row class="my-print-foot">
<el-col :offset="1" :span="3">制单人:{{printData.manufacture}}</el-col>
<el-col :offset="1" :span="3">审核人{{printData.auditor}}</el-col>
</el-row>
</el-form> </el-form>
@ -451,6 +462,9 @@ export default {
printable: 'printFrom', printable: 'printFrom',
ignore: ['no-print'], ignore: ['no-print'],
workCenter: "暂无数据", workCenter: "暂无数据",
SAPNo: null,
manufacture: null,
auditor: null,
printDate: null, printDate: null,
factory: null, factory: null,
productDate: null, productDate: null,
@ -610,6 +624,7 @@ export default {
// //
this.printDialogVisible = true; this.printDialogVisible = true;
this.printData.printDate = moment(new Date()).format('YYYY.MM.DD'); this.printData.printDate = moment(new Date()).format('YYYY.MM.DD');
this.printData.manufacture = this.$store.state.user.name;
this.newWorkerLoading = true // true this.newWorkerLoading = true // true
this.refreshNewWorkerTable = false // refreshProTablefalse this.refreshNewWorkerTable = false // refreshProTablefalse
getWorkOrders(this.selectWork.workorderCode).then(response => { getWorkOrders(this.selectWork.workorderCode).then(response => {
@ -1108,5 +1123,8 @@ export default {
} }
.my-print-table { .my-print-table {
}
.my-print-foot {
margin-top: 20px;
} }
</style> </style>

@ -0,0 +1,611 @@
<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="factoryCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.factoryCode"-->
<!-- placeholder="请输入工厂编码"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="退货单号" prop="productOrder">
<el-input
v-model="queryParams.productOrder"
placeholder="请输入退货单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="仓库编码" prop="whCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.whCode"-->
<!-- placeholder="请输入仓库编码"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="库区编码" prop="waCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.waCode"-->
<!-- placeholder="请输入库区编码"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="库位编码" prop="wlCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.wlCode"-->
<!-- 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="productCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.productCode"-->
<!-- placeholder="请输入产品编码"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="产品分类" prop="productSort">-->
<!-- <el-input-->
<!-- v-model="queryParams.productSort"-->
<!-- placeholder="请输入产品分类"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="规格型号" prop="specification">
<el-input
v-model="queryParams.specification"
placeholder="请输入规格型号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="单位" prop="unitOfMeasure">-->
<!-- <el-input-->
<!-- v-model="queryParams.unitOfMeasure"-->
<!-- placeholder="请输入单位"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="计划入库数量" prop="planQuantity">-->
<!-- <el-input-->
<!-- v-model="queryParams.planQuantity"-->
<!-- placeholder="请输入计划入库数量"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="入库数量" prop="putQuantity">-->
<!-- <el-input-->
<!-- v-model="queryParams.putQuantity"-->
<!-- placeholder="请输入入库数量"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="过账SAP凭证" prop="sapProof">-->
<!-- <el-input-->
<!-- v-model="queryParams.sapProof"-->
<!-- placeholder="请输入过账SAP凭证"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="过账SAP返回信息" prop="sapMessage">-->
<!-- <el-input-->
<!-- v-model="queryParams.sapMessage"-->
<!-- placeholder="请输入过账SAP返回信息"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="入库时间" prop="putDate">-->
<!-- <el-date-picker clearable-->
<!-- v-model="queryParams.putDate"-->
<!-- type="date"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- placeholder="请选择入库时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段1" prop="attr1">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr1"-->
<!-- placeholder="请输入预留字段1"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段2" prop="attr2">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr2"-->
<!-- placeholder="请输入预留字段2"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段3" prop="attr3">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr3"-->
<!-- placeholder="请输入预留字段3"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段4" prop="attr4">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr4"-->
<!-- placeholder="请输入预留字段4"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段5" prop="attr5">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr5"-->
<!-- placeholder="请输入预留字段5"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段6" prop="attr6">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr6"-->
<!-- placeholder="请输入预留字段6"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段7" prop="attr7">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr7"-->
<!-- placeholder="请输入预留字段7"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段8" prop="attr8">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr8"-->
<!-- placeholder="请输入预留字段8"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段9" prop="attr9">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr9"-->
<!-- placeholder="请输入预留字段9"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段10" prop="attr10">-->
<!-- <el-input-->
<!-- v-model="queryParams.attr10"-->
<!-- placeholder="请输入预留字段10"-->
<!-- 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-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['wms:put:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['wms:put:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['wms:put:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['wms:put:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="putList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="id" />
<el-table-column label="工厂编码" align="center" prop="factoryCode" />
<el-table-column label="退货单号" align="center" prop="productOrder" />
<el-table-column label="仓库编码" align="center" prop="whCode" />
<el-table-column label="库区编码" align="center" prop="waCode" />
<el-table-column label="库位编码" align="center" prop="wlCode" />
<el-table-column label="产品名称" align="center" prop="productName" />
<!-- <el-table-column label="产品编码" align="center" prop="productCode" />-->
<el-table-column label="产品分类" align="center" prop="productSort" />
<!-- <el-table-column label="规格型号" align="center" prop="specification" />-->
<!-- <el-table-column label="单位" align="center" prop="unitOfMeasure" />-->
<el-table-column label="计划入库数量" align="center" prop="planQuantity" />
<el-table-column label="入库数量" align="center" prop="putQuantity" />
<el-table-column label="入库状态" align="center" prop="status" />
<el-table-column label="过账SAP状态" align="center" prop="sapStatus" />
<el-table-column label="过账SAP凭证" align="center" prop="sapProof" />
<el-table-column label="过账SAP返回信息" align="center" prop="sapMessage" />
<!-- <el-table-column label="入库时间" align="center" prop="putDate" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ parseTime(scope.row.putDate, '{y}-{m}-{d}') }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="预留字段1" align="center" prop="attr1" />-->
<!-- <el-table-column label="预留字段2" align="center" prop="attr2" />-->
<!-- <el-table-column label="预留字段3" align="center" prop="attr3" />-->
<!-- <el-table-column label="预留字段4" align="center" prop="attr4" />-->
<!-- <el-table-column label="预留字段5" align="center" prop="attr5" />-->
<!-- <el-table-column label="预留字段6" align="center" prop="attr6" />-->
<!-- <el-table-column label="预留字段7" align="center" prop="attr7" />-->
<!-- <el-table-column label="预留字段8" align="center" prop="attr8" />-->
<!-- <el-table-column label="预留字段9" align="center" prop="attr9" />-->
<!-- <el-table-column label="预留字段10" align="center" prop="attr10" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['wms:put:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['wms:put:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改成品生产入库对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item label="退货单号" prop="productOrder">
<el-input v-model="form.productOrder" placeholder="请输入退货单号" />
</el-form-item>
<el-form-item label="仓库编码" prop="whCode">
<el-input v-model="form.whCode" placeholder="请输入仓库编码" />
</el-form-item>
<el-form-item label="库区编码" prop="waCode">
<el-input v-model="form.waCode" placeholder="请输入库区编码" />
</el-form-item>
<el-form-item label="库位编码" prop="wlCode">
<el-input v-model="form.wlCode" placeholder="请输入库位编码" />
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input v-model="form.productName" placeholder="请输入产品名称" />
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input v-model="form.productCode" placeholder="请输入产品编码" />
</el-form-item>
<el-form-item label="产品分类" prop="productSort">
<el-input v-model="form.productSort" placeholder="请输入产品分类" />
</el-form-item>
<el-form-item label="规格型号" prop="specification">
<el-input v-model="form.specification" placeholder="请输入规格型号" />
</el-form-item>
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" />
</el-form-item>
<el-form-item label="计划入库数量" prop="planQuantity">
<el-input v-model="form.planQuantity" placeholder="请输入计划入库数量" />
</el-form-item>
<el-form-item label="入库数量" prop="putQuantity">
<el-input v-model="form.putQuantity" placeholder="请输入入库数量" />
</el-form-item>
<el-form-item label="入库状态">
<el-select v-model="form.status" placeholder="请选择入库状态">
<el-option label="已入库" value="1"></el-option>
<el-option label="待入库" value="0"></el-option>
<el-option label="部分入库" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="过账SAP凭证" prop="sapProof">
<el-input v-model="form.sapProof" placeholder="请输入过账SAP凭证" />
</el-form-item>
<el-form-item label="过账SAP返回信息" prop="sapMessage">
<el-input v-model="form.sapMessage" placeholder="请输入过账SAP返回信息" />
</el-form-item>
<el-form-item label="入库时间" prop="putDate">
<el-date-picker clearable
v-model="form.putDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择入库时间">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="预留字段1" prop="attr1">-->
<!-- <el-input v-model="form.attr1" placeholder="请输入预留字段1" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段2" prop="attr2">-->
<!-- <el-input v-model="form.attr2" placeholder="请输入预留字段2" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段3" prop="attr3">-->
<!-- <el-input v-model="form.attr3" placeholder="请输入预留字段3" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段4" prop="attr4">-->
<!-- <el-input v-model="form.attr4" placeholder="请输入预留字段4" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段5" prop="attr5">-->
<!-- <el-input v-model="form.attr5" placeholder="请输入预留字段5" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段6" prop="attr6">-->
<!-- <el-input v-model="form.attr6" placeholder="请输入预留字段6" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段7" prop="attr7">-->
<!-- <el-input v-model="form.attr7" placeholder="请输入预留字段7" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段8" prop="attr8">-->
<!-- <el-input v-model="form.attr8" placeholder="请输入预留字段8" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段9" prop="attr9">-->
<!-- <el-input v-model="form.attr9" placeholder="请输入预留字段9" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="预留字段10" prop="attr10">-->
<!-- <el-input v-model="form.attr10" placeholder="请输入预留字段10" />-->
<!-- </el-form-item>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listPut, getPut, delPut, addPut, updatePut } from "@/api/wms/put";
export default {
name: "Put",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
putList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
factoryCode: null,
productOrder: null,
whCode: null,
waCode: null,
wlCode: null,
productName: null,
productCode: null,
productSort: null,
specification: null,
unitOfMeasure: null,
planQuantity: null,
putQuantity: null,
status: null,
sapStatus: null,
sapProof: null,
sapMessage: null,
putDate: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
attr5: null,
attr6: null,
attr7: null,
attr8: null,
attr9: null,
attr10: null,
},
//
form: {},
//
rules: {
factoryCode: [
{ required: true, message: "工厂编码不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询成品生产入库列表 */
getList() {
this.loading = true;
listPut(this.queryParams).then(response => {
this.putList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
factoryCode: null,
productOrder: null,
whCode: null,
waCode: null,
wlCode: null,
productName: null,
productCode: null,
productSort: null,
specification: null,
unitOfMeasure: null,
planQuantity: null,
putQuantity: null,
status: null,
sapStatus: null,
sapProof: null,
sapMessage: null,
putDate: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
attr5: null,
attr6: null,
attr7: null,
attr8: null,
attr9: null,
attr10: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: 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.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加成品生产入库";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getPut(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改成品生产入库";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updatePut(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPut(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除成品生产入库编号为"' + ids + '"的数据项?').then(function() {
return delPut(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('wms/put/export', {
...this.queryParams
}, `put_${new Date().getTime()}.xlsx`)
}
}
};
</script>
Loading…
Cancel
Save