From 8380b537474be9b9aa24efcd65c730e2907b9b8b Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期六, 26 八月 2023 18:07:48 +0800 Subject: [PATCH] 服务商相关接口联调 --- src/components/makepager/CommonFormTableView.vue | 73 ++++++++++++------------------------ 1 files changed, 24 insertions(+), 49 deletions(-) diff --git a/src/components/makepager/CommonFormTableView.vue b/src/components/makepager/CommonFormTableView.vue index 035740b..a42b2e6 100644 --- a/src/components/makepager/CommonFormTableView.vue +++ b/src/components/makepager/CommonFormTableView.vue @@ -1,13 +1,8 @@ <template> <div class="page-view"> <el-form ref="form" :model="tableList" :show-message="false" label-position="right"> - <el-table - :data="tableList.tableData" - :show-summary="showSummary.show" - :summary-method="getSummaries" - :span-method="arraySpanMethod" - style="width: 100%" - > + <el-table :data="tableList.tableData" style="width: 100%"> + <el-table-column type="index" label="缂栧彿" width="50" align="center"></el-table-column> <el-table-column v-for="(item, i) in tableList.tableColumn" :key="i" @@ -127,25 +122,18 @@ </el-form> <div v-if="!detailEnter" style="margin: 10px"> <el-button size="small" type="primary" @click="add">鏂板</el-button> - <!-- <el-button size="small" type="primary" disabled>瀵煎叆鏄庣粏</el-button> --> <el-button size="small" type="primary" @click="empty">娓呯┖</el-button> - <el-button size="small" v-if="recalculateShow" type="primary" @click="recalculate" :disabled="isRecalculate ? false : true" + + <el-button + size="small" + v-if="recalculateShow" + type="primary" + @click="recalculate" + :disabled="isRecalculate ? false : true" >閲嶇畻</el-button > </div> - <div v-if="showSummary.total || showSummary.refundable" style="height: 42px; line-height: 42px"> - <el-row :gutter="10"> - <el-col v-if="showSummary.total" :span="2" :offset="22"> - <span style="font-weight: bold">鍚堣</span> - <span style="margin-left: 10px">{{ total }}</span> - </el-col> - <el-col v-if="showSummary.refundable" :span="2" :offset="22"> - <span style="font-weight: bold">搴旈��娆�</span> - <span style="margin-left: 10px">0.00</span> - </el-col> - </el-row> - </div> - <!-- 鍚堝悓璁㈠崟 --> + <!-- 浜у搧鍚嶇О --> <SelectCommonDialog v-if="editSelCommonConfig.editVisible" :edit-common-config="editSelCommonConfig" @@ -155,7 +143,7 @@ </template> <script> -import { getProductList } from "@/api/common/other" +import { getProductList } from "@/api/productManage/product" import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" export default { name: "CommmonFormTableView", @@ -185,16 +173,15 @@ total: false, refundable: false, sumProp: [], - titleProp:["#", "浜у搧鍚嶇О"], + titleProp: ["#", "浜у搧鍚嶇О"], mergeNumber: 1 } } }, - recalculateShow:{ - type:[Boolean], - defalut:true, - }, - + recalculateShow: { + type: [Boolean], + defalut: true + } }, data() { return { @@ -224,15 +211,13 @@ // 浜у搧鍚嶇О async getProductList() { await getProductList({ - productName: "", - productNumber: "", page: 1, - pageSize: 5 + pageSize: 100 }).then((res) => { console.log(res.data) if (res.data.code === 200) { - if (res.data.data.data && res.data.data.data.length > 0) { - this.productList = res.data.data.data + if (res.data.data.list && res.data.data.list.length > 0) { + this.productList = res.data.data.list } } }) @@ -297,6 +282,7 @@ }) return sums }, + // 鏁板瓧鎹㈣涓洪噾棰濇樉绀烘牸寮� number_format(number, decimals, dec_point, thousands_sep) { decimals = 2 //杩欓噷榛樿璁剧疆淇濈暀涓や綅灏忔暟锛屼篃鍙互娉ㄩ噴杩欏彞閲囩敤浼犲叆鐨勫弬鏁� @@ -338,21 +324,6 @@ empty() { this.isRecalculate = false this.$emit("emptyProductClick") - }, - // 閲嶇畻 - recalculate() { - this.$confirm("纭畾瑕侀噸绠楁槑缁嗘墍鏈夎?", "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning" - }) - .then(() => { - this.$emit("recalculateProductClick") - this.tableList.tableData.map((ite) => { - ite.total = ite.amount ? ite.amount * ite.price : 1 * ite.price - }) - }) - .catch(() => {}) }, // 閫夋嫨浜у搧鍚嶇О鐩稿叧鏂规硶 querySearchAsync(queryString, cb) { @@ -412,6 +383,10 @@ } }) this.$emit("clearupProduct", this.tableList.tableData) + }, + // 鍒犻櫎 + deleteClient(row) { + this.$emit("deleteProduct", row) } } } -- Gitblit v1.8.0