|
|
|
@ -190,6 +190,7 @@ |
|
|
|
<el-button v-if="currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中'" type="primary" @click="addInboundDetailModal()" icon="el-icon-plus">新增</el-button> |
|
|
|
<el-button v-if="currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中'" type="primary" @click="deleteInboundDetail()" icon="el-icon-minus">删除</el-button> |
|
|
|
<el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中')" @click="editBatchModel">批量编辑</el-button> |
|
|
|
<el-button v-if="!editBatchVisible && (currentRow.orderStatus === '草稿' || currentRow.orderStatus === '编辑中')" @click="changeWarehouseBatch">更换仓库</el-button> |
|
|
|
<el-button v-if="editBatchVisible" @click="batchModel" :loading="saveLoading">批量保存</el-button> |
|
|
|
<el-button v-if="editBatchVisible" @click="editBatchVisible = false" type="info">取消编辑</el-button> |
|
|
|
</el-form> |
|
|
|
@ -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 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|