From ba814d605ad50da217a3dd422bcc7db5360b092f Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期六, 05 八月 2023 17:51:50 +0800
Subject: [PATCH] 销售模块详情页
---
src/views/sales/refundForm/index.vue | 86 +++++++++++++++++++++++++++++++++++++-----
1 files changed, 75 insertions(+), 11 deletions(-)
diff --git a/src/views/sales/refundForm/index.vue b/src/views/sales/refundForm/index.vue
index 8cba159..df1d464 100644
--- a/src/views/sales/refundForm/index.vue
+++ b/src/views/sales/refundForm/index.vue
@@ -1,11 +1,27 @@
<template>
<div class="refund-form">
- <SearchCommonView ref="searchCommonView" :query-class-options="queryClassOptions" :search-options="searchOptions" />
- <div class="btn-pager">
- <PublicFunctionBtnView :receive="false" :submit-approval="true" :operates-list="operatesList" />
- <PagerView class="page" />
+ <div v-if="isDetail" class="detail-top">
+ <DetailListCommonBtn :query-class-options="queryClassOptions" />
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
</div>
- <TableCommonView ref="tableListRef" :table-list="tableList">
+ <div v-else class="top">
+ <SearchCommonView
+ ref="searchCommonView"
+ :query-class-options="queryClassOptions"
+ :search-options="searchOptions"
+ />
+ <div class="btn-pager">
+ <PublicFunctionBtnView :receive="false" :submit-approval="true" :operates-list="operatesList" />
+ <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
+ </div>
+ </div>
+ <TableCommonView
+ ref="tableListRef"
+ :table-list="tableList"
+ :select-box="!isDetail"
+ @selClientClick="selClientClick"
+ @selCommonClick="selCommonClick"
+ >
<template slot="tableButton">
<el-table-column label="鎿嶄綔" width="100">
<template slot-scope="scope">
@@ -17,18 +33,32 @@
</TableCommonView>
<!-- 鏂板缓/缂栬緫 -->
<AddRefundFormDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
+ <!-- 閿�鍞��璐у崟璇︽儏 -->
+ <DetailRefundForm v-if="refundFormDetail.visible" :refund-form-detail="refundFormDetail" />
+ <!-- 瀹㈡埛璇︽儏 -->
+ <DetailClientManage v-if="clientDeail.visible" :client-manage-detail="clientDeail" />
</div>
</template>
<script>
import AddRefundFormDialog from "@/views/sales/refundForm/AddRefundFormDialog"
import { getSalesRefundList, getDelSalesRefund } from "@/api/sales/refundForm"
+import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
+import DetailRefundForm from "@/views/sales/refundForm/DetailRefundForm"
export default {
name: "RefundForm",
- props: {},
+ props: {
+ isDetail: {
+ type: Boolean,
+ default: false
+ }
+ },
+ mixins: [pageMixin],
components: {
- AddRefundFormDialog
+ AddRefundFormDialog,
+ DetailRefundForm,
+ DetailClientManage: () => import("@/views/client/client/DetailClientManage")
},
computed: {
searchCommonHeight() {
@@ -59,6 +89,14 @@
visible: false,
title: "鏂板缓",
infomation: {}
+ },
+ refundFormDetail: {
+ visible: false,
+ infomation: {}
+ },
+ clientDeail: {
+ visible: false,
+ infomation: {}
}
}
},
@@ -71,8 +109,8 @@
this.tableList = {
tableInfomation: [],
tableColumn: [
- { label: "閫�娆惧崟缂栧彿", prop: "number" },
- { label: "瀹㈡埛鍚嶇О", prop: "clientId", min: 120 },
+ { label: "閫�娆惧崟缂栧彿", prop: "number", isCommonClick: true },
+ { label: "瀹㈡埛鍚嶇О", prop: "clientId", min: 120, isClientClick: true },
{ label: "閫�娆炬棩鏈�", prop: "refundDate", isTime: true, min: 130 },
{ label: "璐︽埛", prop: "accountId" },
{ label: "鏄惁寮�绁�", prop: "isInvoice", min: 100 },
@@ -91,7 +129,11 @@
// 璇锋眰鏁版嵁
async getData() {
this.loading = true
- await getSalesRefundList()
+ await getSalesRefundList({
+ keyword: "",
+ page: this.pagerOptions.currPage,
+ pageSize: this.pagerOptions.pageSize
+ })
.then((res) => {
console.log(res)
if (res.code === 200) {
@@ -102,6 +144,7 @@
}
})
this.tableList.tableInfomation = list || []
+ this.pagerOptions.totalCount = res.data.count
} else {
this.tableList.tableInfomation = []
}
@@ -151,6 +194,18 @@
},
getSelectArray(val) {
console.log(val)
+ },
+ // 瀹㈡埛鍚嶇О璇︽儏
+ selClientClick(row) {
+ console.log(row)
+ this.clientDeail.visible = true
+ this.clientDeail.infomation = { ...row, client_name: row.name }
+ },
+ // 鑱旂郴浜鸿鎯�
+ selCommonClick(row) {
+ console.log(row)
+ this.refundFormDetail.visible = true
+ this.refundFormDetail.infomation = { ...row }
}
}
}
@@ -159,7 +214,16 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.refund-form {
- .btn-pager {
+ .top {
+ margin-bottom: 20px;
+ .btn-pager {
+ display: flex;
+ .page {
+ margin-left: auto;
+ }
+ }
+ }
+ .detail-top {
display: flex;
.page {
margin-left: auto;
--
Gitblit v1.8.0