songshankun
2023-11-03 cf6a4b874aed82592eea78294715c7c688f9b248
src/views/operate/allot/index.vue
@@ -11,12 +11,22 @@
    </div>
    <div class="list-view">
      <div class="table">
        <TableCommonView
          ref="tableListRef"
          :table-list="tableList"
          @selTableCol="selTableCol"
          @tableRowClick="tableRowClick"
        ></TableCommonView>
        <TableCommonView ref="tableListRef" :table-list="tableList" @selTableCol="selTableCol">
          <template slot="tableButton">
            <el-table-column label="操作" width="100">
              <template slot-scope="scope">
                <el-button @click="tableRowClick(scope.row, '查看')" type="text" size="small">查看</el-button>
                <el-button
                  v-if="scope.row.status !== 4"
                  @click="tableRowClick(scope.row, '编辑')"
                  type="text"
                  size="small"
                  >编辑</el-button
                >
              </template>
            </el-table-column>
          </template>
        </TableCommonView>
      </div>
      <div class="btn-pager">
        <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" />
@@ -47,7 +57,7 @@
  data() {
    return {
      tableList: {},
      showcol: ["从", "至", "联系人", "日期", "来源单据", "公司", "状态"],
      showcol: ["调出位置", "调入位置", "联系人", "日期", "来源单据", "公司", "状态"],
      searchOptions: [],
      editConfig: {
        visible: false,
@@ -89,15 +99,15 @@
          default: true
        },
        {
          label: "从",
          label: "调出位置",
          prop: "from",
          isShowColumn: showcol.includes("从"),
          isShowColumn: showcol.includes("调出位置"),
          default: false
        },
        {
          label: "至",
          label: "调入位置",
          prop: "to",
          isShowColumn: showcol.includes("至"),
          isShowColumn: showcol.includes("调入位置"),
          default: false
        },
        {
@@ -236,11 +246,11 @@
      this.pagerOptions.currPage = 1
      this.getData()
    },
    // 行点击
    tableRowClick(row) {
    // 查看 编辑
    tableRowClick(row, val) {
      console.log(row)
      this.editConfig.visible = true
      this.editConfig.title = "编辑"
      this.editConfig.title = val
      this.editConfig.infomation = { ...row }
    },
    // 新建