Browse Source

20261102.海波:PDA这个生产退仓、生产领退料不要直接查询了,数据太多了

master
shenzhouyu 2 weeks ago
parent
commit
fbdbaf751a
  1. 41
      src/views/modules/production/productionIssueReturnList.vue
  2. 41
      src/views/modules/production/productionQualifiedReturn.vue

41
src/views/modules/production/productionIssueReturnList.vue

@ -18,6 +18,7 @@
placeholder="请扫描入库单或标签条码"
prefix-icon="el-icon-search"
@keyup.enter.native="handleSearch"
@clear="handleSearch"
ref="searchInput"
/>
</div>
@ -60,7 +61,7 @@
<!-- 空状态 -->
<div v-if="qualifiedList.length === 0 && !loading" class="empty-state">
<i class="el-icon-box"></i>
<p>暂无生产待退仓物料</p>
<p>{{ hasSearched ? '未找到匹配的生产订单' : '请扫描入库单或标签条码查询' }}</p>
</div>
<!-- 加载状态 -->
@ -82,7 +83,8 @@ export default {
return {
searchCode: '',
qualifiedList: [],
loading: false
loading: false,
hasSearched: false
};
},
methods: {
@ -95,39 +97,11 @@ export default {
if (this.searchCode.trim()) {
this.searchQualifiedList(this.searchCode.trim());
} else {
this.loadQualifiedList();
this.hasSearched = false;
this.qualifiedList = [];
}
},
// 加载生产待退仓列表
loadQualifiedList() {
const currentWarehouse = getCurrentWarehouse();
if (!currentWarehouse) {
this.$message.error('请先选择仓库');
return;
}
this.loading = true;
const params = {
warehouseId: currentWarehouse,
site: localStorage.getItem('site'),
status: '待入库', // 待入库状态
};
getQualifiedReturnList(params).then(({ data }) => {
this.loading = false;
if (data && data.code === 0) {
this.qualifiedList = data.data || [];
} else {
this.$message.error(data.msg || '获取数据失败');
}
}).catch(error => {
this.loading = false;
console.error('获取生产待退仓列表失败:', error);
this.$message.error('获取数据失败');
});
},
// 搜索特定入库单
searchQualifiedList(searchCode) {
const currentWarehouse = getCurrentWarehouse();
@ -137,6 +111,7 @@ export default {
}
this.loading = true;
this.hasSearched = true;
const params = {
warehouseId: currentWarehouse,
searchCode: searchCode,
@ -187,8 +162,6 @@ export default {
this.$refs.searchInput.focus();
}
});
// 加载数据
this.loadQualifiedList();
}
};
</script>

41
src/views/modules/production/productionQualifiedReturn.vue

@ -18,6 +18,7 @@
placeholder="请扫描入库单或标签条码"
prefix-icon="el-icon-search"
@keyup.enter.native="handleSearch"
@clear="handleSearch"
ref="searchInput"
/>
</div>
@ -60,7 +61,7 @@
<!-- 空状态 -->
<div v-if="qualifiedList.length === 0 && !loading" class="empty-state">
<i class="el-icon-box"></i>
<p>暂无生产待入库物料</p>
<p>{{ hasSearched ? '未找到匹配的生产订单' : '请扫描入库单或标签条码查询' }}</p>
</div>
<!-- 加载状态 -->
@ -82,7 +83,8 @@ export default {
return {
searchCode: '',
qualifiedList: [],
loading: false
loading: false,
hasSearched: false
};
},
methods: {
@ -95,39 +97,11 @@ export default {
if (this.searchCode.trim()) {
this.searchQualifiedList(this.searchCode.trim());
} else {
this.loadQualifiedList();
this.hasSearched = false;
this.qualifiedList = [];
}
},
// 加载生产待入库列表
loadQualifiedList() {
const currentWarehouse = getCurrentWarehouse();
if (!currentWarehouse) {
this.$message.error('请先选择仓库');
return;
}
this.loading = true;
const params = {
warehouseId: currentWarehouse,
site:localStorage.getItem('site'),
status: '待入库',// 待入库状态
};
getQualifiedReturnList(params).then(({ data }) => {
this.loading = false;
if (data && data.code === 0) {
this.qualifiedList = data.data || [];
} else {
this.$message.error(data.msg || '获取数据失败');
}
}).catch(error => {
this.loading = false;
console.error('获取生产待入库列表失败:', error);
this.$message.error('获取数据失败');
});
},
// 搜索特定入库单
searchQualifiedList(searchCode) {
const currentWarehouse = getCurrentWarehouse();
@ -137,6 +111,7 @@ export default {
}
this.loading = true;
this.hasSearched = true;
const params = {
warehouseId: currentWarehouse,
searchCode: searchCode,
@ -180,8 +155,6 @@ export default {
this.$refs.searchInput.focus();
}
});
// 加载数据
this.loadQualifiedList();
}
};
</script>

Loading…
Cancel
Save