counterDetail.vue 4.52 KB
<template>
  <div class="ct">
    <el-dialog  :visible.sync="detailDialog" width="65%" :show-close="false" >
      <div class="choose">
        <div class="title">
          <div class="cg">柜组详情</div>
          <div class="circle" @click="handleClose">
            <d2-icon-svg name="close" class="icon" />
          </div>
        </div>
        <div class="br">
          <el-form
            class="searchzone"
            :model="formData"
            label-width="auto"
            disabled
          >
            <el-form-item label="柜组名称:">
              <el-input
                size="small"
                v-model="formData.name"
                style="width:240px"
                placeholder="请输入柜组名称"
              />
            </el-form-item>
            <el-form-item label="柜组编号:">
              <el-input
                size="small"
                v-model="formData.code"
                style="width:240px"
                placeholder="请输入柜组编号"
              />
            </el-form-item>
            <el-form-item label="柜组负责人:">
              <el-input
                size="small"
                v-model="formData.people"
                style="width:240px"
              />
            </el-form-item>
            <el-form-item label="所在区域:">
              <el-input
                size="small"
                v-model="formData.area"
                style="width:240px"
                placeholder="请输入所在区域"
              />
            </el-form-item>
            <div class="tb">
              <el-form-item label="门店:"> </el-form-item>
              <el-table
                stripe
                class="list"
                ref="multipleTable table"
                :data="tableData"
                tooltip-effect="dark"
                style="width: 100%"
              >
                <el-table-column
                  type="index"
                  label="序号"
                  width="60"
                ></el-table-column>
                <el-table-column
                  prop="name"
                  label="柜组名称"
                  align="center"
                ></el-table-column>
                <el-table-column
                  prop="signNum"
                  label="门牌号"
                  align="center"
                ></el-table-column>
              </el-table>
            </div>
          </el-form>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { getDetail } from "@/api/in/counter"
export default {
  props: {
    msgId: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      detailDialog: false,
      formData: {
        name: "",
        code: "",
        people: ""
      },
      tableData: [],
      personList: [],
      counter:[]
    };
  },
  created() {
    this.getDetail()
  },
  methods: {
    getDetail() {
      this.detailDialog = true
      let params = {
        isDetail: true,
        shopId: this.msgId
      }
      getDetail(params).then(res => {
        console.log(res,"详情");
        let data = res.data
        this.formData.name = data.shop.name
        this.formData.code = data.shop.num
        this.formData.people = data.principal.userName
        this.formData.area = data.shop.area
        this.tableData = data.shop.adminStallList
      })
    },

    handleClose(done) {
      this.$confirm("确认关闭?")
        .then(_ => {
          this.detailDialog = false;
          his.$emit('handleDetailClose',"false")
        })
        .catch(_ => {});
    },
  },
  watch:{
    detailDialog(newValue) {
      // this.getDetail()

    },

  }
};
</script>
<style>
</style>
<style scoped>
.tb {
  display: flex;
}
.choose {
  padding: 16px;
  font-size: 16px;
  font-weight: bold;
  color: rgba(56, 56, 56, 1);
  box-sizing: border-box;
}
.title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
}
.transfer-footer {
  margin-left: 20px;
  padding: 6px 5px;
}
.ct >>> .el-dialog__header {
  padding: 0 !important;
}
.ct >>> .el-dialog__body {
  padding: 0;
}
.ct >>> .el-transfer-panel {
  width: 250px;
}
.circle {
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(208, 2, 27, 1);
  position: relative;
}
.circle >>> .icon {
  width: 28px;
  height: 28px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.br {
  border-top: 1px solid #f8f8f8;
  border-bottom: 1px solid #f8f8f8;
  padding: 24px 60px;
}
</style>