<template>
  <div style="padding: 0 20px">
    <div ref="lxHeader">
      <lx-header icon="md-apps" text="门店管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
        <div slot="content"></div>
        <slot>
          <div>
            <Input style="width: 200px; margin-right: 10px" placeholder="关键字搜索" />
            <Button type="primary">查询</Button>
            <Button type="primary" style="margin-left: 10px">新增门店</Button>
          </div>
        </slot>
      </lx-header>
    </div>

    <my-table :list="list" :table-item="tableItem"></my-table>

    <div style="display: flex;justify-content: flex-end;">
      <Page :total="5" show-elevator />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list:JSON.parse('{"total":39,"rows":[{"id":1,"merchant_id":1,"name":"\u6717\u4e1a\u7f51\u7edc","address":"\u7af9\u56ed\u8def209\u53f7","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-07-25T01:23:41.000000Z","updated_at":"2021-07-25T01:23:41.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":1,"username":"\u6717\u4e1a\u7f51\u7edc","name":"\u82cf\u5dde\u6717\u4e1a\u7f51\u7edc\u79d1\u6280\u6709\u9650\u516c\u53f8","logo_id":null,"address":"\u82cf\u5dde\u7af9\u56ed\u8def209\u53f7","slogan":null,"site_id":null,"boss":"\u738b\u6e05\u840d","boss_phone":"13306201077","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","certificate_id":null,"state":"active","created_at":"2021-07-25T01:23:41.000000Z","updated_at":"2022-01-09T07:40:07.000000Z","deleted_at":null,"business_number":"91320506690278148Y","balance":"0.00","lng":null,"lat":null}},{"id":2,"merchant_id":2,"name":"\u5143\u548c\u521d\u5fc3","address":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-08-30T03:03:59.000000Z","updated_at":"2021-08-30T03:03:59.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":2,"username":"\u5143\u548c\u521d\u5fc3","name":"KINGBABY\uff08\u5143\u548c\u521d\u5fc3\uff09","logo_id":null,"address":"\u76f8\u57ce\u533a\u7e41\u82b1\u4e2d\u5fc3\u5546\u573a\u8d1f\u4e00\u5c42KINGBABY","slogan":null,"site_id":null,"boss":"\u65e0","boss_phone":"\u65e0","contact":"YOYO","phone":"13913175422","certificate_id":null,"state":"active","created_at":"2021-08-30T03:03:59.000000Z","updated_at":"2022-06-17T09:32:22.000000Z","deleted_at":null,"business_number":"\u65e0","balance":"3376.20","lng":null,"lat":null}},{"id":3,"merchant_id":3,"name":"\u5e78\u5b55\u7eaa","address":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-08-30T03:05:32.000000Z","updated_at":"2021-08-30T03:05:32.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":3,"username":"\u5e78\u5b55\u7eaa","name":"\u5e78\u5b55\u7eaa","logo_id":null,"address":"\u59d1\u82cf\u533a\\/\u65b0\u533a\\/\u56ed\u533a","slogan":null,"site_id":null,"boss":"\u65e0","boss_phone":"\u65e0","contact":"\u5ba2\u670d","phone":"18616951428","certificate_id":null,"state":"active","created_at":"2021-08-30T03:05:31.000000Z","updated_at":"2022-07-10T07:34:24.000000Z","deleted_at":null,"business_number":"\u65e0","balance":"-1500.00","lng":"120.620095","lat":"31.300602"}},{"id":4,"merchant_id":4,"name":"\u4f0a\u7d22","address":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-08-30T03:06:17.000000Z","updated_at":"2021-08-30T03:06:17.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":4,"username":"\u4f0a\u7d22","name":"\u82cf\u5dde\u5e02\u4f0a\u7d22\u6587\u5316\u4f20\u64ad\u6709\u9650\u516c\u53f8","logo_id":null,"address":"\u65b0\u533a\\/\u56ed\u533a\\/\u65b0\u751f\u513f\u4e0a\u95e8","slogan":null,"site_id":null,"boss":"\u6881\u542f\u6d77","boss_phone":"13913567424","contact":"\u5b59\u840d","phone":"19962192327","certificate_id":null,"state":"active","created_at":"2021-08-30T03:06:17.000000Z","updated_at":"2022-07-10T08:52:40.000000Z","deleted_at":null,"business_number":"91320508094081197J","balance":"2070.00","lng":"120.61648","lat":"31.31036"}},{"id":5,"merchant_id":5,"name":"\u661f\u53d4\u53d4","address":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-08-30T03:07:28.000000Z","updated_at":"2021-08-30T03:07:28.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":5,"username":"\u661f\u53d4\u53d4","name":"\u661f\u53d4\u53d4","logo_id":null,"address":"\u82cf\u5dde\u4e1c\u5434\u5317\u8def288\u53f7","slogan":null,"site_id":null,"boss":"\u66f9\u5f90\u6d2a","boss_phone":"\u65e0","contact":"\u66fc\u66fc","phone":"18930820580","certificate_id":null,"state":"active","created_at":"2021-08-30T03:07:28.000000Z","updated_at":"2022-07-02T06:02:50.000000Z","deleted_at":null,"business_number":"\u65e0","balance":"1300.00","lng":"120.62723","lat":"31.27856"}},{"id":6,"merchant_id":6,"name":"\u963f\u6ce2\u7f57","address":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-08-30T03:08:19.000000Z","updated_at":"2021-08-30T03:08:19.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":6,"username":"\u963f\u6ce2\u7f57","name":"\u963f\u6ce2\u7f57","logo_id":null,"address":"\u82cf\u5dde\u5e02\u517b\u80b2\u5df7415\u53f7\u521b\u5143\u5a5a\u5e86\u56ed9\u53f7\u697c1\u5c42,\u5b55\u5987\u7167\u65b0\u533a\u7eff\u5b9d\uff0c\u56ed\u533a\u6c38\u65fa\\/\u5b9d\u5b9d\u7167\u65b0\u533a\u7eff\u5b9d\uff0c\u65b0\u533a\u6c38\u65fa\uff0c\u56ed\u533a\u666f\u57ce\u5e97","slogan":null,"site_id":null,"boss":"\u65e0","boss_phone":"\u65e0","contact":"\u963f\u626c","phone":"15062300561","certificate_id":null,"state":"active","created_at":"2021-08-30T03:08:18.000000Z","updated_at":"2022-07-02T11:37:04.000000Z","deleted_at":null,"business_number":"\u65e0","balance":"2680.00","lng":"120.57186","lat":"31.29579"}},{"id":7,"merchant_id":7,"name":"\u82b3\u59ae\u8c46\u4e01","address":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-08-30T03:09:32.000000Z","updated_at":"2021-08-30T03:09:32.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":7,"username":"\u82b3\u59ae\u8c46\u4e01","name":"\u82b3\u59ae\u8c46\u4e01\uff08\u7f8e\u8587\u513f\uff09","logo_id":null,"address":"\u4e0a\u95e8\u62cd\u6444","slogan":null,"site_id":null,"boss":"\u65e0","boss_phone":"\u65e0","contact":"\u6797\u6797","phone":"15724862376","certificate_id":null,"state":"active","created_at":"2021-08-30T03:09:32.000000Z","updated_at":"2022-07-08T09:13:42.000000Z","deleted_at":null,"business_number":"92320594MA25AF430U","balance":"3550.00","lng":"120.6698","lat":"31.26647"}},{"id":8,"merchant_id":8,"name":"\u559c\u4e4b\u5bb6","address":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-08-30T03:11:16.000000Z","updated_at":"2021-08-30T03:11:16.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":8,"username":"\u559c\u4e4b\u5bb6","name":"\u559c\u4e4b\u5bb6","logo_id":null,"address":"\u65e0","slogan":null,"site_id":null,"boss":"\u65e0","boss_phone":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","certificate_id":null,"state":"active","created_at":"2021-08-30T03:11:16.000000Z","updated_at":"2021-08-30T03:11:16.000000Z","deleted_at":null,"business_number":"\u65e0","balance":"0.00","lng":null,"lat":null}},{"id":9,"merchant_id":9,"name":"\u7231\u7684\u679c\u5b9e","address":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-08-30T03:12:11.000000Z","updated_at":"2021-08-30T03:12:11.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":9,"username":"\u7231\u7684\u679c\u5b9e","name":"\u7231\u7684\u679c\u5b9e","logo_id":null,"address":"\u65e0","slogan":null,"site_id":null,"boss":"\u65e0","boss_phone":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","certificate_id":null,"state":"active","created_at":"2021-08-30T03:12:11.000000Z","updated_at":"2021-08-30T03:12:11.000000Z","deleted_at":null,"business_number":"\u65e0","balance":"0.00","lng":null,"lat":null}},{"id":10,"merchant_id":10,"name":"\u597d\u5b55\u5988\u5988","address":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","state":"active","created_at":"2021-08-30T03:12:49.000000Z","updated_at":"2021-08-30T03:12:49.000000Z","deleted_at":null,"is_default":1,"merchant":{"id":10,"username":"\u597d\u5b55\u5988\u5988","name":"\u597d\u5b55\u5988\u5988","logo_id":null,"address":"\u65e0","slogan":null,"site_id":null,"boss":"\u65e0","boss_phone":"\u65e0","contact":"\u5b8b\u536b\u5b97","phone":"18962113007","certificate_id":null,"state":"active","created_at":"2021-08-30T03:12:48.000000Z","updated_at":"2021-08-30T03:12:48.000000Z","deleted_at":null,"business_number":"\u65e0","balance":"0.00","lng":null,"lat":null}}]}').rows,
      tableItem:[
        {
          prop:'name',
          label:'名称/用户名',
          width:120
        },
        {
          prop:'merchant.name',
          label:'所属商户',
          width:200
        },
        {
          prop:'address',
          label:'地址',
          width: 190
        },
        {
          prop:'contact',
          label:'联系人',
          width: 100
        },
        {
          prop:'phone',
          label:'联系电话',
          width: 140
        },
        {
          prop:'state',
          label:'状态'
        },
        {
          label:'是否为主营门店',
          prop:'is_default',
          width: 145,
          formatter:(row, column, cellValue, index)=>{
            if(cellValue){
              return '是'
            }else{
              return '否'
            }
          }
        }
      ]
    }
  },
  methods: {}

}
</script>

<style scoped lang="scss">
</style>
