From 02a1ab651bb79684cf0656bd6fad0611fe568b2b Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期四, 20 七月 2023 18:28:17 +0800 Subject: [PATCH] 服务模块相关接口联调 --- src/views/sales/contractManage/index.vue | 50 +++++++++++++++++++++++++++----------------------- 1 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/views/sales/contractManage/index.vue b/src/views/sales/contractManage/index.vue index f3e7225..34d7b2d 100644 --- a/src/views/sales/contractManage/index.vue +++ b/src/views/sales/contractManage/index.vue @@ -20,6 +20,7 @@ <el-table-column label="鎿嶄綔" width="100"> <template slot-scope="scope"> <el-button @click="handleClick(scope.row)" type="text" size="small">缂栬緫</el-button> + <el-button @click="delClick(scope.row.id)" type="text" size="small">鍒犻櫎</el-button> </template> </el-table-column> </template> @@ -31,7 +32,7 @@ <script> import AddContractManageDialog from "@/views/sales/contractManage/AddContractManageDialog" -import { getContractList } from "@/api/sales/contractManage" +import { getContractList, getDelContract } from "@/api/sales/contractManage" export default { name: "ContractManage", @@ -127,34 +128,37 @@ addBtnClick() { this.editConfig.visible = true this.editConfig.title = "鏂板缓" - this.editConfig.infomation = { - customName: "", - documentNumber: "ZDYBD01-3", - owner: "", - contractStatus: "", - salesQuotation: "", - approvalWorkflow: "", - approvalSteps: "", - approvalPerson: "", - approvalOpinion: "" - } + this.editConfig.infomation = {} }, // 缂栬緫 handleClick(row) { console.log(row) this.editConfig.visible = true this.editConfig.title = "缂栬緫" - this.editConfig.infomation = { - customName: "", - documentNumber: "TKD20230521-12", - owner: "", - contractStatus: "", - salesQuotation: "", - approvalWorkflow: "", - approvalSteps: "", - approvalPerson: "", - approvalOpinion: "" - } + this.editConfig.infomation = { ...row } + }, + // 鍒犻櫎 + delClick(id) { + this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning" + }) + .then(function () { + return getDelContract({ id: id }) + }) + .then((response) => { + if (response.code === 200) { + this.$message.success("鍒犻櫎鎴愬姛") + this.getUserList() + } else { + this.$message.warning("鍒犻櫎澶辫触") + } + }) + .catch(function () {}) + }, + getSelectArray(val) { + console.log(val) } } } -- Gitblit v1.8.0