yangfeng
2023-08-05 ba814d605ad50da217a3dd422bcc7db5360b092f
src/views/sales/salesReturn/index.vue
@@ -1,6 +1,10 @@
<template>
  <div class="sales-return">
    <div class="top">
    <div v-if="isDetail" class="detail-top">
      <DetailListCommonBtn :query-class-options="queryClassOptions" />
      <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
    </div>
    <div v-else class="top">
      <SearchCommonView
        ref="searchCommonView"
        :query-class-options="queryClassOptions"
@@ -11,7 +15,13 @@
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
      </div>
    </div>
    <TableCommonView ref="tableListRef" :table-list="tableList">
    <TableCommonView
      ref="tableListRef"
      :table-list="tableList"
      :select-box="!isDetail"
      @selClientClick="selClientClick"
      @selCommonClick="selCommonClick"
    >
      <template slot="tableButton">
        <el-table-column label="操作" width="90">
          <template slot-scope="scope">
@@ -23,6 +33,10 @@
    </TableCommonView>
    <!-- 新建/编辑 -->
    <AddSalesReturnDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
    <!-- 销售退货单详情 -->
    <DetailReturn v-if="returnDetail.visible" :return-detail="returnDetail" />
    <!-- 客户详情 -->
    <DetailClientManage v-if="clientDeail.visible" :client-manage-detail="clientDeail" />
  </div>
</template>
@@ -30,13 +44,21 @@
import AddSalesReturnDialog from "@/views/sales/salesReturn/AddSalesReturnDialog"
import { getSalesReturnList, getDelSalesReturn } from "@/api/sales/salesReturn"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import DetailReturn from "@/views/sales/salesReturn/DetailReturn"
export default {
  name: "SalesReturn",
  props: {},
  props: {
    isDetail: {
      type: Boolean,
      default: false
    }
  },
  mixins: [pageMixin],
  components: {
    AddSalesReturnDialog
    AddSalesReturnDialog,
    DetailReturn,
    DetailClientManage: () => import("@/views/client/client/DetailClientManage")
  },
  computed: {
    searchCommonHeight() {
@@ -68,6 +90,14 @@
        visible: false,
        title: "新建",
        infomation: {}
      },
      returnDetail: {
        visible: false,
        infomation: {}
      },
      clientDeail: {
        visible: false,
        infomation: {}
      }
    }
  },
@@ -80,8 +110,8 @@
      this.tableList = {
        tableInfomation: [],
        tableColumn: [
          { label: "销售退货单编号", prop: "number", min: 120 },
          { label: "客户名称", prop: "clientId", min: 90 },
          { label: "销售退货单编号", prop: "number", min: 120, isCommonClick: true },
          { label: "客户名称", prop: "clientId", min: 90, isClientClick: true },
          { label: "退货日期", prop: "returnDate", isTime: true, min: 130 },
          { label: "状态", prop: "status" },
          { label: "退入仓库", prop: "repository" },
@@ -165,6 +195,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.returnDetail.visible = true
      this.returnDetail.infomation = { ...row }
    }
  }
}
@@ -182,5 +224,11 @@
      }
    }
  }
  .detail-top {
    display: flex;
    .page {
      margin-left: auto;
    }
  }
}
</style>