入库管理页面修改

This commit is contained in:
liuhanqing
2025-10-20 16:29:40 +08:00
parent 25a740496d
commit df43ffd1b9
9 changed files with 81 additions and 87 deletions

View File

@@ -27,6 +27,9 @@ public class InstockInVo {
@NotNull
private String erpBill;
@NotNull
private String productType;
private List<BasProduct> productVoList;

View File

@@ -108,6 +108,7 @@ public class InStockinServiceImpl implements IInStockinService
inStockin.setWarehouseId(inStockinVo.getWarehouseId());
inStockin.setStatus("1");
inStockin.setStockSource("1");
inStockin.setSpare1(inStockinVo.getProductType());
inStockinMapper.insertInStockin(inStockin);
for (int i = 1; i <= productVoList.size(); i++) {
BasProduct basProduct = productVoList.get(i-1);

View File

@@ -323,6 +323,7 @@ public class MydoJobServiceImpl implements IMydoJobService {
//正常库存
BasStock stockByInStockinDetail = getStockByInStockinDetail(mydoJobDetail, mydoJob, "1");
stockByInStockinDetail.setSpare7("0");
list.add(stockByInStockinDetail);
}

View File

@@ -111,6 +111,8 @@ public class MydoJobDetail extends BaseEntity
/** 供应商ID */
@Excel(name = "供应商ID")
private String supplierId;
@Excel(name = "供应商")
private String supplierName;
/** 备用字段1 */
@Excel(name = "型号")

View File

@@ -40,6 +40,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="spec" column="spec" />
<result property="unit" column="unit" />
<result property="productName" column="product_name" />
<result property="supplierName" column="supplier_name" />
</resultMap>
@@ -146,9 +148,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mjd.spare8,
mjd.spare9,
mjd.spec,
mjd.unit
mjd.unit,
bs.supplier_name
from mydo_job_detail_finish mjd
left join bas_product bp on mjd.product_id = bp.product_id
left join bas_supplier bs on mjd.supplier_id = bs.supplier_no
where job_id = #{jobId}
</select>

View File

@@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="unit" column="unit" />
<result property="productName" column="product_name" />
<result property="trayCode" column="tray_code" />
<result property="supplierName" column="supplier_name" />
</resultMap>
<select id="selectMydoJobDetailList" parameterType="MydoJobDetail" resultMap="MydoJobDetailResult">
@@ -80,10 +81,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mjd.spare8,
mjd.spare9,
mjd.spec,
mjd.unit
mjd.unit,
bs.supplier_name
from mydo_job_detail mjd
left join bas_product bp on mjd.product_id = bp.product_id
left join bas_supplier bs on mjd.supplier_id = bs.supplier_no
<where>
<if test="jobDetailId != null and jobDetailId != ''"> and mjd.job_detail_id = #{jobDetailId}</if>
<if test="jobId != null and jobId != ''"> and mjd.job_id = #{jobId}</if>

View File

@@ -80,21 +80,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="仓库" prop="warehouseId">&lt;!&ndash;仓库&ndash;&gt;-->
<!-- <el-select-->
<!-- v-model="queryParams.warehouseId"-->
<!-- placeholder="请选择仓库"-->
<!-- clearable-->
<!-- @change="handleQuery"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in warehouseOptions"-->
<!-- :key="item.warehouseId"-->
<!-- :label="item.warehouseName"-->
<!-- :value="item.warehouseId"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="仓库" prop="warehouseId"><!--仓库-->
<el-select
v-model="queryParams.warehouseId"
placeholder="请选择仓库"
clearable
@change="handleQuery"
>
<el-option
v-for="item in warehouseOptions"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId"
/>
</el-select>
</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>
@@ -145,7 +145,7 @@
</template>
</el-table-column>
<el-table-column label="任务号" align="left" prop="taskNo" />
<!-- <el-table-column label="托盘码" align="left" prop="trayCode" width="140" />-->
<el-table-column label="托盘码" align="left" prop="trayCode" width="140" />
<el-table-column label="货位" align="left" prop="cargoSpaceName" width="140" />
<!-- <el-table-column label="优先级" align="left" prop="priority" />-->
<!-- <el-table-column label="执行阶段" align="left" prop="executionPhase">-->
@@ -153,9 +153,9 @@
<!-- <dict-tag :options="dict.type.execution_phase_type" :value="scope.row.executionPhase"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="订单号" align="left" prop="lineId" />
<!-- <el-table-column label="订单号" align="left" prop="lineId" />-->
<el-table-column label="入口" align="left" prop="entranceId" />
<!-- <el-table-column label="仓库" align="left" prop="warehouseName" />-->
<el-table-column label="仓库" align="left" prop="warehouseName" />
<el-table-column label="创建时间" align="left" prop="createTime" width="180"/>
<el-table-column label="开始时间" align="left" prop="startTime" width="180"/>
<el-table-column label="结束时间" align="left" prop="finishTime" width="180"/>
@@ -181,17 +181,41 @@
<el-table-column label="物料名称" align="left" prop="productName" />
<el-table-column label="批号" align="left" prop="lotNo" />
<el-table-column label="入库数量" align="right" prop="inQuantity" />
<el-table-column label="机型" align="left" prop="unit"/><!--机型-->
<el-table-column label="分销" align="left" prop="spare9"/><!--分销-->
<el-table-column label="规格" align="left" prop="spec"/><!--规格-->
<el-table-column label="型号" align="left" prop="spare1"/><!--型号-->
<el-table-column label="净重" align="left" prop="spare2"/><!--净重-->
<el-table-column label="颜色" align="left" prop="spare3"/><!--颜色-->
<el-table-column label="序列号" align="left" prop="spare4" width="130"/><!--序列号-->
<el-table-column label="电压" align="left" prop="spare5"/><!--电压-->
<el-table-column label="功率" align="left" prop="spare6"/><!--功率-->
<el-table-column label="相位" align="left" prop="spare7"/><!--相位-->
<el-table-column label="毛重" align="left" prop="spare8"/><!--毛重-->
<el-table-column label="生产图号" align="left" prop="stackingId" />
<el-table-column label="单价" align="left" prop="printDate" />
<el-table-column label="供应商" align="left" prop="supplierName" />
<el-table-column label="来源" align="left" prop="spare1" ><!--来源-->
<template slot-scope="scope">
<dict-tag :options="dict.type.origin_type" :value="scope.row.spare1"/>
</template>
</el-table-column>
<el-table-column label="状态" align="left" prop="spare2" ><!--用途-->
<template slot-scope="scope">
<dict-tag :options="dict.type.turnover_type" :value="scope.row.spare2"/>
</template>
</el-table-column>
<el-table-column label="套账" align="left" prop="spare3" ><!--用途-->
<template slot-scope="scope">
<dict-tag :options="dict.type.account_type" :value="scope.row.spare3"/>
</template>
</el-table-column>
<el-table-column label="用途" align="left" prop="spare4" ><!--用途-->
<template slot-scope="scope">
<dict-tag :options="dict.type.purpose_type" :value="scope.row.spare4"/>
</template>
</el-table-column>
<el-table-column label="台次" align="left" prop="spare5" />
<el-table-column label="合同号" align="left" prop="spare6" />
<el-table-column label="件次" align="left" prop="spare7" />
<el-table-column label="质量等级" align="left" prop="spare8" ><!--用途-->
<template slot-scope="scope">
<dict-tag :options="dict.type.quality_type" :value="scope.row.spare8"/>
</template>
</el-table-column>
<el-table-column label="管理号" align="left" prop="spare9" />
<el-table-column label="规格" align="left" prop="spec" />
<el-table-column label="单位" align="left" prop="unit" />
</el-table>
<pagination
@@ -213,7 +237,7 @@ import {listWarehouse} from "@/api/bas/warehouse";
export default {
name: "MydoJob",
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status'],
dicts: ['execution_phase_type', 'in_job_type', 'on_line_type', 'mydo_job_status','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type'],
data() {
return {
// 遮罩层

View File

@@ -12,7 +12,7 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="形态类型" prop="inType"><!--形态类型-->
<el-form-item label="形态类型" prop="productType"><!--形态类型-->
<el-select v-model="form.productType" placeholder="请选择形态类型" >
<el-option
v-for="dict in dict.type.product_type"
@@ -79,7 +79,7 @@
<el-table-column label="规格型号" align="left" prop="spec" />
<el-table-column label="生产图号" align="left" prop="cargoNo" />
<el-table-column label="单位" align="left" prop="unit" />
<el-table-column label="单价" align="left" prop="price" />
<!-- <el-table-column label="单价" align="left" prop="price" /> -->
<el-table-column label="来源" align="left" prop="spare1" >
<template slot-scope="scope">
<el-select v-model="scope.row.spare1" placeholder="请选择来源" >
@@ -342,6 +342,7 @@ export default {
netWeight:0,
grossWeight:0,
file: undefined,
productTpe:undefined,
},
// 表单校验
rules: {
@@ -567,6 +568,7 @@ export default {
supplierName: undefined,
remark: undefined,
totalQuantity: 0,
productTpe: undefined
// totalAmount: 0,
};
// 清空物料列表
@@ -588,58 +590,6 @@ export default {
this.$modal.msgError('请添加物料');
return;
}
//校验lotNo productGuid quantity 不能为空
for (let i = 0; i < this.productList.length; i++) {
const item = this.productList[i];
if (!item.spare1) {
this.$modal.msgError(`物料编码 ${item.productId} 的型号未填写`);
return;
}
if (!item.spare2) {
this.$modal.msgError(`物料编码 ${item.productId} 的净重未填写`);
return;
}
if (!item.spare3) {
this.$modal.msgError(`物料编码 ${item.productId} 的颜色未填写`);
return;
}
if (!item.spare4) {
this.$modal.msgError(`物料编码 ${item.productId} 的序列号未填写`);
return;
}
if (!item.spare5) {
this.$modal.msgError(`物料编码 ${item.productId} 的电压未填写`);
return;
}
if (!item.spare6) {
this.$modal.msgError(`物料编码 ${item.productId} 的功率未填写`);
return;
}
if (!item.spare7) {
this.$modal.msgError(`物料编码 ${item.productId} 的相位未填写`);
return;
}
if (!item.spare8) {
this.$modal.msgError(`物料编码 ${item.productId} 的毛重未填写`);
return;
}
if (!item.quantity) {
this.$modal.msgError(`物料编码 ${item.productId} 的数量未填写`);
return;
}
if (!item.lotNo) {
this.$modal.msgError(`物料编码 ${item.productId} 的批次号未填写`);
return;
}
if (!item.unit) {
this.$modal.msgError(`物料编码 ${item.productId} 的机型未填写`);
return;
}
if (!item.spare9) {
this.$modal.msgError(`物料编码 ${item.productId} 的分销未填写`);
return;
}
}
// 构建请求数据
const data = {
@@ -648,6 +598,7 @@ export default {
remark: this.form.remark,
inType:this.form.inType,
erpBill:this.form.erpBill,
productType:this.form.productType,
productVoList: this.productList.map(item => ({
productId: item.productId,
quantity: item.quantity,

View File

@@ -150,6 +150,11 @@
<dict-tag :options="dict.type.bill_resource" :value="scope.row.stockSource"/>
</template>
</el-table-column>
<el-table-column label="形态类型" align="left" prop="spare1"><!--形态类型-->
<template slot-scope="scope">
<dict-tag :options="dict.type.product_type" :value="scope.row.spare1"/>
</template>
</el-table-column>
<el-table-column label="仓库" align="left" prop="warehouseName"/><!--仓库-->
<el-table-column label="创建人" align="left" prop="createManName"/><!--创建人-->
<el-table-column label="部门" align="left" prop="departmentName"/><!--部门-->
@@ -253,7 +258,7 @@ import VueQr from 'vue-qr'
export default {
name: "StockIn",
dicts: ['bill_resource', 'in_bill_status', 'in_bill_type','bill_resource','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type'],
dicts: ['bill_resource','product_type', 'in_bill_status', 'in_bill_type','bill_resource','product_type','origin_type','account_type','turnover_type','purpose_type','quality_type'],
components: {
vueEasyPrint,
VueQr