|
|
@ -31,28 +31,6 @@ |
|
|
<!-- 其它入库信息卡片 --> |
|
|
<!-- 其它入库信息卡片 --> |
|
|
<div class="material-info-card"> |
|
|
<div class="material-info-card"> |
|
|
<div class="input-form"> |
|
|
<div class="input-form"> |
|
|
<div class="form-row"> |
|
|
|
|
|
<div class="form-item"> |
|
|
|
|
|
<label class="form-label">操作员</label> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="inboundForm.operatorName" |
|
|
|
|
|
placeholder="请输入操作员" |
|
|
|
|
|
size="small"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="form-item"> |
|
|
|
|
|
<label class="form-label">操作时间</label> |
|
|
|
|
|
<el-date-picker |
|
|
|
|
|
v-model="inboundForm.operateTime" |
|
|
|
|
|
type="datetime" |
|
|
|
|
|
placeholder="选择操作时间" |
|
|
|
|
|
size="small" |
|
|
|
|
|
format="yyyy-MM-dd HH:mm:ss" |
|
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"> |
|
|
|
|
|
</el-date-picker> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="form-row"> |
|
|
<div class="form-row"> |
|
|
<div class="form-item"> |
|
|
<div class="form-item"> |
|
|
<label class="form-label">入库原因</label> |
|
|
<label class="form-label">入库原因</label> |
|
|
@ -121,11 +99,6 @@ |
|
|
<span>{{ label.locationId }}</span> |
|
|
<span>{{ label.locationId }}</span> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="24"> |
|
|
|
|
|
<div class="action-buttons" style="text-align: right; margin-top: 8px;"> |
|
|
|
|
|
<el-button size="mini" type="danger" @click="removeLabel(label)">删除</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
</el-row> |
|
|
</el-form> |
|
|
</el-form> |
|
|
</div> |
|
|
</div> |
|
|
@ -161,8 +134,6 @@ export default { |
|
|
scanCode: '', |
|
|
scanCode: '', |
|
|
isRemoveMode: false, // 默认为添加模式 |
|
|
isRemoveMode: false, // 默认为添加模式 |
|
|
inboundForm: { |
|
|
inboundForm: { |
|
|
operatorName: '', |
|
|
|
|
|
operateTime: '', |
|
|
|
|
|
inboundReason: '', |
|
|
inboundReason: '', |
|
|
targetLocationId: '' |
|
|
targetLocationId: '' |
|
|
}, |
|
|
}, |
|
|
@ -262,27 +233,10 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 删除标签 |
|
|
|
|
|
removeLabel(label) { |
|
|
|
|
|
const index = this.scannedItems.indexOf(label); |
|
|
|
|
|
if (index > -1) { |
|
|
|
|
|
this.scannedItems.splice(index, 1); |
|
|
|
|
|
this.$message.success('删除成功'); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 确认其它入库 |
|
|
// 确认其它入库 |
|
|
confirmInbound() { |
|
|
confirmInbound() { |
|
|
// 验证必填字段 |
|
|
// 验证必填字段 |
|
|
if (!this.inboundForm.operatorName) { |
|
|
|
|
|
this.$message.error('请输入操作员'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.inboundForm.operateTime) { |
|
|
|
|
|
this.$message.error('请选择操作时间'); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (!this.inboundForm.targetLocationId) { |
|
|
if (!this.inboundForm.targetLocationId) { |
|
|
this.$message.error('请输入目标库位'); |
|
|
this.$message.error('请输入目标库位'); |
|
|
return; |
|
|
return; |
|
|
@ -310,8 +264,6 @@ export default { |
|
|
|
|
|
|
|
|
const params = { |
|
|
const params = { |
|
|
site: this.site, |
|
|
site: this.site, |
|
|
operatorName: this.inboundForm.operatorName, |
|
|
|
|
|
operateTime: this.inboundForm.operateTime, |
|
|
|
|
|
inboundReason: this.inboundForm.inboundReason, |
|
|
inboundReason: this.inboundForm.inboundReason, |
|
|
targetLocationId: this.inboundForm.targetLocationId, |
|
|
targetLocationId: this.inboundForm.targetLocationId, |
|
|
handlingUnitIds: handlingUnitIds, |
|
|
handlingUnitIds: handlingUnitIds, |
|
|
@ -359,16 +311,7 @@ export default { |
|
|
|
|
|
|
|
|
// 初始化表单数据 |
|
|
// 初始化表单数据 |
|
|
initFormData() { |
|
|
initFormData() { |
|
|
// 设置默认操作时间为当前时间 |
|
|
|
|
|
const now = new Date(); |
|
|
|
|
|
this.inboundForm.operateTime = now.getFullYear() + '-' + |
|
|
|
|
|
this.padStart((now.getMonth() + 1).toString(), 2, '0') + '-' + |
|
|
|
|
|
this.padStart(now.getDate().toString(), 2, '0') + ' ' + |
|
|
|
|
|
this.padStart(now.getHours().toString(), 2, '0') + ':' + |
|
|
|
|
|
this.padStart(now.getMinutes().toString(), 2, '0'); |
|
|
|
|
|
|
|
|
|
|
|
// 设置默认操作员 |
|
|
|
|
|
this.inboundForm.operatorName = localStorage.getItem('userName') || '系统用户'; |
|
|
|
|
|
|
|
|
// 可以在这里设置其他默认值 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|