Browse Source

修改栈板分类bug

dev
常熟吴彦祖 1 week ago
parent
commit
93acebe0cf
  1. 36
      src/views/modules/haianAutoWarehouse/haianEmptyPalletAssembly.vue
  2. 16
      src/views/modules/haianAutoWarehouse/haianPalletAssembly.vue
  3. 19
      src/views/modules/haianAutoWarehouse/haianPalletPacking.vue
  4. 16
      src/views/modules/haianAutoWarehouse/haianPalletSorting.vue

36
src/views/modules/haianAutoWarehouse/haianEmptyPalletAssembly.vue

@ -36,6 +36,7 @@
v-model="currentPalletType"
placeholder="请选择托盘类型"
style="width: 100%;"
:disabled="palletTypeChangeLoading"
@change="handlePalletTypeChange"
>
<el-option
@ -75,14 +76,14 @@
<button
class="action-btn primary"
@click="handleNotifyInbound"
:disabled="notifyLoading || !currentPalletType"
:disabled="notifyLoading || palletTypeChangeLoading || !currentPalletType"
style="flex: 1;">
{{ notifyLoading ? '处理中...' : '通知入库' }}
</button>
<button
class="action-btn primary"
@click="handleInboundAndTransport"
:disabled="transportLoading || !currentPalletType"
:disabled="transportLoading || palletTypeChangeLoading || !currentPalletType"
style="flex: 1;">
{{ transportLoading ? '处理中...' : '入库并运输' }}
</button>
@ -124,7 +125,8 @@ export default {
count: 1,
// - rqrq
notifyLoading: false,
transportLoading: false
transportLoading: false,
palletTypeChangeLoading: false
};
},
methods: {
@ -214,28 +216,41 @@ export default {
});
},
// - rqrq
// - rqrq
handlePalletTypeChange() {
// - rqrq
if (this.palletTypeChangeLoading) {
return;
}
const selectedType = this.palletTypeOptions.find((item) => item.palletType === this.currentPalletType);
const wcsSoreType = selectedType && selectedType.wcsSoreType != null ? Number(selectedType.wcsSoreType) : 0;
const forceFullPalletOut = wcsSoreType === 3
|| this.currentPalletType === 'A0103'
|| this.currentPalletType === 'A0206';
let autoSort = selectedType && selectedType.wcsAutoSort === 'Y' ? 'Y' : 'N';
if (forceFullPalletOut) {
autoSort = 'N';
}
this.palletTypeChangeLoading = true;
updatePalletTypeAndAutoSort({
site: this.site,
palletId: this.palletCode,
palletType: this.currentPalletType,
autoSort: 'N',
forceFullPalletOut: false
autoSort: autoSort,
forceFullPalletOut: forceFullPalletOut
}).then(({ data }) => {
if (data.code === 0) {
if (data && data.code === 0) {
this.$message.success('更新成功');
} else {
this.$alert(data.msg || '更新失败', '错误', {
this.$alert((data && data.msg) || '更新失败', '错误', {
confirmButtonText: '确定'
});
}
}).catch(error => {
console.error('更新失败:', error);
this.$alert(error.message || '更新失败', '错误', {
confirmButtonText: '确定'
});
}).finally(() => {
this.palletTypeChangeLoading = false;
});
},
@ -364,6 +379,7 @@ export default {
this.currentPalletType = '';
this.palletTypeOptions = [];
this.count = 1;
this.palletTypeChangeLoading = false;
if (needFocus) {
this.$nextTick(() => {

16
src/views/modules/haianAutoWarehouse/haianPalletAssembly.vue

@ -612,13 +612,19 @@ export default {
},
handlePalletTypeChange() {
const selectedType = this.palletTypeOptions.find((item) => item.palletType === this.currentPalletType)
this.currentWcsAutoSort = selectedType ? (selectedType.wcsAutoSort || 'N') : ''
this.applyPalletTypeDefaults(selectedType)
this.savePalletTypeConfig()
},
// wcs_sore_type=3wcs_auto_sort - rqrq
applyPalletTypeDefaults(selectedType) {
this.currentWcsAutoSort = selectedType ? (selectedType.wcsAutoSort || 'N') : 'N'
this.currentMaxLayer = selectedType ? Number(selectedType.maxLayer || 0) : 0
if (this.currentPalletType === 'A0103' || this.currentPalletType === 'A0206') {
this.forceFullPalletOut = true
}
const wcsSoreType = selectedType && selectedType.wcsSoreType != null ? Number(selectedType.wcsSoreType) : 0
this.forceFullPalletOut = wcsSoreType === 3
|| this.currentPalletType === 'A0103'
|| this.currentPalletType === 'A0206'
this.currentAutoSort = this.currentWcsAutoSort
this.updateAutoSortControl()
this.savePalletTypeConfig()
},
handleAutoSortChange() {
this.savePalletTypeConfig()

19
src/views/modules/haianAutoWarehouse/haianPalletPacking.vue

@ -654,14 +654,19 @@ export default {
},
handlePalletTypeChange() {
const selectedType = this.palletTypeOptions.find((item) => item.palletType === this.currentPalletType)
this.currentWcsAutoSort = selectedType ? (selectedType.wcsAutoSort || 'N') : ''
this.applyPalletTypeDefaults(selectedType)
this.savePalletTypeConfig()
},
// wcs_sore_type=3wcs_auto_sort - rqrq
applyPalletTypeDefaults(selectedType) {
this.currentWcsAutoSort = selectedType ? (selectedType.wcsAutoSort || 'N') : 'N'
this.currentMaxLayer = selectedType ? Number(selectedType.maxLayer || 0) : 0
// A0103 - rqrq
if (this.currentPalletType === 'A0103'||this.currentPalletType === 'A0206') {
this.forceFullPalletOut = true
}
const wcsSoreType = selectedType && selectedType.wcsSoreType != null ? Number(selectedType.wcsSoreType) : 0
this.forceFullPalletOut = wcsSoreType === 3
|| this.currentPalletType === 'A0103'
|| this.currentPalletType === 'A0206'
this.currentAutoSort = this.currentWcsAutoSort
this.updateAutoSortControl()
this.savePalletTypeConfig()
},
handleAutoSortChange() {
this.savePalletTypeConfig()
@ -1050,6 +1055,8 @@ export default {
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message.success('运输入库任务已提交')
// - rqrq
this.resetPage(true)
} else {
this.$alert((data && data.msg) || '运输入库失败', '错误', { confirmButtonText: '确定' })
}

16
src/views/modules/haianAutoWarehouse/haianPalletSorting.vue

@ -712,13 +712,19 @@ export default {
},
handlePalletTypeChange() {
const selectedType = this.palletTypeOptions.find((item) => item.palletType === this.currentPalletType)
this.currentWcsAutoSort = selectedType ? (selectedType.wcsAutoSort || 'N') : ''
this.applyPalletTypeDefaults(selectedType)
this.savePalletTypeConfig()
},
// wcs_sore_type=3wcs_auto_sort - rqrq
applyPalletTypeDefaults(selectedType) {
this.currentWcsAutoSort = selectedType ? (selectedType.wcsAutoSort || 'N') : 'N'
this.currentMaxLayer = selectedType ? Number(selectedType.maxLayer || 0) : 0
if (this.currentPalletType === 'A0103') {
this.forceFullPalletOut = true
}
const wcsSoreType = selectedType && selectedType.wcsSoreType != null ? Number(selectedType.wcsSoreType) : 0
this.forceFullPalletOut = wcsSoreType === 3
|| this.currentPalletType === 'A0103'
|| this.currentPalletType === 'A0206'
this.currentAutoSort = this.currentWcsAutoSort
this.updateAutoSortControl()
this.savePalletTypeConfig()
},
handleAutoSortChange() {
this.savePalletTypeConfig()

Loading…
Cancel
Save