wms成品盘点页面修改2

yangwl
mengjiao 7 months ago
parent 5c943e27f3
commit 53bf643f69

@ -9,6 +9,15 @@ export function listSystemFinished(query) {
});
}
// 新增成品盘点单
export function addOdsProductEmbryoInventory(data) {
return request({
url: '/wms/systemFinished/addOdsProductEmbryoInventory',
method: 'post',
params: data
});
}
// 查询成品盘点单详细
export function getSystemFinished(ID) {
return request({

@ -8,7 +8,14 @@ export function listDetailed(query) {
params: query
});
}
// 查询成品库存明细列表
export function listDetailedunt(query) {
return request({
url: '/wms/detailed/listunt',
method: 'get',
params: query
});
}
// 查询成品库存明细详细
export function getDetailed(storageId) {
return request({

@ -21,6 +21,8 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="盘点位置" prop="locCode">
<el-input
v-model="queryParams.locCode"
@ -29,9 +31,9 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="盘点单状态" prop="userDefined2">
<el-form-item label="盘点单状态" prop="orderStatus">
<el-input
v-model="queryParams.userDefined2"
v-model="queryParams.orderStatus"
placeholder="盘点单状态"
clearable
@keyup.enter.native="handleQuery"
@ -103,7 +105,7 @@
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
@click="handleDeleteRW"
v-hasPermi="['systemFinished:systemFinished:remove']"
>关闭
</el-button>
@ -145,11 +147,11 @@
<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="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="userDefined2"/>-->
<el-table-column label="审核意见" align="center" prop="userDefined4" />
<el-table-column label="盘点时间" align="center" prop="userDefined5"/>
@ -189,7 +191,7 @@
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
@click="handleDeleteRW(scope.row)"
v-hasPermi="['systemFinished:systemFinished:remove']"
>删除
</el-button>
@ -209,44 +211,86 @@
<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-col :span="10" align="left">
<el-form-item label="盘点单号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入盘点单号"/>
<el-input v-model="form.orderCode" placeholder="自动生成" :readonly="true"/>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <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="10"align="left">
<el-form-item label="工厂编码" prop="siteCode">
<el-input v-model="form.siteCode" placeholder="请输入工厂编码"/>
<el-select v-model="form.siteCode" placeholder="请选择工厂编码"placement="bottom">
<el-option
v-for="item in factoryOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="10"align="left">
<el-form-item label="盘点仓库" prop="userDefined1">
<el-input v-model="form.userDefined1" placeholder="请输入盘点仓库"/>
<el-select v-model="form.userDefined1" placeholder="请选择盘点仓库">
<el-option
v-for="item in Optionlistck"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="盘点位置" prop="locCode">
<el-input v-model="form.locCode" placeholder="请输入盘点位置"/>
<el-col :span="10"align="left">
<el-form-item label="盘点位置" prop="userDefined1">
<el-select v-model="form.locCode" placeholder="请选择盘点位置"placement="bottom">
<el-option
v-for="item in Optionlistck"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="10" align="left">
<el-form-item label="盘点类型" prop="userDefined3">
<el-input v-model="form.userDefined3" placeholder="请输入盘点类型"/>
<el-select v-model="form.userDefined3" placeholder="请选择盘点类型"placement="bottom">
<el-option label="明盘" value="0"></el-option>
<el-option label="盲盘" value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="10" align="left">
<el-form-item label="盘点策略" prop="userDefined10">
<el-input v-model="form.userDefined10" placeholder="请输入盘点策略"/>
<el-select v-model="form.userDefined10" placeholder="请选择盘点策略"placement="bottom">
<el-option label="物料盘点" value="0"></el-option>
<el-option label="库位盘点" value="1"></el-option>
<el-option label="手工盘点" value="2"></el-option>
<el-option label="变动盘点" value="3"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="10">
<el-form-item label="产品状态" prop="userDefined11">
<el-input v-model="form.userDefined11" placeholder="请输入用户自定义属性11"/>
<el-select v-model="form.userDefined11" placeholder="请选择产品状态"placement="bottom">
<el-option label="全部" value="0"></el-option>
<el-option label="非限制" value="1"></el-option>
<el-option label="冻结" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="10">
<el-form-item label="备注" prop="Remark">
<el-input v-model="form.Remark" type="textarea" placeholder="请输入内容"/>
</el-form-item>
@ -256,29 +300,28 @@
</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-delete" size="mini" @click="Warehempty"></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-button type="primary" plain icon="el-icon-plus" size="mini" @click="WarehouseLocationCreationTWO()"></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="wlCode" />
<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="incomeBatchNo" />-->
<el-table-column label="产品编码" align="center" prop="productCode" />
<el-table-column label="产品名称" align="center" prop="productName" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="应盘数量" align="center" prop="quantity" />
<el-table-column label="应盘数量" align="center" prop="amount" />
<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">
@ -287,12 +330,20 @@
</div>
</el-dialog>
<!--订单选择弹窗-->
<!--订单选择弹窗-----------在父组件中接收选择的数据并将其添加到 selectedItemsList -->
<ItemSelectWorkOrderk
ref="ItemSelectWorkOrderk"
@onSelected="onSelectWorkOrder"
></ItemSelectWorkOrderk>
<ItemSelectWorkOrderkTwo
ref="ItemSelectWorkOrderkTwo"
@onSelected="onSelectWorkOrder"
></ItemSelectWorkOrderkTwo>
</div>
</template>
@ -300,19 +351,24 @@
import {
listSystemFinished,
getSystemFinished,
addOdsProductEmbryoInventory,
delSystemFinished,
addSystemFinished,
updateSystemFinished } from "@/api/systemFinished/systemFinished";
import ItemSelectWorkOrderk from "./selectWorkOrder.vue";
import ItemSelectWorkOrderkTwo from "./selectWorkOrderTwo.vue";
import {getBoardFactory} from "../../../api/kanban/Packagingline";
import {getlistCK} from "../../../api/wms/outorder";
export default {
name: "SystemFinished",
components: { ItemSelectWorkOrderk},
components: { ItemSelectWorkOrderk,ItemSelectWorkOrderkTwo},
data() {
return {
//
loading: true,
//
selectedItemsList: [],
//
showFlags:false,
//
@ -330,7 +386,9 @@
//
systemFinishedList: [],
//
factoryOptions:[],
Optionlistck:[],
locCodelistck:[],
//
title: "",
//
@ -430,6 +488,7 @@
//
cancel() {
this.open = false;
this.addoutorderList = []; //
this.reset();
},
//
@ -479,7 +538,50 @@
this.resetForm("queryForm");
this.handleQuery();
},
//
/** 提交按钮 */
// submitForm() {
// this.$refs["form"].validate(valid => {
// console.log("-"+valid)
// if (valid) {
// console.log("---"+this.form)
//
// // 使 JSON.stringify()
// console.log("--- Form Data:", JSON.stringify(this.form));
//
// }
// });
// console.log("---"+this.addoutorderList)
// this.addoutorderList.forEach(item => {
// console.log(item);
// });
//
// addOdsProductEmbryoInventory().then(response => {
//
// });
//
// },
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
// formDataform
const formData = Object.assign({}, this.form);
// addoutorderListformData
formData.addoutorderList = this.addoutorderList;
//
console.log("Merged Data:", formData);
const jsonData = JSON.stringify(formData);
//
addOdsProductEmbryoInventory(jsonData).then(response => {
//
}).catch(error => {
//
});
}
});
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.ID)
this.single = selection.length !== 1
@ -490,7 +592,28 @@
this.reset();
this.open = true;
this.title = "盘点新增";
this.selectfactoryCodelist();
this.form.siteCode = '1000';
this.getselect();
},
getselect() {
// config.headers['poolName'] = localStorage.getItem('USER_POOL_NAME_CURRENT');
let factoryCode = localStorage.getItem('USER_POOL_NAME_CURRENT').substring(3)
let params = { factoryCode: factoryCode }; //
let paramsJSON = JSON.stringify(params); // JSON
console.log(factoryCode)
getlistCK(paramsJSON).then(response => {
//this.Optionlistck = response.data
console.log(response)
if (response.data) {
this.Optionlistck = response.data.map(item => ({
value: item.userDefined1,
label: item.userDefined2
}));
}
// console.log(this.Optionlistck)
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
@ -502,30 +625,69 @@
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);
}
handleDeleteRW(row) {
console.log("Row Object:", row);
}
if (row && row.storageId) {
let datas = this.addoutorderList;
for (var i = 0; i < datas.length; i++) {
if (datas[i].storageId === row.storageId) {
datas.splice(i, 1);
break;
}
}
} else {
console.error("Unique identifier 'storageId' is not defined in the row object.");
}
},
selectfactoryCodelist() {
const _this = this;
// getFactoryData
getBoardFactory({
factory: null
})
.then((response) => {
console.log(response)
if (response.data) {
_this.factoryOptions = response.data.map(item => ({
value: item.parentName,
label: item.deptName
}));
}
})
.catch((error) => {
console.error("Failed to fetch factory data: ", error);
});
},
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;
});
WarehouseLocationCreationTWO(){
console.log("---sda")
this.$refs.ItemSelectWorkOrderkTwo.showFlags = true;
console.log("---ssda")
},
Warehempty(){
this.addoutorderList = []; //
},
onSelectWorkOrder(selectedData) {
console.log("----------;;"+selectedData.length)
// this.form.unit = selectedData.unit;
// this.form.productName = selectedData.productName;
// this.form.productCode = selectedData.productCode;
// this.form.amount = selectedData.amount;
// this.form.wlCode = selectedData.wlCode;
// this.form.sn = selectedData.sn;
// addoutorderList
// this.addoutorderList.push(selectedData);
this.addoutorderList.push(...selectedData);
//--
// getBatchList(obj.workorderCode).then(response => {
// this.batchList = response;
// });
},
MaterialCreation(){

@ -1,5 +1,5 @@
<template>
<el-dialog title="生产订单号选择"
<el-dialog title="仓库/位置创建"
v-if="showFlags"
:visible.sync="showFlags"
:modal= false
@ -8,37 +8,31 @@
<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-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center">
<el-form-item label="库位">
<el-input
v-model="queryParams.orderNo"
placeholder="订单号"
v-model="queryParams.wlCode"
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-column width="30" align="center" type="selection"/>
<el-table-column label="单位" align="left" prop="unit" width="80"/>
<el-table-column label="产品编码" align="center" prop="productCode" width="200" />
<el-table-column label="产品名称" align="center" prop="productName" width="200" />
<el-table-column label="库位" align="center" prop="wlCode" width="200" />
<el-table-column label="库存" align="center" prop="amount" width="100" />
<el-table-column label="托盘号" align="center" prop="sn" width="200" />
</el-table>
<pagination
v-show="total>0"
:total="total"
@ -57,6 +51,8 @@
<script>
import {listDetailed, listDetailedunt} from "../../../api/wms/detailed";
export default {
name: "itemSelectWorkOrder",
data() {
@ -85,7 +81,8 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
workorderCode: ''
wlCode: null,
activeFlag:'1'
},
selectionRow:{}
};
@ -100,20 +97,20 @@ export default {
return cellValue.slice(7,18); //
},
//
orderCodeFormate(row, column, cellValue){
if(cellValue !=null){
return cellValue.slice(3,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;
// }
// );
listDetailedunt(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
@ -131,17 +128,20 @@ export default {
//
handleBomSelectionChange(selection) {
//
// console.log("------"+selection.length)
// if(selection.length>0){
this.selectionRow = selection
if(selection.length>1){
this.$modal.msgSuccess("只能选一个");
}
this.selectionRow = selection[0]
// }
},
// submitLLOrderForm()
submitLLOrderForm() {
this.$emit('onSelected', this.selectionRow);
console.log("------"+this.selectionRow.length)
if (this.selectionRow.length>0){
this.$emit('onSelected', this.selectionRow);
}
this.showFlags = false;
}
}

@ -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="center">
<el-form-item label="产品编码">
<el-input
v-model="queryParams.productCode"
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="30" align="center" type="selection"/>
<el-table-column label="单位" align="left" prop="unit" width="80"/>
<el-table-column label="产品编码" align="center" prop="productCode" width="200" />
<el-table-column label="产品名称" align="center" prop="productName" width="200" />
<el-table-column label="库位" align="center" prop="wlCode" width="200" />
<el-table-column label="库存" align="center" prop="amount" width="100" />
<el-table-column label="托盘号" align="center" prop="sn" width="200" />
</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>
import {listDetailed, listDetailedunt} from "../../../api/wms/detailed";
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,
wlCode: null,
activeFlag:'1'
},
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;
listDetailedunt(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) {
//
// console.log("------"+selection.length)
// if(selection.length>0){
this.selectionRow = selection
// }
},
// submitLLOrderForm()
submitLLOrderForm() {
console.log("------"+this.selectionRow.length)
if (this.selectionRow.length>0){
this.$emit('onSelected', this.selectionRow);
}
this.showFlags = false;
}
}
};
</script>
Loading…
Cancel
Save