Browse Source

2025-09-28

pda 其它入库 其它出库
master
fengyuan_yang 4 months ago
parent
commit
ca8dec4eda
  1. 59
      src/views/modules/other-transaction/other-inbound.vue
  2. 55
      src/views/modules/other-transaction/other-outbound.vue

59
src/views/modules/other-transaction/other-inbound.vue

@ -31,28 +31,6 @@
<!-- 其它入库信息卡片 -->
<div class="material-info-card">
<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-item">
<label class="form-label">入库原因</label>
@ -121,11 +99,6 @@
<span>{{ label.locationId }}</span>
</el-form-item>
</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-form>
</div>
@ -161,8 +134,6 @@ export default {
scanCode: '',
isRemoveMode: false, //
inboundForm: {
operatorName: '',
operateTime: '',
inboundReason: '',
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() {
//
if (!this.inboundForm.operatorName) {
this.$message.error('请输入操作员');
return;
}
if (!this.inboundForm.operateTime) {
this.$message.error('请选择操作时间');
return;
}
if (!this.inboundForm.targetLocationId) {
this.$message.error('请输入目标库位');
return;
@ -310,8 +264,6 @@ export default {
const params = {
site: this.site,
operatorName: this.inboundForm.operatorName,
operateTime: this.inboundForm.operateTime,
inboundReason: this.inboundForm.inboundReason,
targetLocationId: this.inboundForm.targetLocationId,
handlingUnitIds: handlingUnitIds,
@ -359,16 +311,7 @@ export default {
//
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') || '系统用户';
//
}
},

55
src/views/modules/other-transaction/other-outbound.vue

@ -33,28 +33,6 @@
<div class="input-form">
<div class="form-row">
<div class="form-item">
<label class="form-label">操作员</label>
<el-input
v-model="outboundForm.operatorName"
placeholder="请输入操作员"
size="small">
</el-input>
</div>
<div class="form-item">
<label class="form-label">操作时间</label>
<el-date-picker
v-model="outboundForm.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-item full-width">
<label class="form-label">出库原因</label>
<el-input
v-model="outboundForm.outboundReason"
@ -113,11 +91,6 @@
<span>{{ label.locationId }}</span>
</el-form-item>
</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-form>
</div>
@ -154,8 +127,6 @@ export default {
scanCode: '',
isRemoveMode: false, //
outboundForm: {
operatorName: '',
operateTime: '',
outboundReason: ''
},
scannedItems: [],
@ -255,16 +226,6 @@ export default {
//
confirmOutbound() {
//
if (!this.outboundForm.operatorName) {
this.$message.error('请输入操作员');
return;
}
if (!this.outboundForm.operateTime) {
this.$message.error('请选择操作时间');
return;
}
if (this.scannedItems.length === 0) {
this.$message.error('请至少扫描一个HandlingUnit');
return;
@ -275,8 +236,6 @@ export default {
const params = {
site: this.site,
operatorName: this.outboundForm.operatorName,
operateTime: this.outboundForm.operateTime,
outboundReason: this.outboundForm.outboundReason,
handlingUnitIds: handlingUnitIds,
scannedItems: this.scannedItems
@ -323,19 +282,7 @@ export default {
//
initFormData() {
//
const now = new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, '0');
const day = now.getDate().toString().padStart(2, '0');
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
const seconds = now.getSeconds().toString().padStart(2, '0');
this.outboundForm.operateTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
//
this.outboundForm.operatorName = localStorage.getItem('userName') || '系统用户';
//
}
},
mounted() {

Loading…
Cancel
Save