add:退料入库批次
This commit is contained in:
@@ -79,6 +79,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="createTime" width="160" label="操作时间" />
|
||||
<el-table-column show-overflow-tooltip prop="sourceHouseCode" width="120" label="来源仓别" />
|
||||
<el-table-column show-overflow-tooltip prop="targetHouseCode" width="120" label="目标仓库" />
|
||||
<el-table-column show-overflow-tooltip prop="batchNo" width="120" label="批次号" />
|
||||
<el-table-column show-overflow-tooltip prop="updateName" width="100" label="更新人" />
|
||||
<el-table-column show-overflow-tooltip prop="updateTime" width="160" label="更新时间" />
|
||||
<el-table-column label="操作" width="180px" align="center" fixed="right">
|
||||
@@ -130,6 +131,8 @@
|
||||
<el-col :span="12"><el-form-item label="操作人工号"><el-input :value="currentRow.creator" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||
<el-col :span="12"><el-form-item label="操作时间"><el-input :value="currentRow.createTime" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||
<el-col :span="12"><el-form-item label="来源仓别"><el-input :value="currentRow.sourceHouseCode" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||
<el-col :span="12"><el-form-item label="目标仓库"><el-input :value="currentRow.targetHouseCode" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||
<el-col :span="12"><el-form-item label="批次号"><el-input :value="currentRow.batchNo" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||
<el-col :span="12"><el-form-item label="状态"><el-input :value="statusLabel(currentRow.status)" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||
<el-col :span="12"><el-form-item label="更新人"><el-input :value="currentRow.updateName" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||
<el-col :span="12"><el-form-item label="更新时间"><el-input :value="currentRow.updateTime" disabled style="width: 300px;" /></el-form-item></el-col>
|
||||
@@ -180,6 +183,14 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="needBatch" label="批次号" required>
|
||||
<el-input
|
||||
v-model.trim="selectedBatchNo"
|
||||
clearable
|
||||
placeholder="海监品库(R004)必填,回传SAP的charg"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button size="mini" @click="closeAllocateDialog">取消</el-button>
|
||||
@@ -187,7 +198,7 @@
|
||||
size="mini"
|
||||
type="primary"
|
||||
:loading="allocateSaving"
|
||||
:disabled="!selectedHouseCode"
|
||||
:disabled="!selectedHouseCode || (needBatch && !selectedBatchNo)"
|
||||
@click="saveAllocate"
|
||||
>保存分配</el-button>
|
||||
</div>
|
||||
@@ -250,6 +261,7 @@ export default {
|
||||
storList: [],
|
||||
storLoading: false,
|
||||
selectedHouseCode: '',
|
||||
selectedBatchNo: '',
|
||||
currentRow: {},
|
||||
currentReturn: {},
|
||||
multipleSelection: [],
|
||||
@@ -289,6 +301,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 海监品库(R004)按批次管理,分配时必须录入批次号
|
||||
needBatch() {
|
||||
return this.selectedHouseCode === 'R004'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadStorList()
|
||||
},
|
||||
@@ -369,8 +387,9 @@ export default {
|
||||
},
|
||||
openAllocateDialog(row) {
|
||||
this.currentReturn = { ...row }
|
||||
// 已分配过的单据回显当前目标仓库,方便只做修改
|
||||
// 已分配过的单据回显当前目标仓库/批次,方便只做修改
|
||||
this.selectedHouseCode = row.targetHouseCode || ''
|
||||
this.selectedBatchNo = row.batchNo || ''
|
||||
this.allocateVisible = true
|
||||
this.loadStorList()
|
||||
},
|
||||
@@ -378,6 +397,7 @@ export default {
|
||||
this.allocateVisible = false
|
||||
this.currentReturn = {}
|
||||
this.selectedHouseCode = ''
|
||||
this.selectedBatchNo = ''
|
||||
this.allocateSaving = false
|
||||
},
|
||||
saveAllocate() {
|
||||
@@ -385,11 +405,16 @@ export default {
|
||||
this.$message.warning('请选择目标仓库')
|
||||
return
|
||||
}
|
||||
if (this.needBatch && !this.selectedBatchNo) {
|
||||
this.$message.warning('目标仓库为海监品库(R004),请输入批次号')
|
||||
return
|
||||
}
|
||||
if (this.allocateSaving) {
|
||||
return
|
||||
}
|
||||
this.allocateSaving = true
|
||||
allocate({ ...this.currentReturn, targetHouseCode: this.selectedHouseCode }).then(res => {
|
||||
const batchNo = this.needBatch ? this.selectedBatchNo : ''
|
||||
allocate({ ...this.currentReturn, targetHouseCode: this.selectedHouseCode, batchNo }).then(res => {
|
||||
if (res && res.code === 400) {
|
||||
this.$message.warning('分配失败:' + res.message)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user