diff --git a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesPurchaseReceiveBill.java b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesPurchaseReceiveBill.java
index db59dbc3..80a145b3 100644
--- a/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesPurchaseReceiveBill.java
+++ b/hw-modules/hw-mes/src/main/java/com/hw/mes/domain/MesPurchaseReceiveBill.java
@@ -97,7 +97,29 @@ public class MesPurchaseReceiveBill extends BaseEntity
private String materialSpec;
- public void setReceiveBillId(Long receiveBillId)
+ /** mes_purchase_order主键 */
+ private Long purchaseOrderId;
+
+ /** 条码生成标识(1=是;0=否) */
+ private String hasBarcodeFlag;
+
+ public String getHasBarcodeFlag() {
+ return hasBarcodeFlag;
+ }
+
+ public void setHasBarcodeFlag(String hasBarcodeFlag) {
+ this.hasBarcodeFlag = hasBarcodeFlag;
+ }
+
+ public Long getPurchaseOrderId() {
+ return purchaseOrderId;
+ }
+
+ public void setPurchaseOrderId(Long purchaseOrderId) {
+ this.purchaseOrderId = purchaseOrderId;
+ }
+
+ public void setReceiveBillId(Long receiveBillId)
{
this.receiveBillId = receiveBillId;
}
diff --git a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesPurchaseReceiveBillMapper.xml b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesPurchaseReceiveBillMapper.xml
index 287a0824..66dc6efc 100644
--- a/hw-modules/hw-mes/src/main/resources/mapper/mes/MesPurchaseReceiveBillMapper.xml
+++ b/hw-modules/hw-mes/src/main/resources/mapper/mes/MesPurchaseReceiveBillMapper.xml
@@ -30,6 +30,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
@@ -167,19 +169,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
diff --git a/hw-ui/src/views/mes/barcode/index.vue b/hw-ui/src/views/mes/barcode/index.vue
index 3b2f09d2..9688eced 100644
--- a/hw-ui/src/views/mes/barcode/index.vue
+++ b/hw-ui/src/views/mes/barcode/index.vue
@@ -85,6 +85,17 @@
+
+ 收料批量新增
+
+
取 消
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -837,6 +906,7 @@ import selectOrderBind from '@//views/mes/purchaseOrder/selectOrderBind.vue';
import selectMaterial from '@//views/mes/materialinfo/selectMaterial.vue';
import selectPurchaseOrder from '@//views/mes/purchaseOrder/addPurchaseOrder.vue';
import addMultiplePurchaseOrder from '@//views/mes/purchaseOrder/addMultiplePurchaseOrder.vue';
+import selectPurchaseReceiveBillBatch from '@//views/mes/purchaseReceiveBill/selectPurchaseReceiveBillBatch.vue';
export default {
name: "Barcode",
@@ -846,6 +916,7 @@ export default {
'select-material': selectMaterial,
'select-purchaseOrder': selectPurchaseOrder,
'add-multiple-purchaseOrder': addMultiplePurchaseOrder,
+ 'select-purchaseReceiveBillBatch': selectPurchaseReceiveBillBatch,
},
data() {
@@ -1094,6 +1165,10 @@ export default {
},
// 选中的采购订单数据
checkedPurchaseOrders: [],
+ receiveBatchOpen: false,
+ receiveBatchList: [],
+ receiveBatchTable: [],
+ receiveBatchTableOpen: false,
};
},
created() {
@@ -2172,6 +2247,70 @@ export default {
this.$refs["batchForm"].resetFields();
},
+ handleReceiveBatchAdd() {
+ this.receiveBatchOpen = true;
+ this.receiveBatchList = [];
+ this.receiveBatchTable = [];
+ },
+
+ submitReceiveBatchSelect() {
+ // 获取子组件选中的行
+ let selectedRows = this.$refs.receiveBatchRef.selectedRows;
+ if (!selectedRows || selectedRows.length === 0) {
+ this.$modal.msgWarning("请选择收料通知单");
+ return;
+ }
+ // 这里可以根据需要处理数据
+ this.receiveBatchTable = selectedRows.map(row => ({
+ ...row,
+ barcodeSpec: row.barcodeSpec || row.materialSpec,
+ batchFlag: '1',
+ amount: 1,
+ availableBindAmount: row.actLandAmount || '',
+ barcodeAmount: null,
+ productionDate: null,
+ lastOutstockDate: null,
+ barcodeType: '1',
+ remark: ''
+ }));
+ this.receiveBatchOpen = false;
+ this.receiveBatchTableOpen = true;
+ },
+
+ cancelReceiveBatchSelect() {
+ this.receiveBatchOpen = false;
+ },
+
+ submitReceiveBatchForm() {
+ // 校验表格数据
+ // const invalidRow = this.receiveBatchTable.find(row => {
+ // return !row.barcodeAmount || !row.productionDate || !row.lastOutstockDate;
+ // });
+ // if (invalidRow) {
+ // this.$modal.msgError("请填写所有行的条码数量、生产日期和最晚出库日期");
+ // return;
+ // }
+ // this.receiveBatchTable.forEach((row) => {
+ // console.log(row)
+ // if (row.batchFlag === this.BATCH_FLAG.NO){
+ // row.amount = null;
+ // }
+ // })
+ this.submitLoading = true;
+ // 这里调用后端API批量新增条码,仿照batchAddBarcode
+ batchAddBarcode(this.receiveBatchTable).then(response => {
+ this.$modal.msgSuccess("新增成功");
+ this.receiveBatchTableOpen = false;
+ this.getList();
+ }).finally(e => {
+ this.submitLoading = false;
+ });
+ },
+
+ cancelReceiveBatchForm() {
+ this.receiveBatchTableOpen = false;
+ this.receiveBatchTable = [];
+ },
}
};
diff --git a/hw-ui/src/views/mes/purchaseReceiveBill/selectPurchaseReceiveBillBatch.vue b/hw-ui/src/views/mes/purchaseReceiveBill/selectPurchaseReceiveBillBatch.vue
new file mode 100644
index 00000000..49c10749
--- /dev/null
+++ b/hw-ui/src/views/mes/purchaseReceiveBill/selectPurchaseReceiveBillBatch.vue
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+