feat(crm/contract): 添加状态变更功能并优化代码

在合同管理页面添加状态变更下拉选择功能,支持草稿、已生效、已作废和已完成四种状态切换。同时移除base.vue中无用的注释代码。
This commit is contained in:
砂糖
2026-03-31 14:16:08 +08:00
parent 62444ef743
commit abcc644f74
2 changed files with 20 additions and 1 deletions

View File

@@ -76,6 +76,16 @@
</span-tag>
</template>
</el-table-column>
<el-table-column label="状态变更" align="center" prop="status" v-hasPermi="['crm:contract:status']">
<template slot-scope="scope">
<el-select v-model="scope.row.status" placeholder="请选择状态变更" @change="handleChangeStatus(scope.row)">
<el-option label="草稿" :value="0" />
<el-option label="已生效" :value="1" />
<el-option label="已作废" :value="2" />
<el-option label="已完成" :value="3" />
</el-select>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@@ -386,6 +396,16 @@ export default {
this.loading = false;
});
},
/** 状态变更 */
handleChangeStatus(row) {
updateContract(row).then(response => {
this.$message({
message: "状态变更成功",
type: "success"
});
this.getList();
})
},
/** 查询合同配卷列表 */
getCoilList() {
listContractPackaging(this.form.contractId).then(response => {