|
|
|
@ -19,41 +19,35 @@
|
|
|
|
|
<!-- @keyup.enter.native="handleQuery"-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<el-form-item label="批次" prop="userDefined2">
|
|
|
|
|
<el-form-item label="物料号" prop="matnr">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.userDefined2"
|
|
|
|
|
placeholder="请输入仓库"
|
|
|
|
|
v-model="queryParams.matnr"
|
|
|
|
|
placeholder="请输入物料号"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="仓库" prop="whCode">
|
|
|
|
|
<el-form-item label="批次" prop="charg">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.charg"
|
|
|
|
|
placeholder="请输入批次"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="库存地点" prop="lgort">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.whCode"
|
|
|
|
|
placeholder="请输入仓库"
|
|
|
|
|
v-model="queryParams.lgort"
|
|
|
|
|
placeholder="请输入库存地点"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="库区" prop="waCode">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="物料描述" prop="maktx">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.waCode"
|
|
|
|
|
placeholder="请输入库区"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料号" prop="materialCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.materialCode"
|
|
|
|
|
placeholder="请输入物料号"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="物料描述" prop="materialDesc">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.materialDesc"
|
|
|
|
|
v-model="queryParams.maktx"
|
|
|
|
|
placeholder="请输入物料描述"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
@ -103,39 +97,35 @@
|
|
|
|
|
:summary-align="'center'"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
<el-table-column label="唯一序列号" align="center" prop="mateOrderInSnId" v-if="false" />
|
|
|
|
|
<el-table-column label="送货时间" align="center" prop="gmtCreate" width="100">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="唯一序列号" align="center" prop="storageId" v-if="false" />
|
|
|
|
|
<!-- <el-table-column label="送货时间" align="center" prop="gmtCreate" width="100">-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- <span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
|
|
|
|
|
<el-table-column label="物料号" align="center" prop="materialCode" width="120">
|
|
|
|
|
<el-table-column label="物料号" align="center" prop="matnr" width="120">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ formatProductCode(scope.row.materialCode) }}</span>
|
|
|
|
|
<span>{{ formatProductCode(scope.row.matnr) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="物料描述" align="center" prop="materialDesc" width="300"/>
|
|
|
|
|
<el-table-column label="送货单" align="center" prop="poNo" width="100"/>
|
|
|
|
|
<el-table-column label="采购单" align="center" prop="orderNo" width="100"/>
|
|
|
|
|
<el-table-column label="批次" align="center" prop="userDefined2" width="100"/>
|
|
|
|
|
<el-table-column label="入库数量" align="center" prop="amount" />
|
|
|
|
|
<el-table-column label="出库数量" align="center" prop="outNumber" />
|
|
|
|
|
<el-table-column label="剩余数量" align="center">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ scope.row.amount - (scope.row.outNumber || 0) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="状态" align="center" prop="status">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span v-if="scope.row.outNumber === 0 || scope.row.outNumber === null">入库</span>
|
|
|
|
|
<span v-else-if="scope.row.amount - scope.row.outNumber > 0 && (scope.row.outNumber !== 0 && scope.row.outNumber !== null)">部分出库</span>
|
|
|
|
|
<span v-else>出库完成</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="标识卡" align="center" prop="wlCode" width="300"/>
|
|
|
|
|
<el-table-column label="仓库" align="center" prop="whCode" />
|
|
|
|
|
<el-table-column label="库区" align="center" prop="waCode" />
|
|
|
|
|
<el-table-column label="物料描述" align="center" prop="maktx" width="120"/>
|
|
|
|
|
<el-table-column label="工厂" align="center" prop="werks" width="80"/>
|
|
|
|
|
<el-table-column label="库存地点" align="center" prop="lgort" width="80"/>
|
|
|
|
|
<el-table-column label="批号" align="center" prop="charg" width="120"/>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="物料组" align="center" prop="matkl" width="80"/>
|
|
|
|
|
<el-table-column label="单位" align="center" prop="meins" width="80"/>
|
|
|
|
|
|
|
|
|
|
<el-table-column label="非限制库存" align="center" prop="clabs" width="120"/>
|
|
|
|
|
<el-table-column label="质检库存" align="center" prop="cinsm" width="120"/>
|
|
|
|
|
lgort
|
|
|
|
|
<el-table-column label="限制库存" align="center" prop="ceinm" width="120" />
|
|
|
|
|
<el-table-column label="冻结库存" align="center" prop="cspem" width="120" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-table-column label="仓库" align="center" prop="whCode" />-->
|
|
|
|
|
<!-- <el-table-column label="库区" align="center" prop="waCode" />-->
|
|
|
|
|
<el-table-column label="备用1" align="center" prop="userDefined1" v-if="false" />
|
|
|
|
|
<el-table-column label="备用2" align="center" prop="userDefined2" v-if="false" />
|
|
|
|
|
<el-table-column label="备用3" align="center" prop="userDefined3" v-if="false" />
|
|
|
|
@ -146,11 +136,11 @@
|
|
|
|
|
<el-table-column label="备用8" align="center" prop="userDefined8" v-if="false" />
|
|
|
|
|
<el-table-column label="备用9" align="center" prop="userDefined9" v-if="false" />
|
|
|
|
|
<el-table-column label="备用10" align="center" prop="userDefined10" v-if="false" />
|
|
|
|
|
<el-table-column label="创建时间" align="center" prop="gmtCreate" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column label="创建时间" align="center" prop="gmtCreate" width="180">-->
|
|
|
|
|
<!-- <template slot-scope="scope">-->
|
|
|
|
|
<!-- <span>{{ parseTime(scope.row.gmtCreate, '{y}-{m}-{d}') }}</span>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<el-table-column label="有效标记" align="center" prop="activeFlag"v-if="false" />
|
|
|
|
|
<el-table-column label="工厂号" align="center" prop="factoryCode" />
|
|
|
|
|
</el-table>
|
|
|
|
@ -310,10 +300,10 @@
|
|
|
|
|
<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="materialDesc" width="255"/>
|
|
|
|
|
<el-table-column label="物料编码" align="center" prop="materialCode" width="150">
|
|
|
|
|
<el-table-column label="物料描述" align="center" prop="maktx" width="255"/>
|
|
|
|
|
<el-table-column label="物料编码" align="center" prop="matnr" width="150">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ formatProductCode(scope.row.materialCode) }}</span>
|
|
|
|
|
<span>{{ formatProductCode(scope.row.matnr) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单位" align="center" prop="userDefined1" />
|
|
|
|
@ -345,7 +335,7 @@
|
|
|
|
|
<!-- 查询条件 -->
|
|
|
|
|
<el-form :inline="true" :model="queryParams" class="demo-form-inline">
|
|
|
|
|
<el-form-item label="物料号">
|
|
|
|
|
<el-input v-model="queryParams.materialCode" placeholder="请输入物料号"></el-input>
|
|
|
|
|
<el-input v-model="queryParams.matnr" placeholder="请输入物料号"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" @click="fetchMaterials">查询</el-button>
|
|
|
|
@ -354,10 +344,10 @@
|
|
|
|
|
<el-table :data="materialList" @selection-change="handleMaterialSelectionChange">
|
|
|
|
|
<el-table-column type="selection" width="55" />
|
|
|
|
|
<el-table-column label="ID" align="center" prop="ID" v-if="false" />
|
|
|
|
|
<el-table-column label="物料描述" prop="materialDesc" width="250"/>
|
|
|
|
|
<el-table-column label="物料编码" align="center" prop="materialCode" width="150">
|
|
|
|
|
<el-table-column label="物料描述" prop="maktx" width="250"/>
|
|
|
|
|
<el-table-column label="物料编码" align="center" prop="matnr" width="150">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ formatProductCode(scope.row.materialCode) }}</span>
|
|
|
|
|
<span>{{ formatProductCode(scope.row.matnr) }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="单位" prop="userDefined1" width="100"/>
|
|
|
|
@ -385,7 +375,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listMatetowsn,cardDy, cardBD,Removecard,getMatetowsn, delMatetowsn, addMatetowsn, updateMatetowsn } from "@/api/wms/matetowsn";
|
|
|
|
|
import { listMatetowsn,listsaplist,cardDy, cardBD,Removecard,getMatetowsn, delMatetowsn, addMatetowsn, updateMatetowsn } from "@/api/wms/matetowsn";
|
|
|
|
|
import {
|
|
|
|
|
listOutorder,
|
|
|
|
|
getOutorder,
|
|
|
|
@ -446,23 +436,25 @@ export default {
|
|
|
|
|
productionDate: '', // 生产日期
|
|
|
|
|
shelfLifeExpiryDate: '' ,// 货架寿命到期日
|
|
|
|
|
planDateMin: '',
|
|
|
|
|
materialCode:'',
|
|
|
|
|
matnr:'',
|
|
|
|
|
costCenter: '' // 新增成本中心字段
|
|
|
|
|
},
|
|
|
|
|
queryParams: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
whCode: null,
|
|
|
|
|
lgort:null,
|
|
|
|
|
waCode: null,
|
|
|
|
|
wlCode: null,
|
|
|
|
|
orderNo: null,
|
|
|
|
|
poNo: null,
|
|
|
|
|
meins: null,
|
|
|
|
|
matkl: null,
|
|
|
|
|
poLine: null,
|
|
|
|
|
materialCode: null,
|
|
|
|
|
materialDesc: null,
|
|
|
|
|
matnr: null,
|
|
|
|
|
maktx: null,
|
|
|
|
|
sn: null,
|
|
|
|
|
barCode: null,
|
|
|
|
|
amount: null,
|
|
|
|
|
charg: null,
|
|
|
|
|
userDefined1: null,
|
|
|
|
|
userDefined2: null,
|
|
|
|
|
userDefined3: null,
|
|
|
|
@ -495,7 +487,7 @@ export default {
|
|
|
|
|
/** 查询包材库存明细表列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listMatetowsn(this.queryParams).then(response => {
|
|
|
|
|
listsaplist(this.queryParams).then(response => {
|
|
|
|
|
this.matetowsnList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -512,7 +504,7 @@ export default {
|
|
|
|
|
/** 过账按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
const ids = row.id || this.ids;
|
|
|
|
|
let postData = this.ids.map(id => ({ mateOrderInSnId: id }));
|
|
|
|
|
let postData = this.ids.map(id => ({ storageId: id }));
|
|
|
|
|
console.log(postData)
|
|
|
|
|
this.$modal.confirm('是否进行打印').then(function() {
|
|
|
|
|
return cardDy(JSON.stringify(postData));
|
|
|
|
@ -536,16 +528,19 @@ export default {
|
|
|
|
|
// },
|
|
|
|
|
getSummary(param) {
|
|
|
|
|
const { columns, data } = param;
|
|
|
|
|
const totalAmount = data.reduce((sum, row) => sum + (row.amount || 0), 0);
|
|
|
|
|
const totalOutNumber = data.reduce((sum, row) => sum + (row.outNumber || 0), 0);
|
|
|
|
|
const totalRemaining = totalAmount - totalOutNumber;
|
|
|
|
|
const totalAmount = data.reduce((sum, row) => sum + (Number(row.clabs) || 0), 0);
|
|
|
|
|
const totalOutNumber = data.reduce((sum, row) => sum + (Number(row.cinsm) || 0), 0);
|
|
|
|
|
const totalRemaining = data.reduce((sum, row) => sum + (Number(row.ceinm) || 0), 0);
|
|
|
|
|
const totalRemacspem = data.reduce((sum, row) => sum + (Number(row.cspem) || 0), 0);
|
|
|
|
|
const summary = columns.map((column, index) => {
|
|
|
|
|
if (index === 7) { // "计划数量"在第8列
|
|
|
|
|
if (index === 8) { // "计划数量"在第8列
|
|
|
|
|
return totalAmount;
|
|
|
|
|
} else if (index === 8) { // "已入库数量"在第9列
|
|
|
|
|
} else if (index === 9) { // "已入库数量"在第9列
|
|
|
|
|
return totalOutNumber;
|
|
|
|
|
}else if (index === 9) { // "已入库数量"在第9列
|
|
|
|
|
}else if (index === 10) { // "已入库数量"在第9列
|
|
|
|
|
return totalRemaining;
|
|
|
|
|
}else if (index === 11) { // "已入库数量"在第9列
|
|
|
|
|
return totalRemacspem;
|
|
|
|
|
}
|
|
|
|
|
return ''; // 其余列不汇总,返回空
|
|
|
|
|
});
|
|
|
|
@ -596,7 +591,7 @@ export default {
|
|
|
|
|
for (const material of this.selectedMaterials) {
|
|
|
|
|
let queryParams = {
|
|
|
|
|
produceCode: material.produceCode,
|
|
|
|
|
materialCode: material.materialCode
|
|
|
|
|
matnr: material.matnr
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
@ -607,9 +602,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
materialsToAdd.push({
|
|
|
|
|
produceCode: material.produceCode,
|
|
|
|
|
materialDesc: material.materialDesc,
|
|
|
|
|
maktx: material.maktx,
|
|
|
|
|
userDefined1: material.userDefined1,
|
|
|
|
|
materialCode: material.materialCode,
|
|
|
|
|
matnr: material.matnr,
|
|
|
|
|
planNumber: material.planNumber, // 数量
|
|
|
|
|
outNumber: material.outNumber, // 出库数量
|
|
|
|
|
bgnumber: material.bgnumber, // 报工数量
|
|
|
|
@ -628,7 +623,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
handleRemoveBatch() {
|
|
|
|
|
const ids = this.ids;
|
|
|
|
|
let postData = this.ids.map(id => ({ mateOrderInSnId: id }));
|
|
|
|
|
let postData = this.ids.map(id => ({ storageId: id }));
|
|
|
|
|
console.log(postData)
|
|
|
|
|
this.$modal.confirm('是否确认删除标识卡编号为"' + wlCode + '"的数据项?').then(function() {
|
|
|
|
|
return Removecard(postData);
|
|
|
|
@ -665,15 +660,15 @@ export default {
|
|
|
|
|
// 表单重置
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
mateOrderInSnId: null,
|
|
|
|
|
whCode: null,
|
|
|
|
|
storageId: null,
|
|
|
|
|
lgort: null,
|
|
|
|
|
waCode: null,
|
|
|
|
|
wlCode: null,
|
|
|
|
|
orderNo: null,
|
|
|
|
|
poNo: null,
|
|
|
|
|
meins: null,
|
|
|
|
|
matkl: null,
|
|
|
|
|
poLine: null,
|
|
|
|
|
materialCode: null,
|
|
|
|
|
materialDesc: null,
|
|
|
|
|
matnr: null,
|
|
|
|
|
maktx: null,
|
|
|
|
|
sn: null,
|
|
|
|
|
barCode: null,
|
|
|
|
|
amount: null,
|
|
|
|
@ -709,7 +704,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.mateOrderInSnId)
|
|
|
|
|
this.ids = selection.map(item => item.storageId)
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
},
|
|
|
|
@ -741,8 +736,8 @@ export default {
|
|
|
|
|
qty: item.qty, // 计划数量
|
|
|
|
|
userDefined6: this.selectedOrderType, // 订单类型
|
|
|
|
|
produceCode: item.produceCode, // 生产代码
|
|
|
|
|
materialDesc: item.materialDesc, // 物料描述
|
|
|
|
|
materialCode: item.materialCode, // 物料编码
|
|
|
|
|
maktx: item.maktx, // 物料描述
|
|
|
|
|
matnr: item.matnr, // 物料编码
|
|
|
|
|
unit: item.userDefined1,
|
|
|
|
|
// 注意:根据您的描述,可能没有 unit 字段,请确认是否需要
|
|
|
|
|
// unit: item.unit,
|
|
|
|
@ -782,9 +777,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const mateOrderInSnIds = row.mateOrderInSnId || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除包材库存明细表编号为"' + mateOrderInSnIds + '"的数据项?').then(function() {
|
|
|
|
|
return delMatetowsn(mateOrderInSnIds);
|
|
|
|
|
const storageIds = row.storageId || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除包材库存明细表编号为"' + storageIds + '"的数据项?').then(function() {
|
|
|
|
|
return delMatetowsn(storageIds);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|