|
@@ -47,7 +47,7 @@
|
|
|
</template>
|
|
|
<template #action="{row,index}">
|
|
|
<el-button plain size="small" type="primary" @click="editRowClick(row)">编辑</el-button>
|
|
|
- <el-button plain size="small" type="danger">删除</el-button>
|
|
|
+ <el-button plain size="small" type="danger" @click="delRowClick(row)">删除</el-button>
|
|
|
</template>
|
|
|
</HcTable>
|
|
|
|
|
@@ -62,6 +62,7 @@ import {ref,onMounted,onActivated} from "vue";
|
|
|
import {useRouter} from 'vue-router'
|
|
|
import contractApi from '~api/project/project-contract.js';
|
|
|
import {getArrValue} from "js-fast-way"
|
|
|
+import {delMessage} from "~uti/tools";
|
|
|
|
|
|
const router = useRouter()
|
|
|
onActivated(()=>{
|
|
@@ -161,6 +162,20 @@ const editRowClick = (row) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+//删除
|
|
|
+const delRowClick = ({id}) => {
|
|
|
+ delMessage(async () => {
|
|
|
+ const {error, code, msg} = await contractApi.deleteContractInfoById({id})
|
|
|
+ //判断状态
|
|
|
+ if (!error && code === 200) {
|
|
|
+ window.$message?.success(msg)
|
|
|
+ getTableData().then()
|
|
|
+ } else {
|
|
|
+ window.$message?.error(msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
//合同回款更新
|
|
|
const updateClick = () => {
|
|
|
router.push({
|