storeDetail.vue 5.89 KB
Newer Older
xd's avatar
xd committed
1 2
<template>
  <div class="ct">
Z's avatar
Z committed
3
    <el-dialog :visible.sync="detailDialog" width="65%" :show-close="false">
xd's avatar
xd committed
4 5 6 7 8 9 10 11
      <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">
Z's avatar
Z committed
12
          <el-form class="searchzone" :model="formData" label-width="auto" disabled>
xd's avatar
xd committed
13
            <el-form-item label="门店名称:">
xd's avatar
xd committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
              <el-input
                size="small"
                v-model="formData.name"
                style="width:240px"
                placeholder="请输入门店名称"
              />
            </el-form-item>
            <el-form-item label="门店类型:">
              <el-select
                size="small"
                v-model="formData.type"
                placeholder="请选择门店类型"
                style="width:240px"
              >
                <el-option
                  v-for="item in personList"
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
xd's avatar
xd committed
36
            <el-form-item label="门店负责人:">
xd's avatar
xd committed
37 38
              <el-select
                size="small"
xd's avatar
xd committed
39 40
                v-model="formData.people"
                placeholder="请选择柜组负责人"
xd's avatar
xd committed
41 42 43
                style="width:240px"
              >
                <el-option
xd's avatar
xd committed
44
                  v-for="item in personList"
xd's avatar
xd committed
45 46 47 48 49 50
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
xd's avatar
xd committed
51
            <el-form-item label="所属柜组:">
xd's avatar
xd committed
52 53
              <el-select
                size="small"
xd's avatar
xd committed
54 55
                v-model="formData.counter"
                placeholder="请选择所属柜组"
xd's avatar
xd committed
56 57 58
                style="width:240px"
              >
                <el-option
xd's avatar
xd committed
59
                  v-for="item in counter"
xd's avatar
xd committed
60 61 62 63 64
                  :key="item.id"
                  :label="item.name"
                  :value="item.id"
                ></el-option>
              </el-select>
Z's avatar
Z committed
65
            </el-form-item>
xd's avatar
xd committed
66
            <el-form-item label="位置:">
xd's avatar
xd committed
67 68
              <el-input
                size="small"
xd's avatar
xd committed
69
                v-model="formData.area"
xd's avatar
xd committed
70
                style="width:240px"
xd's avatar
xd committed
71
                placeholder="请输入位置"
xd's avatar
xd committed
72
              />
Z's avatar
Z committed
73
            </el-form-item>
xd's avatar
xd committed
74
            <el-form-item label="门牌号:">
xd's avatar
xd committed
75 76
              <el-input
                size="small"
xd's avatar
xd committed
77
                v-model="formData.number"
xd's avatar
xd committed
78
                style="width:240px"
xd's avatar
xd committed
79
                placeholder="请输入门牌号"
xd's avatar
xd committed
80
              />
Z's avatar
Z committed
81
            </el-form-item>
xd's avatar
xd committed
82
            <div class="tb">
Z's avatar
Z committed
83
              <el-form-item label="绑定店员:"></el-form-item>
xd's avatar
xd committed
84 85 86 87 88 89 90 91
              <el-table
                stripe
                class="list"
                ref="multipleTable table"
                :data="tableData"
                tooltip-effect="dark"
                style="width: 100%"
              >
Z's avatar
Z committed
92 93 94
                <el-table-column type="index" label="序号" width="60"></el-table-column>
                <el-table-column prop="taskName" label="门店名称" align="center"></el-table-column>
                <el-table-column prop="number" label="门牌号" align="center"></el-table-column>
xd's avatar
xd committed
95
              </el-table>
xd's avatar
xd committed
96
            </div>
xd's avatar
xd committed
97 98 99 100 101 102 103 104 105
          </el-form>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
Z's avatar
Z committed
106 107 108 109 110 111 112
  props: {
    msgId: {
      type: String,
      default: ""
    }
  },

xd's avatar
xd committed
113
  data() {
Z's avatar
Z committed
114 115
    const nameValidate = (rule, value, callback) => {
      let reg = /^[a-zA-Z\u4e00-\u9fa5]+$/;
xd's avatar
xd committed
116
      if (!reg.test(value)) {
Z's avatar
Z committed
117 118 119 120 121
        callback(new Error("含有非法字符(只能输入字母、汉字)!"));
      } else {
        callback();
      }
    };
xd's avatar
xd committed
122
    return {
Z's avatar
Z committed
123
      
xd's avatar
xd committed
124 125 126 127 128 129 130 131
      formData: {
        name: "",
        code: "",
        people: "",
        type: "",
        number: "",
        area: ""
      },
Z's avatar
Z committed
132

xd's avatar
xd committed
133 134 135 136 137 138 139 140 141 142
      personList: [
        {
          id: "1",
          name: "张三"
        },
        {
          id: "2",
          name: "李四"
        }
      ],
Z's avatar
Z committed
143

xd's avatar
xd committed
144 145 146 147 148 149 150 151 152 153
      counter: [
        {
          id: "1",
          name: "张三"
        },
        {
          id: "2",
          name: "李四"
        }
      ],
Z's avatar
Z committed
154

xd's avatar
xd committed
155
      tableData: [],
Z's avatar
Z committed
156

xd's avatar
xd committed
157
      detailDialog: false
xd's avatar
xd committed
158 159
    };
  },
Z's avatar
Z committed
160 161 162
  created() {
    this.getDetail();
  },
xd's avatar
xd committed
163
  methods: {
Z's avatar
Z committed
164
    getDetail() {
xd's avatar
xd committed
165
      this.detailDialog = false
Z's avatar
Z committed
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
      // 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.shop.principal
      //   this.formData.area = data.shop.area
      //   this.tableData = data.stall_unselected
      // })
    },

    handleClose() {
      this.detailDialog = false;
xd's avatar
xd committed
183 184 185 186 187 188
    }
  }
};
</script>

<style scoped>
xd's avatar
xd committed
189 190 191
.tb {
  display: flex;
}
xd's avatar
xd committed
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
.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;
  /* border-bottom: 1px solid #f8f8f8; */
  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>