wms成品盘点页面修改

master
mengjiao 8 months ago
parent 1964e2213c
commit bcc76bf7a7

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询成品盘点单列表
export function listSystemFinished(query) {
return request({
url: '/wms/systemFinished/list',
method: 'get',
params: query
});
}
// 查询成品盘点单详细
export function getSystemFinished(ID) {
return request({
url: '/wms/systemFinished/' + ID,
method: 'get'
});
}
// 新增成品盘点单
export function addSystemFinished(data) {
return request({
url: '/wms/systemFinished',
method: 'post',
data: data
});
}
// 修改成品盘点单
export function updateSystemFinished(data) {
return request({
url: '/wms/systemFinished',
method: 'put',
data: data
});
}
// 删除成品盘点单
export function delSystemFinished(ID) {
return request({
url: '/wms/systemFinished/' + ID,
method: 'delete'
});
}

@ -81,6 +81,14 @@ export function addPurchaseOrderOutbound(data) {
data: data data: data
}); });
} }
// 根据工厂获取产线
export function getDictData(data) {
return request({
url: '/mes/mesborad/getLineList',
method: 'get',
params: data
});
}
// 新增 // 新增
export function OutboundPostingSAP(data) { export function OutboundPostingSAP(data) {
return request({ return request({
@ -88,4 +96,7 @@ export function OutboundPostingSAP(data) {
method: 'post', method: 'post',
data: data data: data
}); });
} }

@ -209,17 +209,17 @@
</el-form> </el-form>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="primary" <!-- type="primary"-->
plain <!-- plain-->
icon="el-icon-plus" <!-- icon="el-icon-plus"-->
size="mini" <!-- size="mini"-->
@click="handleAdd" <!-- @click="handleAdd"-->
v-hasPermi="['wms:ruturn:add']" <!-- v-hasPermi="['wms:ruturn:add']"-->
>新增 <!-- >新增-->
</el-button> <!-- </el-button>-->
</el-col> <!-- </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
@ -232,18 +232,18 @@
>修改 >修改
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">-->
<el-button <!-- <el-button-->
type="danger" <!-- type="danger"-->
plain <!-- plain-->
icon="el-icon-delete" <!-- icon="el-icon-delete"-->
size="mini" <!-- size="mini"-->
:disabled="multiple" <!-- :disabled="multiple"-->
@click="handleDelete" <!-- @click="handleDelete"-->
v-hasPermi="['wms:ruturn:remove']" <!-- v-hasPermi="['wms:ruturn:remove']"-->
>删除 <!-- >删除-->
</el-button> <!-- </el-button>-->
</el-col> <!-- </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"

@ -0,0 +1,536 @@
<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="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入盘点单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="盘点仓库" prop="userDefined1">
<el-input
v-model="queryParams.userDefined1"
placeholder="盘点仓库"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="盘点位置" prop="locCode">
<el-input
v-model="queryParams.locCode"
placeholder="盘点位置"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="盘点单状态" prop="userDefined2">
<el-input
v-model="queryParams.userDefined2"
placeholder="盘点单状态"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="创建人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="盘点人" prop="userDefined10">
<el-input
v-model="queryParams.userDefined10"
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="['systemFinished:systemFinished: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="['systemFinished:systemFinished:edit']"
>盘点调整
</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="['systemFinished:systemFinished: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="['systemFinished:systemFinished:remove']"
>关闭
</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="['systemFinished:systemFinished:edit']"
>打印
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['systemFinished:systemFinished:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="systemFinishedList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="ID" align="center" prop="ID" v-if="false" />
<el-table-column label="盘点单号" align="center" prop="orderCode"/>
<el-table-column label="工厂编码" align="center" prop="siteCode" />
<el-table-column label="型号编码" align="center" prop="materialCode"v-if="false" />
<el-table-column label="型号名称" align="center" prop="materialDesc"v-if="false" />
<el-table-column label="库存数量" align="center" prop="locNumber"v-if="false" />
<el-table-column label="单位" align="center" prop="Unit"v-if="false" />
<el-table-column label="实际数量" align="center" prop="realityNumber"v-if="false" />
<el-table-column label="订单状态" align="center" prop="orderStatus"/>
<el-table-column label="盘点仓库" align="center" prop="userDefined1"/>
<el-table-column label="盘点位置" align="center" prop="locCode"/>
<el-table-column label="盘点类型" align="center" prop="userDefined3" />
<el-table-column label="盘点单状态" align="center" prop="userDefined2"/>
<el-table-column label="审核意见" align="center" prop="userDefined4" />
<el-table-column label="盘点时间" align="center" prop="userDefined5"/>
<el-table-column label="盘点调整人" align="center" prop="userDefined6"/>
<el-table-column label="盘点调整时间" align="center" prop="userDefined7"/>
<el-table-column label="审核人" align="center" prop="userDefined8"/>
<el-table-column label="审核时间" align="center" prop="userDefined9"/>
<el-table-column label="盘点策略" align="center" prop="userDefined10"v-if="false" />
<el-table-column label="产品状态" align="center" prop="userDefined11"v-if="false" />
<el-table-column label="备注" align="center" prop="Remark"/>
<el-table-column label="创建人" align="center" prop="createBy"/>
<el-table-column label="创建时间" align="center" prop="createDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="最后更新人" align="center" prop="lastUpdateBy"/>
<el-table-column label="最后更新时间" align="center" prop="lastUpdateDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.lastUpdateDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="可用标识" align="center" prop="Active"v-if="false" />
<el-table-column label="企业主键" align="center" prop="enterpriseId"v-if="false" />
<el-table-column label="企业编码" align="center" prop="enterpriseCode"v-if="false" />
<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="['systemFinished:systemFinished:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['systemFinished:systemFinished: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="1232px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="8">
<el-form-item label="盘点单号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入盘点单号"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工厂编码" prop="siteCode">
<el-input v-model="form.siteCode" placeholder="请输入工厂编码"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="盘点仓库" prop="userDefined1">
<el-input v-model="form.userDefined1" placeholder="请输入盘点仓库"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="盘点位置" prop="locCode">
<el-input v-model="form.locCode" placeholder="请输入盘点位置"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="盘点类型" prop="userDefined3">
<el-input v-model="form.userDefined3" placeholder="请输入盘点类型"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="盘点策略" prop="userDefined10">
<el-input v-model="form.userDefined10" placeholder="请输入盘点策略"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="产品状态" prop="userDefined11">
<el-input v-model="form.userDefined11" placeholder="请输入用户自定义属性11"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注" prop="Remark">
<el-input v-model="form.Remark" type="textarea" placeholder="请输入内容"/>
</el-form-item>
</el-col>
</el-row>
</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="handlequeryform"></el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="WarehouseLocationCreation">/</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="MaterialCreation()"></el-button>
</el-col>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
</el-row>
<el-table :data="addoutorderList" @selection-change="handleSelectionChange1">
<el-table-column type="selection" width="55" align="center" :index="indexMethod" />
<el-table-column label="序号" type="index"> </el-table-column>
<el-table-column label="盘点位置" align="center" prop="locCode" />
<el-table-column label="托盘号" align="center" prop="sn" />
<el-table-column label="批次号" align="center" prop="incomeBatchNo" />
<el-table-column label="物料编码" align="center" prop="materialCode" />
<el-table-column label="物料名称" align="center" prop="materialName" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="应盘数量" align="center" prop="quantity" />
<el-table-column label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="handleDeleteRW(scope.row)"></el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"></el-button>
<el-button @click="cancel"></el-button>
</div>
</el-dialog>
<!--订单选择弹窗-->
<ItemSelectWorkOrderk
ref="ItemSelectWorkOrderk"
@onSelected="onSelectWorkOrder"
></ItemSelectWorkOrderk>
</div>
</template>
<script>
import {
listSystemFinished,
getSystemFinished,
delSystemFinished,
addSystemFinished,
updateSystemFinished } from "@/api/systemFinished/systemFinished";
import ItemSelectWorkOrderk from "./selectWorkOrder.vue";
export default {
name: "SystemFinished",
data() {
return {
//
loading: true,
components: { ItemSelectWorkOrderk},
//
showFlags:false,
//
addoutorderList:[],
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
systemFinishedList: [],
//
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
siteCode: null,
orderCode: null,
materialCode: null,
materialDesc: null,
planDate: null,
locNumber: null,
Unit: null,
realityNumber: null,
orderStatus: null,
userDefined1: null,
locCode: null,
userDefined2: null,
userDefined3: null,
userDefined4: null,
userDefined5: null,
userDefined6: null,
userDefined7: null,
userDefined8: null,
userDefined9: null,
userDefined10: null,
userDefined11: null,
Remark: null,
createBy: null,
createDate: null,
lastUpdateBy: null,
lastUpdateDate: null,
Active: null,
enterpriseId: null,
enterpriseCode: null
},
queryParamsOne: {
pageNum: 1,
pageSize: 10,
siteCode: null,
orderCode: null,
materialCode: null,
materialDesc: null,
planDate: null,
locNumber: null,
Unit: null,
realityNumber: null,
orderStatus: null,
userDefined1: null,
locCode: null,
userDefined2: null,
userDefined3: null,
userDefined4: null,
userDefined5: null,
userDefined6: null,
userDefined7: null,
userDefined8: null,
userDefined9: null,
userDefined10: null,
userDefined11: null,
Remark: null,
createBy: null,
createDate: null,
lastUpdateBy: null,
lastUpdateDate: null,
Active: null,
enterpriseId: null,
enterpriseCode: null
},
//
form: {
}
,
//
rules: {
}
}
;
},
created() {
this.getList();
},
methods: {
/** 查询成品盘点单列表 */
getList() {
this.loading = true;
listSystemFinished(this.queryParams).then(response => {
this.systemFinishedList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
siteCode: null,
ID: null,
orderCode: null,
materialCode: null,
materialDesc: null,
planDate: null,
locNumber: null,
Unit: null,
realityNumber: null,
orderStatus: null,
userDefined1: null,
locCode: null,
userDefined2: null,
userDefined3: null,
userDefined4: null,
userDefined5: null,
userDefined6: null,
userDefined7: null,
userDefined8: null,
userDefined9: null,
userDefined10: null,
userDefined11: null,
Remark: null,
createBy: null,
createDate: null,
lastUpdateBy: null,
lastUpdateDate: null,
Active: null,
enterpriseId: null,
enterpriseCode: 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
getSystemFinished(ID).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改成品盘点单";
});
},
handleDeleteRW(row){
let datas =this.addoutorderList
for(var i=0;i<datas.length;i++){
if (datas[i],key==row.key){
datas.splice(i,1);
}
}
},
WarehouseLocationCreation(){
console.log("---sda")
this.$refs.ItemSelectWorkOrderk.showFlags = true;
console.log("---ssda")
},
onSelectWorkOrder(obj) {
this.form.orderNo = obj.workorderCode;
this.form.materialName = obj.materialName;
this.form.materialCode = obj.materialCode;
this.form.quality = obj.quality;
this.form.unit = obj.unit;
this.form.incomeTime = obj.incomeTime;
getBatchList(obj.workorderCode).then(response => {
this.batchList = response;
});
},
MaterialCreation(){
}
}
}
;
</script>

@ -0,0 +1,149 @@
<template>
<el-dialog title="生产订单号选择"
v-if="showFlags"
:visible.sync="showFlags"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="订单号">
<el-input
v-model="queryParams.orderNo"
placeholder="订单号"
clearable
style="width: 240px"
@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-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="订单号" align="left" prop="orderNo" width="120" :formatter="orderCodeFormate"/>
<!--<el-table-column label="订单状态" align="left" prop="status" width="90"/>-->
<el-table-column label="工单号" align="left" prop="workorderCode" width="130"/>
<el-table-column label="产品编码" align="left" prop="materialCode" width="160" :formatter="productCodeFormate"/>
<el-table-column label="产品名称" align="left" prop="materialName" width="200"/>
<el-table-column label="排产数量" align="left" prop="quality" width="100" />
<el-table-column label="单位" align="left" prop="unit" width="80"/>
<el-table-column label="生产日期" align="left" prop="incomeTime" width="100" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitLLOrderForm"> </el-button>
<el-button @click="showFlags=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: "itemSelectWorkOrder",
data() {
return {
showFlags:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
workorderCode: ''
},
selectionRow:{}
};
},
created() {
this.getList();
},
methods: {
//
productCodeFormate(row, column, cellValue){
return cellValue.slice(7,18); //
},
//
orderCodeFormate(row, column, cellValue){
if(cellValue !=null){
return cellValue.slice(3,18); //
}
},
/** 查询表格列表*/
getList() {
this.loading = true;
// getWorkOrder(this.queryParams).then(response => {
// this.itemList = response.rows;
// this.total = response.total;
// this.loading = false;
// }
// );
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
if(selection.length>1){
this.$modal.msgSuccess("只能选一个");
}
this.selectionRow = selection[0]
},
submitLLOrderForm() {
this.$emit('onSelected', this.selectionRow);
this.showFlags = false;
}
}
};
</script>
Loading…
Cancel
Save