yangfeng
2023-08-09 acdff03246ce648082192dfb069c3a006a7fbee6
src/views/sales/masterOrder/index.vue
@@ -1,11 +1,28 @@
<template>
  <div class="master-order">
    <SearchCommonView ref="searchCommonView" :query-class-options="queryClassOptions" :search-options="searchOptions" />
    <div class="btn-pager">
      <PublicFunctionBtnView :operates-list="operatesList" />
    <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" :show-summary="showSummary" :table-list="tableList">
    <div v-else class="top">
      <SearchCommonView
        ref="searchCommonView"
        :query-class-options="queryClassOptions"
        :search-options="searchOptions"
      />
      <div class="btn-pager">
        <PublicFunctionBtnView :operates-list="operatesList" />
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
      </div>
    </div>
    <TableCommonView
      ref="tableListRef"
      :show-summary="showSummary"
      :table-list="tableList"
      :select-box="!isDetail"
      @selClientClick="selClientClick"
      @selCommonClick="selCommonClick"
    >
      <template slot="tableButton">
        <el-table-column label="操作" width="90">
          <template slot-scope="scope">
@@ -17,6 +34,10 @@
    </TableCommonView>
    <!-- 新建/编辑 -->
    <AddMasterOrderDialog v-if="editConfig.visible" :edit-common-config="editConfig" />
    <!-- 销售子单详情 -->
    <DetailMasterOrder v-if="masterOrderDeail.visible" :master-order-detail="masterOrderDeail" />
    <!-- 客户详情 -->
    <DetailClientManage v-if="clientDeail.visible" :client-manage-detail="clientDeail" />
  </div>
</template>
@@ -24,13 +45,21 @@
import AddMasterOrderDialog from "@/views/sales/masterOrder/AddMasterOrderDialog"
import { getMasterOrderList, getDelMasterOrder } from "@/api/sales/masterOrder"
import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
import DetailMasterOrder from "@/views/sales/masterOrder/DetailMasterOrder"
export default {
  name: "MasterOrder",
  props: {},
  props: {
    isDetail: {
      type: Boolean,
      default: false
    }
  },
  mixins: [pageMixin],
  components: {
    AddMasterOrderDialog
    AddMasterOrderDialog,
    DetailMasterOrder,
    DetailClientManage: () => import("@/views/client/client/DetailClientManage")
  },
  computed: {},
  data() {
@@ -64,6 +93,14 @@
        show: true,
        sumProp: ["money"],
        mergeNumber: 5
      },
      masterOrderDeail: {
        visible: false,
        infomation: {}
      },
      clientDeail: {
        visible: false,
        infomation: {}
      }
    }
  },
@@ -76,8 +113,8 @@
      this.tableList = {
        tableInfomation: [],
        tableColumn: [
          { label: "单据编号", prop: "number", min: 100 }, // 单据编号
          { label: "客户名称", prop: "client_name", min: 120 }, // 客户名称
          { label: "单据编号", prop: "number", min: 100, isCommonClick: true }, // 单据编号
          { label: "客户名称", prop: "client_name", min: 120, isClientClick: true }, // 客户名称
          { label: "服务开始时间", prop: "start_time", isTime: true }, // 服务开始时间
          { label: "服务截止时间", prop: "end_time", isTime: true }, // 服务截止时间
          { label: "合同金额", prop: "money" }, // 合同金额
@@ -160,6 +197,18 @@
    },
    getSelectArray(val) {
      console.log(val)
    },
    // 客户名称详情
    selClientClick(row) {
      console.log(row)
      this.clientDeail.visible = true
      this.clientDeail.infomation = { ...row }
    },
    // 机会名称详情
    selCommonClick(row) {
      console.log(row)
      this.masterOrderDeail.visible = true
      this.masterOrderDeail.infomation = { ...row }
    }
  }
}
@@ -168,7 +217,16 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.master-order {
  .btn-pager {
  .top {
    margin-bottom: 20px;
    .btn-pager {
      display: flex;
      .page {
        margin-left: auto;
      }
    }
  }
  .detail-top {
    display: flex;
    .page {
      margin-left: auto;