yangfeng
2023-10-10 0115a5fc309c214bfb17d2825d380198751f10a9
src/views/other/payment/receipt/index.vue
@@ -7,16 +7,16 @@
    <div v-else class="filter">
      <div class="filter-card">
        <CommonSearch
            :show-add="false"
            :show-download="false"
            :amount-view="false"
            :show-action-btn="false"
            placeholder="请输入收款单编号"
            @searchClick="onFilterSearch"
          :show-add="false"
          :show-download="false"
          :amount-view="false"
          :show-action-btn="false"
          placeholder="请输入收款单编号"
          @searchClick="onFilterSearch"
        >
          <template slot="leftButton">
            <el-button size="small" type="primary"  @click="addBtnClick">新建</el-button>
<!--            <el-button size="small"  @click="delClick">删除</el-button>-->
            <el-button size="small" type="primary" @click="addBtnClick">新建</el-button>
            <!--            <el-button size="small"  @click="delClick">删除</el-button>-->
          </template>
        </CommonSearch>
      </div>
@@ -26,12 +26,12 @@
      <div class="body-card">
        <div class="list-view">
          <TableCommonView
              ref="tableListRef"
              v-loading="loading"
              :table-list="tableList"
              :select-box="!isDetail"
              @getSelectArray="getSelectArray"
              @selTableCol="selTableCol"
            ref="tableListRef"
            v-loading="loading"
            :table-list="tableList"
            :select-box="!isDetail"
            @getSelectArray="getSelectArray"
            @selTableCol="selTableCol"
          >
            <!-- <template slot="tableButton">
              <el-table-column label="操作" width="60" fixed="right">
@@ -124,7 +124,7 @@
      keyword: "",
      keywordType: "",
      tableColumn: [
        { label: "收款单编号", prop: "number", default: true},
        { label: "收款单编号", prop: "number", default: true },
        { label: "客户名称", prop: "client_name" },
        { label: "选择源单", prop: "sourceId" },
        { label: "实际收款金额", prop: "amount" },
@@ -132,7 +132,7 @@
        { label: "销售负责人", prop: "principal_name" },
        { label: "收款日期", prop: "receiptDate" }
      ],
      showCol:["收款单编号", "客户名称", "选择源单", "实际收款金额", "收款方式", "销售负责人", "收款日期"]
      showCol: ["收款单编号", "客户名称", "选择源单", "实际收款金额", "收款方式", "销售负责人", "收款日期"]
    }
  },
  created() {
@@ -152,9 +152,9 @@
        tableInfomation: [],
        allcol: [],
        showcol: this.showCol,
        tableColumn:this.setColumnVisible(this.showCol)
        tableColumn: this.setColumnVisible(this.showCol)
      }
      this.tableList.allcol = this.tableList.tableColumn.filter(ele=>!ele.default).map(ele=>ele.label);
      this.tableList.allcol = this.tableList.tableColumn.filter((ele) => !ele.default).map((ele) => ele.label)
      this.searchOptions = []
      for (let i = 0; i < this.tableList.tableColumn.length; i++) {
        const label = this.tableList.tableColumn[i].label
@@ -162,17 +162,17 @@
        this.searchOptions.push({ value: value, label: label })
      }
    },
    setColumnVisible(showCol){
      return  this.tableColumn.map(ele=>{
    setColumnVisible(showCol) {
      return this.tableColumn.map((ele) => {
        return {
          ...ele,
          isShowColumn:showCol.includes(ele.label)
          isShowColumn: showCol.includes(ele.label)
        }
      })
    },
    selTableCol(val) {
      this.showcol = val;
      this.tableList.tableColumn = this.setColumnVisible(val);
      this.showcol = val
      this.tableList.tableColumn = this.setColumnVisible(val)
    },
    // 请求数据
    async getData() {
@@ -212,7 +212,7 @@
        })
    },
    // 搜索
    onFilterSearch(searchText){
    onFilterSearch(searchText) {
      this.keyword = searchText ?? ""
      this.keywordType = "收款单编号"
      this.pagerOptions.currPage = 1
@@ -231,7 +231,7 @@
      this.editConfig.visible = true
      this.editConfig.title = "新建"
      this.editConfig.sourceType = this.sourceType
      this.editConfig.infomation = { ...this.addConfig }
      this.editConfig.infomation = { ...this.addConfig, number: "" }
    }
  }
}
@@ -239,15 +239,15 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.receipt{
.receipt {
  height: 100%;
  overflow: hidden;
  .filter{
  .filter {
    height: 80px;
    display: flex;
    align-items: center;
    padding: 12px 20px 0 20px;
    &-card{
    &-card {
      height: 80px;
      display: flex;
      align-items: center;
@@ -258,7 +258,7 @@
      background-color: #fff;
    }
  }
  .body{
  .body {
    box-sizing: border-box;
    padding: 10px 20px;
    border-radius: 12px;