WMS:
2&3楼生产派工投料需要按照bom投料
master
xs 3 weeks ago
parent 9b3f2c871f
commit 882c84ea1b

@ -160,7 +160,7 @@ public class WmsRawOutstockController extends BaseController
/** /**
* *
*/ */
@RequiresPermissions("wms:rawoutstock:apply") // @RequiresPermissions("wms:rawoutstock:apply")
@GetMapping("/getWarehouses4Apply") @GetMapping("/getWarehouses4Apply")
public AjaxResult getWarehouses4Apply(WmsBaseWarehouse queryBaseWarehouse) { public AjaxResult getWarehouses4Apply(WmsBaseWarehouse queryBaseWarehouse) {
queryBaseWarehouse.setWarehouseInstockType(WmsConstants.WMS_WAREHOUSE_INSTOCK_TYPE_RAW); queryBaseWarehouse.setWarehouseInstockType(WmsConstants.WMS_WAREHOUSE_INSTOCK_TYPE_RAW);
@ -172,7 +172,7 @@ public class WmsRawOutstockController extends BaseController
/** /**
* *
*/ */
@RequiresPermissions("wms:rawoutstock:apply") // @RequiresPermissions("wms:rawoutstock:apply")
@GetMapping("/getStockTotal") @GetMapping("/getStockTotal")
public TableDataInfo getStockTotal(WmsStockTotal queryStockTotal) { public TableDataInfo getStockTotal(WmsStockTotal queryStockTotal) {
startPage(); startPage();

@ -159,7 +159,7 @@ public class WmsStockTotalServiceImpl implements IWmsStockTotalService {
wmsStockTotal.setMaterialId(wmsStockTotal.getProductId()); wmsStockTotal.setMaterialId(wmsStockTotal.getProductId());
wmsStockTotal.setAccessoriesFlag(null); wmsStockTotal.setAccessoriesFlag(null);
} else { } else {
if (wmsStockTotal.getAccessoriesFlag().equals(MesConstants.MES_MATERIAL_ACCESSORIES_FLAG_NO)) { if (StringUtils.isEmpty(wmsStockTotal.getAccessoriesFlag()) || wmsStockTotal.getAccessoriesFlag().equals(MesConstants.MES_MATERIAL_ACCESSORIES_FLAG_NO)) {
wmsStockTotal.setAncestors("0," + wmsStockTotal.getMaterialBomId()); wmsStockTotal.setAncestors("0," + wmsStockTotal.getMaterialBomId());
wmsStockTotal.setAccessoriesFlag(null); wmsStockTotal.setAccessoriesFlag(null);
} }

@ -172,7 +172,7 @@
wst.total_amount, wst.frozen_amount, wst.occupy_amount,wst.safe_flag,wst.sale_order_id, wst.total_amount, wst.frozen_amount, wst.occupy_amount,wst.safe_flag,wst.sale_order_id,
mbmi.material_code,mbmi.material_name,mbmi.material_spec, mbmi.material_code,mbmi.material_name,mbmi.material_spec,
(select sum(wro.outstock_amount) from wms_raw_outstock wro where wro.stock_total_id=wst.stock_total_id and (select sum(wro.outstock_amount) from wms_raw_outstock wro where wro.stock_total_id=wst.stock_total_id and
wro.plan_code=#{planCode} and wro.plan_detail_code=#{planDetailCode} and wro.audit_status!='2') outstock_amount wro.plan_code=#{planCode} and wro.plan_detail_code=#{planDetailCode} and wro.audit_status!='2' and wro.execute_status!='2') outstock_amount
from wms_stock_total wst left join mes_base_material_info mbmi on wst.material_id = mbmi.material_id from wms_stock_total wst left join mes_base_material_info mbmi on wst.material_id = mbmi.material_id
<where> <where>

@ -425,6 +425,11 @@ export default {
components: { components: {
'apply-raw-outstock': applyRawOutstock, 'apply-raw-outstock': applyRawOutstock,
}, },
provide() {
return {
closeRawOutstockDialog: this.closeRawOutstockDialog,
}
},
props: { props: {
value: [String, Object, Array, Number], value: [String, Object, Array, Number],
// sop // sop
@ -1408,10 +1413,18 @@ export default {
this.productPlanData.planId = row.planId; this.productPlanData.planId = row.planId;
this.productPlanData.dispatchAmount = row.dispatchAmount; this.productPlanData.dispatchAmount = row.dispatchAmount;
this.productPlanData.saleOrderId = this.form.saleOrderId; this.productPlanData.saleOrderId = this.form.saleOrderId;
this.productPlanData.materialBomId = this.form.materialBomId;
} }
}
}, },
closeRawOutstockDialog() {
this.applyRawOutstockOpen = false;
},
},
mounted() { mounted() {
} }
} }

@ -98,6 +98,7 @@
<div style="text-align: center;margin-top: 30px"> <div style="text-align: center;margin-top: 30px">
<el-button type="primary" @click="submitForm"></el-button> <el-button type="primary" @click="submitForm"></el-button>
<el-button type="info" @click="closeParentDialog"></el-button>
</div> </div>
</div> </div>
@ -115,6 +116,7 @@ export default {
} }
}, },
dicts: ['mes_safe_flag'], dicts: ['mes_safe_flag'],
inject: ['closeRawOutstockDialog'],
data() { data() {
return { return {
// //
@ -177,7 +179,8 @@ export default {
planId: this.defineData.planId, planId: this.defineData.planId,
planCode: this.defineData.planCode, planCode: this.defineData.planCode,
dispatchAmount : this.defineData.dispatchAmount, dispatchAmount : this.defineData.dispatchAmount,
saleOrderId:this.defineData.saleOrderId saleOrderId:this.defineData.saleOrderId,
materialBomId:this.defineData.materialBomId
} }
} }
}, },
@ -201,6 +204,7 @@ export default {
this.queryParams.warehouseId = this.form.warehouseId; this.queryParams.warehouseId = this.form.warehouseId;
this.queryParams.saleOrderId = this.form.saleOrderId; this.queryParams.saleOrderId = this.form.saleOrderId;
this.queryParams.planCode = this.form.planCode; this.queryParams.planCode = this.form.planCode;
this.queryParams.materialBomId = this.form.materialBomId;
this.queryParams.planDetailCode = "0"; this.queryParams.planDetailCode = "0";
getStockTotal(this.queryParams).then(e => { getStockTotal(this.queryParams).then(e => {
this.total = e.total; this.total = e.total;
@ -276,13 +280,13 @@ export default {
this.form.taskType = "1";// this.form.taskType = "1";//
this.form.planDetailCode = "0"; this.form.planDetailCode = "0";
applyRawOutstock(this.form).then(e => { applyRawOutstock(this.form).then(e => {
this.dialogVisible = false
this.$modal.msgSuccess("申请投料成功"); this.$modal.msgSuccess("申请投料成功");
this.closeParentDialog()
}) })
}, },
closeDialog(){ closeParentDialog() {
this.closeRawOutstockDialog()
} }
} }

Loading…
Cancel
Save