counterDetail.vue 4.52 KB
Newer Older
xd's avatar
xd committed
1 2
<template>
  <div class="ct">
xulili's avatar
xulili committed
3
    <el-dialog  :visible.sync="detailDialog" width="65%" :show-close="false" >
xd's avatar
xd committed
4 5
      <div class="choose">
        <div class="title">
xd's avatar
xd committed
6
          <div class="cg">柜组详情</div>
xd's avatar
xd committed
7 8 9 10 11
          <div class="circle" @click="handleClose">
            <d2-icon-svg name="close" class="icon" />
          </div>
        </div>
        <div class="br">
xd's avatar
xd committed
12 13 14 15 16 17
          <el-form
            class="searchzone"
            :model="formData"
            label-width="auto"
            disabled
          >
xd's avatar
xd committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
            <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="柜组负责人:">
xd's avatar
xd committed
35
              <el-input
xd's avatar
xd committed
36 37 38
                size="small"
                v-model="formData.people"
                style="width:240px"
xd's avatar
xd committed
39
              />
xd's avatar
xd committed
40
            </el-form-item>
xd's avatar
xd committed
41
            <el-form-item label="所在区域:">
xd's avatar
xd committed
42 43 44 45 46 47 48
              <el-input
                size="small"
                v-model="formData.area"
                style="width:240px"
                placeholder="请输入所在区域"
              />
            </el-form-item>
xd's avatar
xd committed
49 50
            <div class="tb">
              <el-form-item label="门店:"> </el-form-item>
xd's avatar
xd committed
51 52 53 54 55 56 57 58
              <el-table
                stripe
                class="list"
                ref="multipleTable table"
                :data="tableData"
                tooltip-effect="dark"
                style="width: 100%"
              >
xd's avatar
xd committed
59 60 61 62 63
                <el-table-column
                  type="index"
                  label="序号"
                  width="60"
                ></el-table-column>
xd's avatar
xd committed
64
                <el-table-column
xd's avatar
xd committed
65
                  prop="name"
xd's avatar
xd committed
66 67 68 69
                  label="柜组名称"
                  align="center"
                ></el-table-column>
                <el-table-column
xd's avatar
xd committed
70
                  prop="signNum"
xd's avatar
xd committed
71 72 73 74
                  label="门牌号"
                  align="center"
                ></el-table-column>
              </el-table>
xd's avatar
xd committed
75
            </div>
xd's avatar
xd committed
76 77 78 79 80 81 82 83
          </el-form>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
xd's avatar
xd committed
84
import { getDetail } from "@/api/in/counter"
xd's avatar
xd committed
85 86
export default {
  props: {
xd's avatar
xd committed
87 88 89
    msgId: {
      type: String,
      default: ''
xd's avatar
xd committed
90 91 92 93
    }
  },
  data() {
    return {
xd's avatar
xd committed
94
      detailDialog: false,
xd's avatar
xd committed
95 96 97 98 99
      formData: {
        name: "",
        code: "",
        people: ""
      },
xd's avatar
xd committed
100
      tableData: [],
xulili's avatar
xulili committed
101 102
      personList: [],
      counter:[]
xd's avatar
xd committed
103 104
    };
  },
xd's avatar
xd committed
105 106 107
  created() {
    this.getDetail()
  },
xd's avatar
xd committed
108
  methods: {
xd's avatar
xd committed
109 110 111 112 113
    getDetail() {
      this.detailDialog = true
      let params = {
        isDetail: true,
        shopId: this.msgId
Z's avatar
Z committed
114 115
      }
      getDetail(params).then(res => {
xd's avatar
xd committed
116 117 118 119
        console.log(res,"详情");
        let data = res.data
        this.formData.name = data.shop.name
        this.formData.code = data.shop.num
xulili's avatar
xulili committed
120
        this.formData.people = data.principal.userName
xd's avatar
xd committed
121
        this.formData.area = data.shop.area
xulili's avatar
xulili committed
122
        this.tableData = data.shop.adminStallList
xd's avatar
xd committed
123 124
      })
    },
Z's avatar
Z committed
125

xd's avatar
xd committed
126 127 128 129 130 131 132 133
    handleClose(done) {
      this.$confirm("确认关闭?")
        .then(_ => {
          this.detailDialog = false;
          his.$emit('handleDetailClose',"false")
        })
        .catch(_ => {});
    },
xd's avatar
xd committed
134 135
  },
  watch:{
xd's avatar
xd committed
136 137
    detailDialog(newValue) {
      // this.getDetail()
xulili's avatar
xulili committed
138

xd's avatar
xd committed
139
    },
xulili's avatar
xulili committed
140

xd's avatar
xd committed
141
  }
xd's avatar
xd committed
142 143
};
</script>
xd's avatar
xd committed
144
<style>
xd's avatar
xd committed
145
</style>
xd's avatar
xd committed
146
<style scoped>
xd's avatar
xd committed
147 148 149
.tb {
  display: flex;
}
xd's avatar
xd committed
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
.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>