diff --git a/src/views/modules/qc/inboundNotification.vue b/src/views/modules/qc/inboundNotification.vue
index f74922a..bdbbbd8 100644
--- a/src/views/modules/qc/inboundNotification.vue
+++ b/src/views/modules/qc/inboundNotification.vue
@@ -190,6 +190,7 @@
新增
删除
批量编辑
+ 更换仓库
批量保存
取消编辑
@@ -872,6 +873,24 @@
fixed: '',
columnWidth: 150,
},
+ {
+ userId: this.$store.state.user.name,
+ functionId: 610,
+ serialNumber: '610Table1Category',
+ tableId: "610Table1",
+ tableName: "收货入库任务表",
+ columnProp: 'category',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '入库类别',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100,
+ },
{
userId: this.$store.state.user.name,
functionId: 610,
@@ -1142,6 +1161,7 @@
editBatchVisible: false,
menuId: this.$route.meta.menuId,
tempWareHouseRow: {},
+ isChangeWarehouseBatch: false, // 是否批量更换仓库
detailList2: [],
detailModal2: false,
currentRow: {}
@@ -1689,10 +1709,25 @@
},
chooseWareHouse (row) {
+ this.isChangeWarehouseBatch = false
this.tempWareHouseRow = row
this.getBaseList(20)
},
+ // 批量更换仓库
+ changeWarehouseBatch () {
+ if (this.currentRow.orderType === '采购入库' || this.currentRow.orderType === '销售退货') {
+ this.$message.warning('该类型单据不能编辑!')
+ return
+ }
+ if (this.inboundDetailSelection.length === 0) {
+ this.$message.warning('请先勾选需要更换仓库的明细行!')
+ return
+ }
+ this.isChangeWarehouseBatch = true
+ this.getBaseList(20)
+ },
+
// 获取基础数据列表S
getBaseList (val, type) {
this.tagNo = val
@@ -1717,9 +1752,30 @@
this.modalData.supplierName = val.SupplierName
}
if (this.tagNo === 20) {
- this.tempWareHouseRow.inWarehouse = val.WareHouseID
- this.tempWareHouseRow.inWarehouseName = val.WareHouseName
- console.log(this.tempWareHouseRow)
+ if (this.isChangeWarehouseBatch) {
+ // 批量更换仓库
+ this.inboundDetailSelection.forEach(row => {
+ row.inWarehouse = val.WareHouseID
+ row.inWarehouseName = val.WareHouseName
+ })
+ // 批量保存更新
+ this.saveLoading = true
+ updateInboundDetail(this.detailList).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getInboundDetail()
+ this.$message.success('更换仓库成功')
+ } else {
+ this.$message.error(data.msg)
+ }
+ }).finally(() => {
+ this.saveLoading = false
+ this.isChangeWarehouseBatch = false
+ })
+ } else {
+ // 单行编辑仓库
+ this.tempWareHouseRow.inWarehouse = val.WareHouseID
+ this.tempWareHouseRow.inWarehouseName = val.WareHouseName
+ }
}
},
diff --git a/src/views/modules/qc/outboundNotification.vue b/src/views/modules/qc/outboundNotification.vue
index 6c75ca6..b3b0326 100644
--- a/src/views/modules/qc/outboundNotification.vue
+++ b/src/views/modules/qc/outboundNotification.vue
@@ -196,6 +196,7 @@
新增
删除
批量编辑
+ 更换仓库
批量保存
取消编辑
@@ -858,6 +859,24 @@
fixed: '',
columnWidth: 150,
},
+ {
+ userId: this.$store.state.user.name,
+ functionId: 620,
+ serialNumber: '620Table1Category',
+ tableId: "620Table1",
+ tableName: "拣货出库任务表",
+ columnProp: 'category',
+ headerAlign: "center",
+ align: "center",
+ columnLabel: '出库类别',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100,
+ },
{
userId: this.$store.state.user.name,
functionId: 620,
@@ -1089,6 +1108,7 @@
editBatchVisible: false,
menuId: this.$route.meta.menuId,
tempWareHouseRow: {},
+ isChangeWarehouseBatch: false, // 是否批量更换仓库
detailList2: [],
detailModal2: false,
currentRow: {}
@@ -1700,10 +1720,25 @@
},
chooseWareHouse (row) {
+ this.isChangeWarehouseBatch = false
this.tempWareHouseRow = row
this.getBaseList(20)
},
+ // 批量更换仓库
+ changeWarehouseBatch () {
+ if (this.currentRow.orderType === '销售出库') {
+ this.$message.warning('销售出库单据不能编辑!')
+ return
+ }
+ if (this.outboundDetailSelection.length === 0) {
+ this.$message.warning('请先勾选需要更换仓库的明细行!')
+ return
+ }
+ this.isChangeWarehouseBatch = true
+ this.getBaseList(20)
+ },
+
// 获取基础数据列表S
getBaseList (val, type) {
this.tagNo = val
@@ -1740,9 +1775,30 @@
this.modalData.customerName = val.CustomerName
}
if (this.tagNo === 20) {
- this.tempWareHouseRow.outWarehouse = val.WareHouseID
- this.tempWareHouseRow.outWarehouseName = val.WareHouseName
- console.log(this.tempWareHouseRow)
+ if (this.isChangeWarehouseBatch) {
+ // 批量更换仓库
+ this.outboundDetailSelection.forEach(row => {
+ row.outWarehouse = val.WareHouseID
+ row.outWarehouseName = val.WareHouseName
+ })
+ // 批量保存更新
+ this.saveLoading = true
+ updateOutboundDetail(this.detailList).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getOutboundDetail()
+ this.$message.success('更换仓库成功')
+ } else {
+ this.$message.error(data.msg)
+ }
+ }).finally(() => {
+ this.saveLoading = false
+ this.isChangeWarehouseBatch = false
+ })
+ } else {
+ // 单行编辑仓库
+ this.tempWareHouseRow.outWarehouse = val.WareHouseID
+ this.tempWareHouseRow.outWarehouseName = val.WareHouseName
+ }
}
},