|
|
|
|
@ -357,7 +357,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { saveStocktakingPlan, getStocktakingPlanList, deleteStocktakingPlan, getStocktakingPlanLinkList, getStocktakingPlanLinkDetail } from '@/api/system/stocktaking'
|
|
|
|
|
import { saveStocktakingPlan, getStocktakingPlanList, deleteStocktakingPlan, getStocktakingPlanLinkList, getStocktakingPlanLinkDetail, getStocktakingHistoryList } from '@/api/system/stocktaking'
|
|
|
|
|
import { getStorehouseTypeList } from '@/api/system/storehouseType'
|
|
|
|
|
import { getparameteritem } from '@/api/system/dictionary'
|
|
|
|
|
import { index as getWarehouseList } from '@/api/system/baseForm'
|
|
|
|
|
@ -846,23 +846,32 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
// 获取物资详情,包含盘点历史
|
|
|
|
|
const res = await request({
|
|
|
|
|
// 1. 获取物资详情
|
|
|
|
|
const materialRes = await request({
|
|
|
|
|
url: '/api/admin/material-infos/show',
|
|
|
|
|
method: 'get',
|
|
|
|
|
params: {
|
|
|
|
|
id: row.material_info.id
|
|
|
|
|
}
|
|
|
|
|
params: { id: row.material_info.id }
|
|
|
|
|
});
|
|
|
|
|
if (materialRes) {
|
|
|
|
|
this.detailModal.data.material_info = materialRes;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 2. 获取盘点历史记录
|
|
|
|
|
const params = {};
|
|
|
|
|
params['filter[0][key]'] = 'material_info_id';
|
|
|
|
|
params['filter[0][op]'] = 'eq';
|
|
|
|
|
params['filter[0][value]'] = row.material_info.id;
|
|
|
|
|
params['page'] = this.detailModal.pageIndex || 1;
|
|
|
|
|
params['page_size'] = this.detailModal.pageSize || 10;
|
|
|
|
|
const res = await getStocktakingHistoryList(qs.stringify(params));
|
|
|
|
|
|
|
|
|
|
if (res) {
|
|
|
|
|
// 更新物资信息和历史记录数据
|
|
|
|
|
this.detailModal.data = {
|
|
|
|
|
...this.detailModal.data,
|
|
|
|
|
material_info: res || {},
|
|
|
|
|
history: res.material_infos_plan_link || []
|
|
|
|
|
history: res.data || []
|
|
|
|
|
};
|
|
|
|
|
this.detailModal.total = res.material_infos_plan_link ? res.material_infos_plan_link.length : 0;
|
|
|
|
|
this.detailModal.total = res.data ? res.data.length : 0;
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
this.$Message.error('获取盘点任务详情失败');
|
|
|
|
|
@ -876,6 +885,7 @@ export default {
|
|
|
|
|
this.materialModal.currentPlanId = planId
|
|
|
|
|
this.materialModal.visible = true
|
|
|
|
|
this.materialModal.pageIndex = 1
|
|
|
|
|
this.materialModal.selectedMaterialIds = new Set();
|
|
|
|
|
this.searchMaterials()
|
|
|
|
|
},
|
|
|
|
|
isSelected(item) {
|
|
|
|
|
|