产值
This commit is contained in:
@ -143,6 +143,13 @@ export const getDictList = (query: any): AxiosPromise<any[]> => {
|
|||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
export const coryEngineeringList = (query: any): AxiosPromise<any[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/cailiaoshebei/mrpBase/coryEngineeringList',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* 获取到物资状态为已完成的版本
|
* 获取到物资状态为已完成的版本
|
||||||
*/
|
*/
|
||||||
|
@ -166,7 +166,7 @@ import {
|
|||||||
getBatch,
|
getBatch,
|
||||||
delBatch,
|
delBatch,
|
||||||
listSelectCailiaoshebei, obtainTheVersion,
|
listSelectCailiaoshebei, obtainTheVersion,
|
||||||
getDictList
|
getDictList, coryEngineeringList
|
||||||
} from '@/api/materials/batchPlan';
|
} from '@/api/materials/batchPlan';
|
||||||
import { CailiaoshebeiVO, CailiaoshebeiQuery, CailiaoshebeiForm } from '@/api/materials/batchPlan/types';
|
import { CailiaoshebeiVO, CailiaoshebeiQuery, CailiaoshebeiForm } from '@/api/materials/batchPlan/types';
|
||||||
import { useUserStoreHook } from '@/store/modules/user';
|
import { useUserStoreHook } from '@/store/modules/user';
|
||||||
@ -459,7 +459,7 @@ const handleAudit = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getNameList = (versions) => {
|
const getNameList = (versions) => {
|
||||||
getDictList({ projectId: currentProject.value?.id, versions }).then((res) => {
|
coryEngineeringList({ projectId: currentProject.value?.id, versions }).then((res) => {
|
||||||
nameList.value = res.data;
|
nameList.value = res.data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
<el-table v-loading="loading" :data="monthPlanList" @selection-change="handleSelectionChange">
|
<el-table height="70vh" v-loading="loading" :data="monthPlanList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="index" width="80" label="序号" align="center" />
|
||||||
<el-table-column label="名称" align="center" prop="name" />
|
<el-table-column label="名称" align="center" prop="name" />
|
||||||
<el-table-column label="规格" align="center" prop="specification" />
|
<el-table-column label="规格" align="center" prop="specification" />
|
||||||
<el-table-column label="单位" align="center" prop="unit" />
|
<el-table-column label="单位" align="center" prop="unit" />
|
||||||
@ -50,7 +50,7 @@ import { useUserStoreHook } from '@/store/modules/user';
|
|||||||
const userStore = useUserStoreHook();
|
const userStore = useUserStoreHook();
|
||||||
// 从 store 中获取项目列表和当前选中的项目
|
// 从 store 中获取项目列表和当前选中的项目
|
||||||
const currentProject = computed(() => userStore.selectedProject);
|
const currentProject = computed(() => userStore.selectedProject);
|
||||||
const monthPlanList = ref<MonthPlanVO[]>([]);
|
const monthPlanList = ref([]);
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
@ -107,7 +107,9 @@ const getList = async (type?) => {
|
|||||||
}
|
}
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await purchaseValueA({ projectId: currentProject.value?.id, type: queryParams.value.type });
|
const res = await purchaseValueA({ projectId: currentProject.value?.id, type: queryParams.value.type });
|
||||||
monthPlanList.value = res.rows;
|
monthPlanList.value = res.data;
|
||||||
|
console.log(monthPlanList.value);
|
||||||
|
|
||||||
total.value = res.total;
|
total.value = res.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
};
|
};
|
||||||
@ -146,7 +148,6 @@ const submitForm = () => {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
form.value.isDesign = true;
|
form.value.isDesign = true;
|
||||||
|
|
||||||
if (form.value.id) {
|
if (form.value.id) {
|
||||||
await purchaseValueAup(form.value).finally(() => (buttonLoading.value = false));
|
await purchaseValueAup(form.value).finally(() => (buttonLoading.value = false));
|
||||||
}
|
}
|
||||||
|
@ -14,13 +14,17 @@
|
|||||||
<script setup name="MonthPlan" lang="ts">
|
<script setup name="MonthPlan" lang="ts">
|
||||||
import { ref, watch, computed } from 'vue';
|
import { ref, watch, computed } from 'vue';
|
||||||
import purchPage from './comm/purchPage.vue';
|
import purchPage from './comm/purchPage.vue';
|
||||||
import { on } from 'events';
|
|
||||||
// 引用子组件
|
// 引用子组件
|
||||||
const activeName = ref('1');
|
const activeName = ref('1');
|
||||||
const purchPageRef1 = ref<InstanceType<typeof purchPage> | null>(null);
|
const purchPageRef1 = ref<InstanceType<typeof purchPage> | null>(null);
|
||||||
const purchPageRef2 = ref<InstanceType<typeof purchPage> | null>(null);
|
const purchPageRef2 = ref<InstanceType<typeof purchPage> | null>(null);
|
||||||
const handleClick = (val) => {
|
const handleClick = (val) => {
|
||||||
|
if (val.props.name == '1') {
|
||||||
purchPageRef1.value.getList(val.props.name); //子组件方法
|
purchPageRef1.value.getList(val.props.name); //子组件方法
|
||||||
|
} else {
|
||||||
|
purchPageRef2.value.getList(val.props.name); //子组件方法
|
||||||
|
|
||||||
|
}
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
purchPageRef1.value?.getList('1'); //初始加载
|
purchPageRef1.value?.getList('1'); //初始加载
|
||||||
|
Reference in New Issue
Block a user