From a63bbe043b87d9becfe483bb1477d471a79edcd8 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期日, 23 七月 2023 11:45:24 +0800 Subject: [PATCH] 全部删除接口联调 --- src/views/sales/masterOrder/index.vue | 65 +++++++++++++++++++------------- 1 files changed, 38 insertions(+), 27 deletions(-) diff --git a/src/views/sales/masterOrder/index.vue b/src/views/sales/masterOrder/index.vue index ec9bdd3..460fb47 100644 --- a/src/views/sales/masterOrder/index.vue +++ b/src/views/sales/masterOrder/index.vue @@ -7,9 +7,10 @@ </div> <TableCommonView ref="tableListRef" :show-summary="showSummary" :table-list="tableList"> <template slot="tableButton"> - <el-table-column label="鎿嶄綔" width="60"> + <el-table-column label="鎿嶄綔" width="90"> <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> @@ -21,7 +22,7 @@ <script> import AddMasterOrderDialog from "@/views/sales/masterOrder/AddMasterOrderDialog" -import { getMasterOrderList } from "@/api/sales/masterOrder" +import { getMasterOrderList, getDelMasterOrder } from "@/api/sales/masterOrder" export default { name: "MasterOrder", @@ -59,7 +60,7 @@ }, showSummary: { show: true, - sumProp: ["contractAmount"], + sumProp: ["money"], mergeNumber: 5 } } @@ -73,13 +74,13 @@ this.tableList = { tableInfomation: [], tableColumn: [ - { label: "鍗曟嵁缂栧彿", prop: "documentNumber", min: 120 }, // 鍗曟嵁缂栧彿 - { label: "瀹㈡埛鍚嶇О", prop: "customName", min: 120 }, // 瀹㈡埛鍚嶇О - { label: "鏈嶅姟寮�濮嬫椂闂�", prop: "serviceStartTime", min: 90 }, // 鏈嶅姟寮�濮嬫椂闂� - { label: "鏈嶅姟鎴鏃堕棿", prop: "serviceDeadline" }, // 鏈嶅姟鎴鏃堕棿 - { label: "鍚堝悓閲戦", prop: "contractAmount", min: 100 }, // 鍚堝悓閲戦 - { label: "璐熻矗浜�", prop: "owner" }, // 璐熻矗浜� - { label: "瀹℃壒鐘舵��", prop: "approvalStatus" } // 瀹℃壒鐘舵�� + { label: "鍗曟嵁缂栧彿", prop: "number", min: 100 }, // 鍗曟嵁缂栧彿 + { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 120 }, // 瀹㈡埛鍚嶇О + { label: "鏈嶅姟寮�濮嬫椂闂�", prop: "start_time", isTime: true }, // 鏈嶅姟寮�濮嬫椂闂� + { label: "鏈嶅姟鎴鏃堕棿", prop: "end_time", isTime: true }, // 鏈嶅姟鎴鏃堕棿 + { label: "鍚堝悓閲戦", prop: "money" }, // 鍚堝悓閲戦 + { label: "璐熻矗浜�", prop: "member_id" } // 璐熻矗浜� + // { label: "瀹℃壒鐘舵��", prop: "approvalStatus" } // 瀹℃壒鐘舵�� ] } this.searchOptions = [] @@ -98,7 +99,8 @@ if (res.data.list && res.data.list.length > 0) { const list = res.data.list.map((item) => { return { - ...item + ...item, + client_name: item.client.name } }) this.tableList.tableInfomation = list || [] @@ -120,28 +122,37 @@ addBtnClick() { this.editConfig.visible = true this.editConfig.title = "鏂板缓" - this.editConfig.infomation = { - customName: "", - documentNumber: "AC6521", - owner: "", - serviceStartTime: "", - serviceDeadline: "", - contractAmount: "" - } + this.editConfig.infomation = {} }, // 缂栬緫 handleClick(row) { console.log(row) this.editConfig.visible = true this.editConfig.title = "缂栬緫" - this.editConfig.infomation = { - customName: "", - documentNumber: "AC6521", - owner: "", - serviceStartTime: "", - serviceDeadline: "", - contractAmount: "" - } + this.editConfig.infomation = { ...row } + }, + // 鍒犻櫎 + delClick(id) { + this.$confirm("鏄惁纭鍒犻櫎?", "璀﹀憡", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning" + }) + .then(function () { + return getDelMasterOrder({ id: id }) + }) + .then((response) => { + if (response.code === 200) { + this.$message.success("鍒犻櫎鎴愬姛") + this.getData() + } else { + this.$message.warning("鍒犻櫎澶辫触") + } + }) + .catch(function () {}) + }, + getSelectArray(val) { + console.log(val) } } } -- Gitblit v1.8.0