优化
This commit is contained in:
@ -7,6 +7,7 @@
|
|||||||
<template #title>
|
<template #title>
|
||||||
<span class="menu-title" :title="hasTitle(onlyOneChild.meta.title)">{{ onlyOneChild.meta.title }}</span>
|
<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 == '我的待办' && total > 0">{{ total }}</span>
|
||||||
|
<span class="bage" v-if="onlyOneChild.meta?.title == '我的抄送' && totalChao > 0">{{ totalChao }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</app-link>
|
</app-link>
|
||||||
@ -36,7 +37,7 @@ import { isExternal } from '@/utils/validate';
|
|||||||
import AppLink from './Link.vue';
|
import AppLink from './Link.vue';
|
||||||
import { getNormalPath } from '@/utils/ruoyi';
|
import { getNormalPath } from '@/utils/ruoyi';
|
||||||
import { RouteRecordRaw } from 'vue-router';
|
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 useUserStore from '@/store/modules/user';
|
||||||
import useNoticeStore from '@/store/modules/notice';
|
import useNoticeStore from '@/store/modules/notice';
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
@ -56,21 +57,27 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
|
const totalChao = ref(0);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (onlyOneChild.value.meta?.title == '我的待办' || props.item.meta?.title == '我的任务') {
|
if (onlyOneChild.value.meta?.title == '我的待办') {
|
||||||
console.log(44444444);
|
|
||||||
getWaitingList();
|
getWaitingList();
|
||||||
}
|
}
|
||||||
|
if (onlyOneChild.value.meta?.title == '我的抄送') {
|
||||||
|
getChaoList();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// 获取我的待办
|
// 获取我的待办
|
||||||
//分页
|
|
||||||
const getWaitingList = () => {
|
const getWaitingList = () => {
|
||||||
pageByTaskWait({ pageNum: 1, pageSize: 10 }).then((resp) => {
|
pageByTaskWait({ pageNum: 1, pageSize: 10 }).then((resp) => {
|
||||||
console.log(resp);
|
|
||||||
|
|
||||||
total.value = resp.total;
|
total.value = resp.total;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 获取我的抄送
|
||||||
|
const getChaoList = () => {
|
||||||
|
pageByTaskCopy({ pageNum: 1, pageSize: 10 }).then((resp) => {
|
||||||
|
totalChao.value = resp.total;
|
||||||
|
});
|
||||||
|
};
|
||||||
const onlyOneChild = ref<any>({});
|
const onlyOneChild = ref<any>({});
|
||||||
|
|
||||||
const hasOneShowingChild = (parent: RouteRecordRaw, children?: RouteRecordRaw[]) => {
|
const hasOneShowingChild = (parent: RouteRecordRaw, children?: RouteRecordRaw[]) => {
|
||||||
|
@ -93,11 +93,10 @@
|
|||||||
>审核通知单</el-button
|
>审核通知单</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.status != 'draft'"
|
v-if="scope.row.status != 'draft' || scope.row.auditStatus != 'draft'"
|
||||||
type="success"
|
type="success"
|
||||||
link
|
link
|
||||||
icon="View"
|
icon="View"
|
||||||
v-hasPermi="['design:designChange:query']"
|
|
||||||
@click="handleViewDetail(scope.row)"
|
@click="handleViewDetail(scope.row)"
|
||||||
>查看通知单</el-button
|
>查看通知单</el-button
|
||||||
>
|
>
|
||||||
@ -113,8 +112,7 @@
|
|||||||
type="warning"
|
type="warning"
|
||||||
link
|
link
|
||||||
icon="View"
|
icon="View"
|
||||||
v-hasPermi="['design:drawingreviewReceipts:list']"
|
v-if="scope.row.status != 'draft' || scope.row.auditStatus != 'draft'"
|
||||||
v-if="scope.row.status != 'draft'"
|
|
||||||
@click="handleViewHistory(scope.row)"
|
@click="handleViewHistory(scope.row)"
|
||||||
>查看单据</el-button
|
>查看单据</el-button
|
||||||
>
|
>
|
||||||
|
@ -121,10 +121,10 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
<div class="info-item">
|
<div class="info-item">
|
||||||
<span class="info-label">更新时间</span>
|
<span class="info-label">上传时间</span>
|
||||||
<div class="info-value mt-0.5 flex items-center">
|
<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>
|
<i class="fa fa-calendar-o text-gray-400 dark:text-gray-500 mr-1.5"></i>
|
||||||
{{ info.updateTime || '未更新' }}
|
{{ info.createTime || '暂无' }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -153,8 +153,8 @@
|
|||||||
<el-form-item v-if="uploadForm.type == '3'" label="蓝图" prop="fileIds">
|
<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>
|
<file-upload :fileType="['pdf']" :isShowTip="false" :fileSize="100" v-model="uploadForm.fileIds"></file-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="uploadForm.type == '3'" label="抄送人">
|
<el-form-item v-if="uploadForm.type == '3'" label="通知人">
|
||||||
<el-select multiple filterable clearable v-model="form.userIds" placeholder="请选择抄送人">
|
<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-option :value="item.userId" v-for="item in userCoryList" :key="item.userId" :label="item.nickName + '-' + item.phonenumber" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -197,18 +197,17 @@
|
|||||||
></el-col> -->
|
></el-col> -->
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</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="name" />
|
||||||
|
|
||||||
<el-table-column label="质量标准" align="center" prop="qs" />
|
<el-table-column label="质量标准" align="center" prop="qs" />
|
||||||
<el-table-column label="规格型号" align="center" prop="specification" />
|
<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="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">
|
<template #default="scope">
|
||||||
<el-input v-model="scope.row.demandQuantity" placeholder="请输入" type="number" />
|
<el-input v-model="scope.row.demandQuantity" placeholder="请输入" type="number" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</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="arrivalTime" width="250" /> -->
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -364,6 +363,7 @@ const data = reactive({
|
|||||||
docCode: [{ required: true, message: '采购单编号不能为空', trigger: 'blur' }],
|
docCode: [{ required: true, message: '采购单编号不能为空', trigger: 'blur' }],
|
||||||
planId: [{ required: true, message: '需求计划不能为空', trigger: 'blur' }],
|
planId: [{ required: true, message: '需求计划不能为空', trigger: 'blur' }],
|
||||||
mrpBaseId: [{ required: true, message: '需求批次号不能为空', trigger: 'blur' }],
|
mrpBaseId: [{ required: true, message: '需求批次号不能为空', trigger: 'blur' }],
|
||||||
|
supplierId: [{ required: true, message: '供应商不能为空', trigger: 'blur' }],
|
||||||
// 电话号码验证
|
// 电话号码验证
|
||||||
technicalDirectorTel: [
|
technicalDirectorTel: [
|
||||||
{ required: true, message: '请输入电话', trigger: 'blur' },
|
{ required: true, message: '请输入电话', trigger: 'blur' },
|
||||||
@ -468,9 +468,16 @@ const handleUpdate = async (row?: PurchaseDocVO) => {
|
|||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
const res = await getPurchaseDoc(_id);
|
const res = await getPurchaseDoc(_id);
|
||||||
Object.assign(form.value, res.data);
|
Object.assign(form.value, res.data);
|
||||||
getPlanList();
|
await getPlanList();
|
||||||
form.value.planId = form.value.associationList?.map((item: any) => item.planId);
|
|
||||||
|
|
||||||
|
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.visible = true;
|
||||||
dialog.title = '修改物资-采购联系单';
|
dialog.title = '修改物资-采购联系单';
|
||||||
};
|
};
|
||||||
@ -478,6 +485,7 @@ const handleUpdate = async (row?: PurchaseDocVO) => {
|
|||||||
const selectPlanList = computed(() => {
|
const selectPlanList = computed(() => {
|
||||||
if (!form.value.planId) return [];
|
if (!form.value.planId) return [];
|
||||||
const result = planList.value.filter((item) => form.value.planId.includes(item.id));
|
const result = planList.value.filter((item) => form.value.planId.includes(item.id));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -486,11 +494,12 @@ const submitForm = () => {
|
|||||||
purchaseDocFormRef.value?.validate(async (valid: boolean) => {
|
purchaseDocFormRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
form.value.associationList = form.value.planId?.map((item: any) => ({
|
form.value.associationList = selectPlanList.value;
|
||||||
planId: item
|
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;
|
form.value.supplier = supplierOptions.value.find((item) => item.id == form.value.supplierId)?.supplierName;
|
||||||
|
|
||||||
if (form.value.id) {
|
if (form.value.id) {
|
||||||
await updatePurchaseDoc(form.value).finally(() => (buttonLoading.value = false));
|
await updatePurchaseDoc(form.value).finally(() => (buttonLoading.value = false));
|
||||||
} else {
|
} else {
|
||||||
|
@ -113,13 +113,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 month = computed(() => {
|
const month = '';
|
||||||
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 monthPlanList = ref<MonthPlanVO[]>([]);
|
const monthPlanList = ref<MonthPlanVO[]>([]);
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
@ -246,7 +240,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 updateMonthPlan(form.value).finally(() => (buttonLoading.value = false));
|
await updateMonthPlan(form.value).finally(() => (buttonLoading.value = false));
|
||||||
} else {
|
} else {
|
||||||
@ -270,6 +263,7 @@ const handleDelete = async (row?: MonthPlanVO) => {
|
|||||||
|
|
||||||
/** 审核按钮操作 */
|
/** 审核按钮操作 */
|
||||||
const handleAudit = async (row?: MonthPlanVO) => {
|
const handleAudit = async (row?: MonthPlanVO) => {
|
||||||
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy?.$tab.openPage('/approval/monthPlan/indexEdit', '审核月度产值计划', {
|
proxy?.$tab.openPage('/approval/monthPlan/indexEdit', '审核月度产值计划', {
|
||||||
planMonth: row?.planMonth,
|
planMonth: row?.planMonth,
|
||||||
id: row?.id,
|
id: row?.id,
|
||||||
|
@ -170,11 +170,12 @@ const getInfo = () => {
|
|||||||
loading.value = true;
|
loading.value = true;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
nextTick(async () => {
|
nextTick(async () => {
|
||||||
routeParams.value.businessId ? routeParams.value.businessId.split('_')[0] : currentProject.value?.id;
|
console.log(routeParams.value);
|
||||||
const res = await getMonthInfo({ id: routeParams.value.id });
|
// 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 = res.data as any;
|
||||||
form.value[0].mid = form.value[0].id;
|
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;
|
loading.value = false;
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
});
|
});
|
||||||
@ -194,7 +195,7 @@ const submitFlow = async () => {
|
|||||||
const handleStartWorkFlow = async (data: LeaveForm) => {
|
const handleStartWorkFlow = async (data: LeaveForm) => {
|
||||||
try {
|
try {
|
||||||
submitFormData.value.flowCode = flowCode.value;
|
submitFormData.value.flowCode = flowCode.value;
|
||||||
submitFormData.value.businessId = currentProject.value?.id + '_' + form.value[0]?.planMonth;
|
submitFormData.value.businessId = routeParams.value.id + '_plan';
|
||||||
|
|
||||||
//流程变量
|
//流程变量
|
||||||
taskVariables.value = {
|
taskVariables.value = {
|
||||||
@ -213,8 +214,6 @@ const handleStartWorkFlow = async (data: LeaveForm) => {
|
|||||||
};
|
};
|
||||||
//审批记录
|
//审批记录
|
||||||
const handleApprovalRecord = () => {
|
const handleApprovalRecord = () => {
|
||||||
console.log(form.value[0]?.id);
|
|
||||||
|
|
||||||
approvalRecordRef.value.init(form.value[0]?.id);
|
approvalRecordRef.value.init(form.value[0]?.id);
|
||||||
};
|
};
|
||||||
//提交回调
|
//提交回调
|
||||||
@ -229,20 +228,12 @@ const approvalVerifyOpen = async () => {
|
|||||||
// 图纸上传成功之后 开始提交
|
// 图纸上传成功之后 开始提交
|
||||||
const submit = async (status, data) => {
|
const submit = async (status, data) => {
|
||||||
form.value = data;
|
form.value = data;
|
||||||
console.log(form.value);
|
|
||||||
|
|
||||||
if (status === 'draft') {
|
if (status === 'draft') {
|
||||||
buttonLoading.value = false;
|
buttonLoading.value = false;
|
||||||
proxy?.$modal.msgSuccess('暂存成功');
|
proxy?.$modal.msgSuccess('暂存成功');
|
||||||
proxy.$tab.closePage(proxy.$route);
|
proxy.$tab.closePage(proxy.$route);
|
||||||
proxy.$router.go(-1);
|
proxy.$router.go(-1);
|
||||||
} else {
|
} 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') {
|
if ((form.value[0]?.planAuditStatus === 'draft' && (flowCode.value === '' || flowCode.value === null)) || routeParams.value.type === 'add') {
|
||||||
flowCode.value = flowCodeOptions[0].value;
|
flowCode.value = flowCodeOptions[0].value;
|
||||||
dialogVisible.visible = true;
|
dialogVisible.visible = true;
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div class="box_submit">
|
<div class="box_submit">
|
||||||
<el-button size="large" @click="cancel()">取 消</el-button>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -219,7 +219,7 @@ const removeProject = (projectId: number | string) => {
|
|||||||
// 提交表单
|
// 提交表单
|
||||||
const submitForm = async () => {
|
const submitForm = async () => {
|
||||||
// 整理项目角色数据
|
// 整理项目角色数据
|
||||||
if (form.value.projectRoles.length == 0) {
|
if (selectedProjects.value.length == 0) {
|
||||||
proxy?.$modal.msgWarning('请选择项目角色');
|
proxy?.$modal.msgWarning('请选择项目角色');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user