This commit is contained in:
2025-09-06 19:15:47 +08:00
parent 6380ee505f
commit 178f44a5a3
9 changed files with 47 additions and 48 deletions

View File

@ -7,6 +7,7 @@
<template #title>
<span class="menu-title" :title="hasTitle(onlyOneChild.meta.title)">{{ onlyOneChild.meta.title }}</span>
<span class="bage" v-if="onlyOneChild.meta?.title == '我的待办' && total > 0">{{ total }}</span>
<span class="bage" v-if="onlyOneChild.meta?.title == '我的抄送' && totalChao > 0">{{ totalChao }}</span>
</template>
</el-menu-item>
</app-link>
@ -36,7 +37,7 @@ import { isExternal } from '@/utils/validate';
import AppLink from './Link.vue';
import { getNormalPath } from '@/utils/ruoyi';
import { RouteRecordRaw } from 'vue-router';
import { pageByTaskWait } from '@/api/workflow/task';
import { pageByTaskWait, pageByTaskCopy } from '@/api/workflow/task';
import useUserStore from '@/store/modules/user';
import useNoticeStore from '@/store/modules/notice';
const userStore = useUserStore();
@ -56,21 +57,27 @@ const props = defineProps({
}
});
const total = ref(0);
const totalChao = ref(0);
onMounted(() => {
if (onlyOneChild.value.meta?.title == '我的待办' || props.item.meta?.title == '我的任务') {
console.log(44444444);
if (onlyOneChild.value.meta?.title == '我的待办') {
getWaitingList();
}
if (onlyOneChild.value.meta?.title == '我的抄送') {
getChaoList();
}
});
// 获取我的待办
//分页
const getWaitingList = () => {
pageByTaskWait({ pageNum: 1, pageSize: 10 }).then((resp) => {
console.log(resp);
total.value = resp.total;
});
};
// 获取我的抄送
const getChaoList = () => {
pageByTaskCopy({ pageNum: 1, pageSize: 10 }).then((resp) => {
totalChao.value = resp.total;
});
};
const onlyOneChild = ref<any>({});
const hasOneShowingChild = (parent: RouteRecordRaw, children?: RouteRecordRaw[]) => {

View File

@ -93,11 +93,10 @@
>审核通知单</el-button
>
<el-button
v-if="scope.row.status != 'draft'"
v-if="scope.row.status != 'draft' || scope.row.auditStatus != 'draft'"
type="success"
link
icon="View"
v-hasPermi="['design:designChange:query']"
@click="handleViewDetail(scope.row)"
>查看通知单</el-button
>
@ -113,8 +112,7 @@
type="warning"
link
icon="View"
v-hasPermi="['design:drawingreviewReceipts:list']"
v-if="scope.row.status != 'draft'"
v-if="scope.row.status != 'draft' || scope.row.auditStatus != 'draft'"
@click="handleViewHistory(scope.row)"
>查看单据</el-button
>

View File

@ -121,10 +121,10 @@
</div> -->
<div class="info-item">
<span class="info-label">更新时间</span>
<span class="info-label">上传时间</span>
<div class="info-value mt-0.5 flex items-center">
<i class="fa fa-calendar-o text-gray-400 dark:text-gray-500 mr-1.5"></i>
{{ info.updateTime || '未更新' }}
{{ info.createTime || '暂无' }}
</div>
</div>
</div>

View File

@ -153,8 +153,8 @@
<el-form-item v-if="uploadForm.type == '3'" label="蓝图" prop="fileIds">
<file-upload :fileType="['pdf']" :isShowTip="false" :fileSize="100" v-model="uploadForm.fileIds"></file-upload>
</el-form-item>
<el-form-item v-if="uploadForm.type == '3'" label="抄送人">
<el-select multiple filterable clearable v-model="form.userIds" placeholder="请选择抄送人">
<el-form-item v-if="uploadForm.type == '3'" label="通知人">
<el-select multiple filterable clearable v-model="form.userIds" placeholder="请选择通知人">
<el-option :value="item.userId" v-for="item in userCoryList" :key="item.userId" :label="item.nickName + '-' + item.phonenumber" />
</el-select>
</el-form-item>

View File

@ -197,18 +197,17 @@
></el-col> -->
</el-row>
</el-form>
<el-table v-loading="loading" :data="selectPlanList" v-if="form.id">
<el-table v-loading="loading" :data="selectPlanList">
<el-table-column label="物资名称" align="center" prop="name" />
<el-table-column label="质量标准" align="center" prop="qs" />
<el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="计量单位" align="center" prop="unit" width="80" />
<el-table-column label="需求数量" align="center" prop="demandQuantity" v-if="form.docType == 2">
<el-table-column label="需求数量" align="center" prop="demandQuantity">
<template #default="scope">
<el-input v-model="scope.row.demandQuantity" placeholder="请输入" type="number" />
</template>
</el-table-column>
<el-table-column label="需求数量" align="center" prop="demandQuantity" v-else />
<!-- <el-table-column label="需求数量" align="center" prop="demandQuantity" v-else /> -->
<!-- <el-table-column label="需求到货时间" align="center" prop="arrivalTime" width="250" /> -->
<el-table-column label="备注" align="center" prop="remark" />
</el-table>
@ -364,6 +363,7 @@ const data = reactive({
docCode: [{ required: true, message: '采购单编号不能为空', trigger: 'blur' }],
planId: [{ required: true, message: '需求计划不能为空', trigger: 'blur' }],
mrpBaseId: [{ required: true, message: '需求批次号不能为空', trigger: 'blur' }],
supplierId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
// 电话号码验证
technicalDirectorTel: [
{ required: true, message: '请输入电话', trigger: 'blur' },
@ -468,9 +468,16 @@ const handleUpdate = async (row?: PurchaseDocVO) => {
const _id = row?.id || ids.value[0];
const res = await getPurchaseDoc(_id);
Object.assign(form.value, res.data);
getPlanList();
form.value.planId = form.value.associationList?.map((item: any) => item.planId);
await getPlanList();
form.value.planId = form.value.associationList?.map((item: any) => item.planId);
planList.value.forEach((item) => {
form.value.associationList.forEach((items: any) => {
if (item.id == items.planId) {
item.demandQuantity = items.demandQuantity;
}
});
});
dialog.visible = true;
dialog.title = '修改物资-采购联系单';
};
@ -478,6 +485,7 @@ const handleUpdate = async (row?: PurchaseDocVO) => {
const selectPlanList = computed(() => {
if (!form.value.planId) return [];
const result = planList.value.filter((item) => form.value.planId.includes(item.id));
return result;
});
@ -486,11 +494,12 @@ const submitForm = () => {
purchaseDocFormRef.value?.validate(async (valid: boolean) => {
if (valid) {
buttonLoading.value = true;
form.value.associationList = form.value.planId?.map((item: any) => ({
planId: item
}));
form.value.associationList = selectPlanList.value;
form.value.associationList.forEach((item: any) => {
item.planId = item.id;
delete item.id;
});
form.value.supplier = supplierOptions.value.find((item) => item.id == form.value.supplierId)?.supplierName;
if (form.value.id) {
await updatePurchaseDoc(form.value).finally(() => (buttonLoading.value = false));
} else {

View File

@ -113,13 +113,7 @@ import { useUserStoreHook } from '@/store/modules/user';
const userStore = useUserStoreHook();
// 从 store 中获取项目列表和当前选中的项目
const currentProject = computed(() => userStore.selectedProject);
const month = computed(() => {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0'); // getMonth() 从0开始
const currentMonth = `${year}-${month}`;
return currentMonth;
});
const month = '';
const monthPlanList = ref<MonthPlanVO[]>([]);
const buttonLoading = ref(false);
const loading = ref(true);
@ -246,7 +240,6 @@ const submitForm = () => {
if (valid) {
buttonLoading.value = true;
form.value.isDesign = true;
if (form.value.id) {
await updateMonthPlan(form.value).finally(() => (buttonLoading.value = false));
} else {
@ -270,6 +263,7 @@ const handleDelete = async (row?: MonthPlanVO) => {
/** 审核按钮操作 */
const handleAudit = async (row?: MonthPlanVO) => {
proxy.$tab.closePage(proxy.$route);
proxy?.$tab.openPage('/approval/monthPlan/indexEdit', '审核月度产值计划', {
planMonth: row?.planMonth,
id: row?.id,

View File

@ -170,11 +170,12 @@ const getInfo = () => {
loading.value = true;
buttonLoading.value = false;
nextTick(async () => {
routeParams.value.businessId ? routeParams.value.businessId.split('_')[0] : currentProject.value?.id;
const res = await getMonthInfo({ id: routeParams.value.id });
console.log(routeParams.value);
// routeParams.value.businessId ? routeParams.value.businessId.split('_')[0] : routeParams.value.id;
const res = await getMonthInfo({ id: routeParams.value.id.split('_')[0] });
form.value = res.data as any;
form.value[0].mid = form.value[0].id;
form.value[0].id = form.value[0].projectId + '_plan';
form.value[0].id = form.value[0].id + '_plan';
loading.value = false;
buttonLoading.value = false;
});
@ -194,7 +195,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 = routeParams.value.id + '_plan';
//流程变量
taskVariables.value = {
@ -213,8 +214,6 @@ const handleStartWorkFlow = async (data: LeaveForm) => {
};
//审批记录
const handleApprovalRecord = () => {
console.log(form.value[0]?.id);
approvalRecordRef.value.init(form.value[0]?.id);
};
//提交回调
@ -229,20 +228,12 @@ const approvalVerifyOpen = async () => {
// 图纸上传成功之后 开始提交
const submit = async (status, data) => {
form.value = data;
console.log(form.value);
if (status === 'draft') {
buttonLoading.value = false;
proxy?.$modal.msgSuccess('暂存成功');
proxy.$tab.closePage(proxy.$route);
proxy.$router.go(-1);
} else {
// const res = await isSubmit(data[0]?.mid);
// if (!res.data) {
// proxy?.$modal.msgError('三种计划产值必须填写');
// return;
// }
if ((form.value[0]?.planAuditStatus === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
flowCode.value = flowCodeOptions[0].value;
dialogVisible.visible = true;

View File

@ -77,7 +77,7 @@
</el-form>
<div class="box_submit">
<el-button size="large" @click="cancel()"> </el-button>
<el-button size="large" type="primary" @click="submitForm"> </el-button>
<!-- <el-button size="large" type="primary" @click="submitForm"> </el-button> -->
</div>
</div>
</template>

View File

@ -219,7 +219,7 @@ const removeProject = (projectId: number | string) => {
// 提交表单
const submitForm = async () => {
// 整理项目角色数据
if (form.value.projectRoles.length == 0) {
if (selectedProjects.value.length == 0) {
proxy?.$modal.msgWarning('请选择项目角色');
return;
}