入库管理根据 物料名称和批号搜索
This commit is contained in:
@@ -98,6 +98,25 @@ public class InStockin extends BaseEntity
|
||||
@Excel(name = "备用字段5")
|
||||
private String spare5;
|
||||
|
||||
private String lotNo;
|
||||
private String materialDesc;
|
||||
|
||||
public String getLotNo() {
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo) {
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getMaterialDesc() {
|
||||
return materialDesc;
|
||||
}
|
||||
|
||||
public void setMaterialDesc(String materialDesc) {
|
||||
this.materialDesc = materialDesc;
|
||||
}
|
||||
|
||||
public String getCreateManName() {
|
||||
return createManName;
|
||||
}
|
||||
|
||||
@@ -102,6 +102,25 @@ public class ReceiveStockin extends BaseEntity
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
private String lotNo;
|
||||
private String materialDesc;
|
||||
|
||||
public String getLotNo() {
|
||||
return lotNo;
|
||||
}
|
||||
|
||||
public void setLotNo(String lotNo) {
|
||||
this.lotNo = lotNo;
|
||||
}
|
||||
|
||||
public String getMaterialDesc() {
|
||||
return materialDesc;
|
||||
}
|
||||
|
||||
public void setMaterialDesc(String materialDesc) {
|
||||
this.materialDesc = materialDesc;
|
||||
}
|
||||
|
||||
public String getCreateManName() {
|
||||
return createManName;
|
||||
}
|
||||
|
||||
@@ -131,6 +131,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare3 != null and spare3 != ''"> and is2.spare3 = #{spare3}</if>
|
||||
<if test="spare4 != null and spare4 != ''"> and is2.spare4 = #{spare4}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and is2.spare5 = #{spare5}</if>
|
||||
<if test="materialDesc !=null and materialDesc!=''">
|
||||
and is2.stockin_id in (
|
||||
select distinct stockin_id from in_stockin_detail_finish isd
|
||||
left join bas_product bp on isd.product_id = bp.product_id
|
||||
where bp.product_name like concat('%',#{materialDesc},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="lotNo !=null and lotNo!=''">
|
||||
and is2.stockin_id in (
|
||||
select distinct stockin_id from in_stockin_detail_finish
|
||||
where lot_no like concat('%',#{lotNo},'%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -82,6 +82,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="spare4 != null and spare4 != ''"> and is2.spare4 = #{spare4}</if>
|
||||
<if test="spare3 != null and spare3 != ''"> and is2.spare3 = #{spare3}</if>
|
||||
<if test="spare5 != null and spare5 != ''"> and is2.spare5 = #{spare5}</if>
|
||||
<if test="materialDesc !=null and materialDesc!=''">
|
||||
and is2.stockin_id in (
|
||||
select distinct stockin_id from in_stockin_detail isd
|
||||
left join bas_product bp on isd.product_id = bp.product_id
|
||||
where bp.product_name like concat('%',#{materialDesc},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="lotNo !=null and lotNo!=''">
|
||||
and is2.stockin_id in (
|
||||
select distinct stockin_id from in_stockin_detail
|
||||
where lot_no like concat('%',#{lotNo},'%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -132,6 +132,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customerNo != null and customerNo != ''"> and rs.customer_no = #{customerNo}</if>
|
||||
<if test="classNo != null and classNo != ''"> and rs.class_no = #{classNo}</if>
|
||||
<if test="supplierNo != null and supplierNo != ''"> and rs.supplier_no = #{supplierNo}</if>
|
||||
<if test="materialDesc !=null and materialDesc!=''">
|
||||
and rs.stockin_id in (
|
||||
select distinct stockin_id from receive_stockin_detail_finish rsd
|
||||
left join bas_product bp on rsd.product_id = bp.product_id
|
||||
where bp.product_name like concat('%',#{materialDesc},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="lotNo !=null and lotNo!=''">
|
||||
and rs.stockin_id in (
|
||||
select distinct stockin_id from receive_stockin_detail_finish rsd
|
||||
where rsd.lot_no like concat('%',#{lotNo},'%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -84,6 +84,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customerNo != null and customerNo != ''"> and rs.customer_no = #{customerNo}</if>
|
||||
<if test="classNo != null and classNo != ''"> and rs.class_no = #{classNo}</if>
|
||||
<if test="supplierNo != null and supplierNo != ''"> and rs.supplier_no = #{supplierNo}</if>
|
||||
<if test="materialDesc !=null and materialDesc!=''">
|
||||
and rs.stockin_id in (
|
||||
select distinct stockin_id from receive_stockin_detail rsd
|
||||
left join bas_product bp on rsd.product_id = bp.product_id
|
||||
where bp.product_name like concat('%',#{materialDesc},'%')
|
||||
)
|
||||
</if>
|
||||
<if test="lotNo !=null and lotNo!=''">
|
||||
and rs.stockin_id in (
|
||||
select distinct stockin_id from receive_stockin_detail rsd
|
||||
where rsd.lot_no like concat('%',#{lotNo},'%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ export default {
|
||||
status: 'Document Status',
|
||||
selectStatus: 'Please select document status',
|
||||
search: 'Search',
|
||||
inputMaterialDesc:'inputMaterialDesc',
|
||||
inputLotNo:'inputLotNo',
|
||||
reset: 'Reset',
|
||||
generateStockin: 'Generate Stockin Document',
|
||||
delet: 'Delete',
|
||||
@@ -1431,7 +1433,7 @@ export default {
|
||||
checkPostNameIsNull: 'PostName Can Not Be Null',
|
||||
checkPostCodeIsNull: 'PostCode Can Not Be Null',
|
||||
checkPostSortIsNull: 'PostSort Can Not Be Null',
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -91,6 +91,8 @@ export default {
|
||||
inputSupplierNo:'请输入供应商编码',
|
||||
stockSource:'单据来源',
|
||||
inputStockSource:'请输入单据来源',
|
||||
inputMaterialDesc:'请输入物料描述',
|
||||
inputLotNo:'请输入批号',
|
||||
warehouseId:'仓库',
|
||||
selectWarehouseId:'请选择仓库',
|
||||
status:'单据状态',
|
||||
@@ -928,7 +930,7 @@ export default {
|
||||
checkPostNameIsNull: '岗位名称不能为空',
|
||||
checkPostCodeIsNull: '岗位编码不能为空',
|
||||
checkPostSortIsNull: '岗位顺序不能为空',
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -67,15 +67,29 @@
|
||||
<el-table-column fixed :label="$t('receiveStockinAdd.spare1')" align="center" prop="spare1"/><!--英文描述-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.unit')" align="center" prop="unit" /><!--单位-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.spare2')" align="center" prop="spare2" /><!--单件净重KG-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.totalNetWeight')" align="center" prop="totalNetWeight" /><!--总净重-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.totalNetWeight')" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.quantity * scope.row.spare2).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('receiveStockinAdd.spare3')" align="center" prop="spare3" /><!--箱号-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.spare4')" align="center" prop="spare4" /><!--包装方式-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.spare5')" align="center" prop="spare5" /><!--长MM-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.spare6')" align="center" prop="spare6" /><!--宽MM-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.spare7')" align="center" prop="spare7" /><!--高MM-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.spare8')" align="center" prop="spare8" /><!--体积m³-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.netWeight')" align="center" prop="netWeight" /><!--净重KG-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.grossWeight')" align="center" prop="grossWeight" /><!--毛重KG-->
|
||||
<!-- <el-table-column :label="$t('receiveStockinAdd.netWeight')" align="center" prop="netWeight" />净重KG -->
|
||||
<el-table-column :label="$t('receiveStockinAdd.netWeight')" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.quantity * scope.row.spare2).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column :label="$t('receiveStockinAdd.grossWeight')" align="center" prop="grossWeight" />毛重KG -->
|
||||
<el-table-column :label="$t('receiveStockinAdd.grossWeight')" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ (scope.row.quantity * scope.row.spare2).toFixed(2) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('receiveStockinAdd.price')" align="center" prop="price" /><!--价格-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.remark')" align="center" prop="remark" /><!--描述-->
|
||||
<el-table-column :label="$t('receiveStockinAdd.batchNumber')" width="120" align="center">
|
||||
@@ -135,7 +149,7 @@
|
||||
|
||||
<div class="submit-block" style="margin-top: 20px; text-align: right">
|
||||
<el-button type="primary" @click="submitForm" v-hasPermi="['receive:stockin:add']">{{ $t('receiveStockinAdd.submit') }}</el-button>
|
||||
<el-button @click="cancel">{{ $t('receiveStockinAdd.cancel') }}</el-button>
|
||||
<el-button @click="cancelPri">{{ $t('receiveStockinAdd.cancel') }}</el-button>
|
||||
</div>
|
||||
|
||||
<!-- 选择物料对话框 -->
|
||||
@@ -348,19 +362,8 @@ export default {
|
||||
calculateTotal() {
|
||||
this.totalQuantity = this.productList.reduce((sum, item) => sum + (item.quantity || 0), 0);
|
||||
this.totalAmount = this.productList.reduce((sum, item) => sum + ((item.quantity || 0) * (item.price || 0)), 0);
|
||||
|
||||
// 遍历产品列表,计算每个产品的重量
|
||||
this.productList.forEach(item => {
|
||||
// 计算总净重(单件净重×数量)
|
||||
item.totalNetWeight = (item.quantity || 0) * (item.spare2 || 0);
|
||||
// 净重等于总净重
|
||||
item.netWeight = item.totalNetWeight;
|
||||
// 毛重等于总净重
|
||||
item.grossWeight = item.totalNetWeight;
|
||||
});
|
||||
|
||||
// 计算表单总计
|
||||
this.totalNetWeight = this.productList.reduce((sum, item) => sum + (item.totalNetWeight || 0), 0);
|
||||
this.totalNetWeight = this.productList.reduce((sum, item) => sum + ((item.quantity || 0) * (item.spare2 || 0)), 0);
|
||||
this.netWeight = this.totalNetWeight;
|
||||
this.grossWeight = this.totalNetWeight;
|
||||
|
||||
@@ -370,6 +373,24 @@ export default {
|
||||
this.form.netWeight = this.netWeight;
|
||||
this.form.grossWeight = this.grossWeight;
|
||||
},
|
||||
cancelPri(){
|
||||
// 重置表单数据
|
||||
this.form = {
|
||||
warehouseId: undefined,
|
||||
supplierId: undefined,
|
||||
remark: undefined,
|
||||
totalQuantity: 0,
|
||||
totalAmount: 0,
|
||||
};
|
||||
// 清空物料列表
|
||||
this.productList = [];
|
||||
// 重置计数器
|
||||
this.totalQuantity = 0;
|
||||
this.totalAmount = 0;
|
||||
// 重置表单校验结果
|
||||
this.$refs["form"].resetFields();
|
||||
|
||||
},
|
||||
/** 表单提交 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
@@ -415,20 +436,7 @@ export default {
|
||||
addStockin(data).then(() => {
|
||||
this.$modal.msgSuccess(this.$t('receiveStockinAdd.addSuccess'));
|
||||
// 重置表单数据
|
||||
this.form = {
|
||||
warehouseId: undefined,
|
||||
supplierId: undefined,
|
||||
remark: undefined,
|
||||
totalQuantity: 0,
|
||||
totalAmount: 0,
|
||||
};
|
||||
// 清空物料列表
|
||||
this.productList = [];
|
||||
// 重置计数器
|
||||
this.totalQuantity = 0;
|
||||
this.totalAmount = 0;
|
||||
// 重置表单校验结果
|
||||
this.$refs["form"].resetFields();
|
||||
cancelPri()
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -436,6 +444,7 @@ export default {
|
||||
cancel() {
|
||||
this.productSelectVisible = false;
|
||||
},
|
||||
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = this.$t('receiveStockinAdd.uploadTitle')
|
||||
@@ -454,7 +463,7 @@ export default {
|
||||
this.upload.open = false
|
||||
this.upload.isUploading = false
|
||||
this.$refs.upload.clearFiles()
|
||||
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", {dangerouslyUseHTMLString: true});
|
||||
//this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", {dangerouslyUseHTMLString: true});
|
||||
if (response.code === 200) {
|
||||
this.$modal.msgSuccess("导入成功");
|
||||
this.productList.push(...response.data)
|
||||
|
||||
@@ -108,18 +108,34 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('inReceiveStockin.supplierNo')" prop="supplierNo"><!--供应商编码-->
|
||||
<!-- <el-form-item :label="$t('inReceiveStockin.supplierNo')" prop="supplierNo"><!–供应商编码–>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.supplierNo"-->
|
||||
<!-- :placeholder="$t('inReceiveStockin.inputSupplierNo')"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item :label="$t('inReceiveStockin.stockSource')" prop="stockSource"><!–单据来源–>-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.stockSource"-->
|
||||
<!-- :placeholder="$t('inReceiveStockin.inputStockSource')"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('inReceiveStockin.materialDesc')" prop="stockSource"><!--物料描述-->
|
||||
<el-input
|
||||
v-model="queryParams.supplierNo"
|
||||
:placeholder="$t('inReceiveStockin.inputSupplierNo')"
|
||||
v-model="queryParams.materialDesc"
|
||||
:placeholder="$t('inReceiveStockin.inputMaterialDesc')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('inReceiveStockin.stockSource')" prop="stockSource"><!--单据来源-->
|
||||
<el-form-item :label="$t('inReceiveStockin.lotNo')" prop="stockSource"><!--批号-->
|
||||
<el-input
|
||||
v-model="queryParams.stockSource"
|
||||
:placeholder="$t('inReceiveStockin.inputStockSource')"
|
||||
v-model="queryParams.lotNo"
|
||||
:placeholder="$t('inReceiveStockin.inputLotNo')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
||||
@@ -9,6 +9,22 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('inReceiveStockin.materialDesc')" prop="materialDesc"><!--物料描述-->
|
||||
<el-input
|
||||
v-model="queryParams.materialDesc"
|
||||
:placeholder="$t('inReceiveStockin.inputMaterialDesc')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('inReceiveStockin.lotNo')" prop="lotNo"><!--批号-->
|
||||
<el-input
|
||||
v-model="queryParams.lotNo"
|
||||
:placeholder="$t('inReceiveStockin.inputLotNo')"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('inReceiveStockin.inType')" prop="inType"><!--入库类型-->
|
||||
<el-select v-model="queryParams.inType" :placeholder="$t('inReceiveStockin.selecInType')" clearable>
|
||||
<el-option
|
||||
|
||||
Reference in New Issue
Block a user