合并
This commit is contained in:
@ -19,22 +19,6 @@
|
||||
<el-card shadow="never">
|
||||
<template #header>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['out:monthPlan:add']">新增</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['out:monthPlan:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['out:monthPlan:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['out:monthPlan:export']">导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</template>
|
||||
@ -57,6 +41,8 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="210">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" link icon="Edit" @click="handleAdd(scope.row)" v-hasPermi="['out:monthPlan:add']">编辑</el-button>
|
||||
|
||||
<el-button link type="primary" icon="Finished" @click="handleAudit(scope.row)" v-hasPermi="['out:constructionValue:remove']"
|
||||
>审核</el-button
|
||||
>
|
||||
@ -69,12 +55,19 @@
|
||||
<el-dialog draggable :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||
<el-form ref="monthPlanFormRef" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="所属项目" prop="projectId">
|
||||
<el-select v-model="form.projectId" placeholder="请选择所属项目">
|
||||
<el-select v-model="form.projectId" placeholder="请选择所属项目" disabled>
|
||||
<el-option v-for="item in projectList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划月份" prop="planMonth">
|
||||
<el-date-picker v-model="form.planMonth" type="month" value-format="YYYY-MM" placeholder="请选择计划月份" @change="handlePlanMonthChange" />
|
||||
<el-date-picker
|
||||
v-model="form.planMonth"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
disabled
|
||||
placeholder="请选择计划月份"
|
||||
@change="handlePlanMonthChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计划产值" prop="planValue">
|
||||
<el-input v-model="form.planValue" placeholder="请输入计划产值" disabled />
|
||||
@ -129,6 +122,7 @@ const initFormData: MonthPlanForm = {
|
||||
planValue: undefined,
|
||||
completeValue: undefined,
|
||||
differenceValue: undefined,
|
||||
isDesign: false,
|
||||
planMonth: undefined,
|
||||
valueType: '1',
|
||||
planAuditStatus: undefined,
|
||||
@ -201,8 +195,12 @@ const handleSelectionChange = (selection: MonthPlanVO[]) => {
|
||||
};
|
||||
|
||||
/** 新增按钮操作 */
|
||||
const handleAdd = () => {
|
||||
const handleAdd = (row?: MonthPlanVO) => {
|
||||
reset();
|
||||
if (row) {
|
||||
Object.assign(form.value, row);
|
||||
}
|
||||
|
||||
dialog.visible = true;
|
||||
dialog.title = '添加设计完工产值';
|
||||
};
|
||||
@ -222,6 +220,7 @@ const submitForm = () => {
|
||||
monthPlanFormRef.value?.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
buttonLoading.value = true;
|
||||
form.value.isDesign = false;
|
||||
await updateMonthPlan(form.value).finally(() => (buttonLoading.value = false));
|
||||
proxy?.$modal.msgSuccess('操作成功');
|
||||
dialog.visible = false;
|
||||
|
Reference in New Issue
Block a user