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

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

@ -612,13 +612,19 @@ export default {
}, },
handlePalletTypeChange() { handlePalletTypeChange() {
const selectedType = this.palletTypeOptions.find((item) => item.palletType === this.currentPalletType) 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 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.updateAutoSortControl()
this.savePalletTypeConfig()
}, },
handleAutoSortChange() { handleAutoSortChange() {
this.savePalletTypeConfig() this.savePalletTypeConfig()

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

@ -654,14 +654,19 @@ export default {
}, },
handlePalletTypeChange() { handlePalletTypeChange() {
const selectedType = this.palletTypeOptions.find((item) => item.palletType === this.currentPalletType) 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 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.updateAutoSortControl()
this.savePalletTypeConfig()
}, },
handleAutoSortChange() { handleAutoSortChange() {
this.savePalletTypeConfig() this.savePalletTypeConfig()
@ -1050,6 +1055,8 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success('运输入库任务已提交') this.$message.success('运输入库任务已提交')
// - rqrq
this.resetPage(true)
} else { } else {
this.$alert((data && data.msg) || '运输入库失败', '错误', { confirmButtonText: '确定' }) this.$alert((data && data.msg) || '运输入库失败', '错误', { confirmButtonText: '确定' })
} }

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

@ -712,13 +712,19 @@ export default {
}, },
handlePalletTypeChange() { handlePalletTypeChange() {
const selectedType = this.palletTypeOptions.find((item) => item.palletType === this.currentPalletType) 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 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.updateAutoSortControl()
this.savePalletTypeConfig()
}, },
handleAutoSortChange() { handleAutoSortChange() {
this.savePalletTypeConfig() this.savePalletTypeConfig()

Loading…
Cancel
Save