合并
This commit is contained in:
@ -258,7 +258,7 @@ const handleSelectionChange = (selection: ConstructionValueVO[]) => {
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = async () => {
|
||||
reset();
|
||||
const res = await getProjectSquare(currentProject.value.id);
|
||||
const res = await getProjectSquare(currentProject.value?.id);
|
||||
if (res.data.length === 0) return proxy?.$modal.msgWarning('当前项目下没有方阵,请先创建方阵');
|
||||
const isFangzhen = res.data.some((item) => item.children && item.children.length);
|
||||
console.log('🚀 ~ handleAdd ~ isFangzhen:', isFangzhen);
|
||||
@ -373,7 +373,7 @@ onMounted(() => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
|
@ -276,7 +276,7 @@ const handleAudit = async (row?: MonthPlanVO) => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
// const listeningProject = watch(
|
||||
// () => currentProject.value.id,
|
||||
// () => currentProject.value?.id,
|
||||
// (nid, oid) => {
|
||||
// queryParams.value.projectId = nid;
|
||||
// form.value.projectId = nid;
|
||||
|
@ -215,7 +215,7 @@ const handleUpdate = async (row?: MonthPlanVO) => {
|
||||
|
||||
/** 提交按钮 */
|
||||
const submitForm = () => {
|
||||
form.value.projectId = currentProject.value.id;
|
||||
form.value.projectId = currentProject.value?.id;
|
||||
monthPlanFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
@ -255,7 +255,7 @@ onMounted(() => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
|
@ -188,7 +188,7 @@ const submitFlow = async () => {
|
||||
const handleStartWorkFlow = async (data: LeaveForm) => {
|
||||
try {
|
||||
submitFormData.value.flowCode = flowCode.value;
|
||||
submitFormData.value.businessId = currentProject.value.id + '_' + form.value[0]?.planMonth;
|
||||
submitFormData.value.businessId = currentProject.value?.id + '_' + form.value[0]?.planMonth;
|
||||
|
||||
//流程变量
|
||||
taskVariables.value = {
|
||||
|
@ -215,14 +215,13 @@ const handleDelete = async (row?: MonthPlanAuditVO) => {
|
||||
await getList();
|
||||
};
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
|
@ -62,7 +62,7 @@ const data = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
valueType: '1',
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
month: undefined
|
||||
}
|
||||
});
|
||||
@ -111,7 +111,7 @@ onMounted(() => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
getList();
|
||||
|
@ -65,7 +65,7 @@ const data = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
valueType: '1',
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
month: undefined
|
||||
}
|
||||
});
|
||||
@ -119,7 +119,7 @@ onMounted(() => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
getList();
|
||||
|
@ -62,7 +62,7 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
month: undefined
|
||||
}
|
||||
});
|
||||
@ -111,7 +111,7 @@ onMounted(() => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
getList();
|
||||
|
@ -60,7 +60,7 @@ const data = reactive({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
valueType: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
month: undefined
|
||||
}
|
||||
});
|
||||
@ -114,7 +114,7 @@ onMounted(() => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
getList();
|
||||
|
@ -142,7 +142,7 @@ const dialog = reactive<DialogOption>({
|
||||
|
||||
const initFormData: SettlementValueOwnerForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
settlementValue: undefined,
|
||||
valueType: undefined,
|
||||
remark: undefined,
|
||||
@ -153,7 +153,7 @@ const data = reactive<PageData<SettlementValueOwnerForm, SettlementValueOwnerQue
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
settlementValue: undefined,
|
||||
valueType: undefined,
|
||||
settlementDate: undefined,
|
||||
@ -253,14 +253,13 @@ const handleDelete = async (row?: SettlementValueOwnerVO) => {
|
||||
await getList();
|
||||
};
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
getList();
|
||||
});
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
|
@ -179,7 +179,7 @@ const dialog = reactive<DialogOption>({
|
||||
|
||||
const initFormData: SettlementValueSubcontractForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
documentCode: undefined,
|
||||
settlementDescribe: undefined,
|
||||
valueType: undefined,
|
||||
@ -198,7 +198,7 @@ const data = reactive<PageData<SettlementValueSubcontractForm, SettlementValueSu
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
documentCode: undefined,
|
||||
settlementDescribe: undefined,
|
||||
valueType: undefined,
|
||||
@ -235,7 +235,7 @@ const getList = async () => {
|
||||
//获取分包单位
|
||||
const contractorList = ref<ContractorVO[]>([]);
|
||||
const getContractorList = async () => {
|
||||
const res = await listContractor({ projectId: currentProject.value.id } as any);
|
||||
const res = await listContractor({ projectId: currentProject.value?.id } as any);
|
||||
contractorList.value = res.rows;
|
||||
};
|
||||
|
||||
@ -321,7 +321,7 @@ onMounted(() => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
|
@ -106,7 +106,7 @@ const dialog = reactive<DialogOption>({
|
||||
|
||||
const initFormData: ValueAllocationForm = {
|
||||
id: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
ownerDesignValue: undefined,
|
||||
ownerPurchaseValue: undefined,
|
||||
ownerConstructionValue: undefined,
|
||||
@ -122,7 +122,7 @@ const data = reactive<PageData<ValueAllocationForm, ValueAllocationQuery>>({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: currentProject.value.id,
|
||||
projectId: currentProject.value?.id,
|
||||
ownerDesignValue: undefined,
|
||||
ownerPurchaseValue: undefined,
|
||||
ownerConstructionValue: undefined,
|
||||
@ -250,7 +250,7 @@ onMounted(() => {
|
||||
|
||||
//监听项目id刷新数据
|
||||
const listeningProject = watch(
|
||||
() => currentProject.value.id,
|
||||
() => currentProject.value?.id,
|
||||
(nid, oid) => {
|
||||
queryParams.value.projectId = nid;
|
||||
form.value.projectId = nid;
|
||||
|
Reference in New Issue
Block a user