<template>
  <div class="main_box">
    <navbar title="任务详情" special @handleClickLeft="handleGoBefore"></navbar>
    <div class="wrapper">
      <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
      <van-list v-model="loading" :finished="finished" finished-text="没有更多了" :immediate-check="false"
                                @load="onLoad">
      <div v-if="campaignId !== '-1'" class="search-input">
        <van-search
          type="text"
          :left-icon="null"
          v-model="searchValue"
          placeholder="搜索客户证件号/客户名称/客户地址"
          @clear="handleSearch()"
          @search="handleSearch()"
          @keyup.enter.native="handleSearch()"
        />
        <div class="search_btn">
          <van-icon name="search" @click="handleSearch"></van-icon>
        </div>
      </div>
      <van-tabs
        v-model="activeTab"
        type="line"
        color="#4682ff"
        title-active-color="#4682ff"
        @change="handleChangeTab"
      >
        <van-tab :title="campaignId === '-1' ? '未完成' : '未走访'"></van-tab>
        <van-tab :title="campaignId === '-1' ? '已完成' : '已走访'"></van-tab>
      </van-tabs>
      <div v-if="campaignId === '-1'">
        <div v-for="(item, index) in list" :key="index">
          <div v-if="item.custType === '0'" class="item">
            <div class="item_top" @click="handleViewDetail(item)">
              <div class="item_top_left">
                <div
                  :class="
                    item.custGender == '男' ? 'userMan_box' : 'userWoMan_box'
                  "
                >
                  <van-icon name="manager item_user"></van-icon>
                </div>
                <div class="item_name">{{ item.custName }}</div>
              </div>
              <div class="item_viewDetail">查看客户</div>
            </div>
            <div class="item_main">
              <div class="main_item">
                <span class="mian_title">身份证号：</span>{{ item.custIdc }}
              </div>
              <div class="main_item">
                <span class="mian_title">性别：</span>{{ item.custGender }}
              </div>
              <div class="main_item">
                <span class="mian_title">联系方式：</span>{{ item.custPhone }}
              </div>
              <div class="main_item">
                <span class="mian_title">客户内码：</span>{{ item.custId }}
              </div>
              <div class="main_item">
                <span class="mian_title">客户地址：</span>{{ item.address }}
              </div>
            </div>
            <div class="item_footer">
              <div
                class="footer_item"
                v-if="item.signFlag"
                @click="handleSelectWay(item)"
              >
                <img
                  src="../../images/home/qd.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">签到</span>
              </div>
              <div
                class="footer_item"
                v-if="!item.signFlag"
                @click="handleGosignOut(item)"
              >
                <img
                  src="../../images/home/qt.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">签退</span>
              </div>
              <div class="line"></div>
              <div
                class="footer_item"
                v-if="item.recordId != null"
                @click="handleFeedBack(item)"
              >
                <van-icon name="edit" class="edit_icon"></van-icon>走访反馈
              </div>
              <div class="line"></div>
              <div class="footer_item" @click="handleGoHistory(item)">
                <img
                  src="../../images/home/zfls.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">走访历史</span>
              </div>
            </div>
          </div>
          <div
            v-else-if="item.custType == '1' || item.custType == '2'"
            class="item"
          >
            <div class="item_top" @click="handleViewDetail(item)">
              <div class="item_top_left">
                <div class="userMan_box" v-if="custType == '2'">
                  <img src="../../images/part_one/icon_company.png" alt="" />
                </div>
                <div class="icon_box" v-if="custType == '1'">
                  <img
                    src="../../images/home/sh.png"
                    alt=""
                    style="width: 30px; height: 30px"
                  />
                </div>
                <div class="item_name">{{ item.custName }}</div>
              </div>
              <div class="item_viewDetail">查看客户</div>
            </div>
            <div class="item_main">
              <div class="main_item">
                <span class="mian_title">身份证号：</span>{{ item.custIdc }}
              </div>
              <div class="main_item">
                <span class="mian_title">性别：</span>{{ item.custGender }}
              </div>
              <div class="main_item">
                <span class="mian_title">联系方式：</span>{{ item.custPhone }}
              </div>
              <div class="main_item">
                <span class="mian_title">统信码：</span
                >{{ item.socialCreditCode }}
              </div>
              <div class="main_item">
                <span class="mian_title">经营状态：</span
                >{{ initStatus(item.status) }}
              </div>
              <div class="main_item address_box">
                <div class="address">
                  <span class="mian_title">商铺地址：</span>{{ item.address }}
                </div>
                <div class="dwdk" @click="handleDwdk(item)">重新定位</div>
              </div>
            </div>
            <div class="item_footer">
              <div
                class="footer_item"
                v-if="item.signFlag"
                @click="handleSelectWay(item)"
              >
                <img
                  src="../../images/home/qd.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">签到</span>
              </div>
              <div
                class="footer_item"
                v-if="!item.signFlag"
                @click="handleGosignOut(item)"
              >
                <img
                  src="../../images/home/qt.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">签退</span>
              </div>
              <div class="line"></div>
              <div
                class="footer_item"
                v-if="item.recordId != null"
                @click="handleFeedBack(item)"
              >
                <van-icon name="edit" class="edit_icon"></van-icon>走访反馈
              </div>
              <div class="line"></div>
              <div class="footer_item" @click="handleGoHistory(item)">
                <img
                  src="../../images/home/zfls.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">走访历史</span>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div v-else>
        <div v-if="custType == '0'">
          <div class="item" v-for="(item, index) in list" :key="index">
            <div class="item_top" @click="handleViewDetail(item)">
              <div class="item_top_left">
                <div
                  :class="
                    item.custGender == '男' ? 'userMan_box' : 'userWoMan_box'
                  "
                >
                  <van-icon name="manager item_user"></van-icon>
                </div>
                <div class="item_name">{{ item.custName }}</div>
              </div>
              <div class="item_viewDetail">查看客户</div>
            </div>
            <div class="item_main">
              <div class="main_item">
                <span class="mian_title">身份证号：</span>{{ item.custIdc }}
              </div>
              <div class="main_item">
                <span class="mian_title">性别：</span>{{ item.custGender }}
              </div>
              <div class="main_item">
                <span class="mian_title">联系方式：</span>{{ item.custPhone }}
              </div>
              <div class="main_item">
                <span class="mian_title">客户内码：</span>{{ item.custId }}
              </div>
              <div class="main_item">
                <span class="mian_title">客户地址：</span>{{ item.address }}
              </div>
            </div>
            <div class="item_footer">
              <div
                class="footer_item"
                v-if="item.signFlag"
                @click="handleSelectWay(item)"
              >
                <img
                  src="../../images/home/qd.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">签到</span>
              </div>
              <div
                class="footer_item"
                v-if="!item.signFlag"
                @click="handleGosignOut(item)"
              >
                <img
                  src="../../images/home/qt.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">签退</span>
              </div>
              <div class="line"></div>
              <div
                class="footer_item"
                v-if="item.recordId != null"
                @click="handleFeedBack(item)"
              >
                <van-icon name="edit" class="edit_icon"></van-icon>走访反馈
              </div>
              <div class="line"></div>
              <div class="footer_item" @click="handleGoHistory(item)">
                <img
                  src="../../images/home/zfls.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">走访历史</span>
              </div>
            </div>
          </div>
        </div>
        <div v-if="custType == '1' || custType == '2'">
          <div class="item" v-for="(item, index) in list" :key="index">
            <div class="item_top" @click="handleViewDetail(item)">
              <div class="item_top_left">
                <div class="userMan_box" v-if="custType == '2'">
                  <img src="../../images/part_one/icon_company.png" alt="" />
                </div>
                <div class="icon_box" v-if="custType == '1'">
                  <img
                    src="../../images/home/sh.png"
                    alt=""
                    style="width: 30px; height: 30px"
                  />
                </div>
                <div class="item_name">{{ item.custName }}</div>
              </div>
              <div class="item_viewDetail">查看客户</div>
            </div>
            <div class="item_main">
              <div class="main_item">
                <span class="mian_title">身份证号：</span>{{ item.custIdc }}
              </div>
              <div class="main_item">
                <span class="mian_title">性别：</span>{{ item.custGender }}
              </div>
              <div class="main_item">
                <span class="mian_title">联系方式：</span>{{ item.custPhone }}
              </div>
              <div class="main_item">
                <span class="mian_title">统信码：</span
                >{{ item.socialCreditCode }}
              </div>
              <div class="main_item">
                <span class="mian_title">经营状态：</span
                >{{ initStatus(item.status) }}
              </div>
              <div class="main_item address_box">
                <div class="address">
                  <span class="mian_title">商铺地址：</span>{{ item.address }}
                </div>
                <div class="dwdk" @click="handleDwdk(item)">重新定位</div>
              </div>
            </div>
            <div class="item_footer">
              <div
                class="footer_item"
                v-if="item.signFlag"
                @click="handleSelectWay(item)"
              >
                <img
                  src="../../images/home/qd.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">签到</span>
              </div>
              <div
                class="footer_item"
                v-if="!item.signFlag"
                @click="handleGosignOut(item)"
              >
                <img
                  src="../../images/home/qt.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">签退</span>
              </div>
              <div class="line"></div>
              <div
                class="footer_item"
                v-if="item.recordId != null"
                @click="handleFeedBack(item)"
              >
                <van-icon name="edit" class="edit_icon"></van-icon>走访反馈
              </div>
              <div class="line"></div>
              <div class="footer_item" @click="handleGoHistory(item)">
                <img
                  src="../../images/home/zfls.png"
                  alt=""
                  style="width: 20px; height: 20px"
                />
                <span class="footer_title">走访历史</span>
              </div>
            </div>
          </div>
        </div>
      </div>
      </van-list>
      </van-pull-refresh>
    </div>
    <van-dialog
      v-model="show"
      title="客户位置定位打卡"
      :show-confirm-button="false"
    >
      <div class="top">
        <div class="userMan_box">
          <img src="../../images/part_one/icon_company.png" alt="" />
        </div>
        <div class="top_name">{{ dkInfo.custName }}</div>
      </div>
      <div class="adress">{{ dkInfo.address }}</div>
      <div class="adress">
        {{ `经度：${location.lng}, 纬度：${location.lat}` }}
      </div>
      <div class="cxdw" @click="handleCxdw">重新定位获取当前地址</div>
      <div class="dialog_main">
        <div class="item_title">省份</div>
        <van-field
          v-model="addressForm.sf"
          is-link
          readonly
          placeholder="请选择"
        ></van-field>

        <div class="item_title">市</div>
        <van-field
          v-model="addressForm.city"
          is-link
          readonly
          placeholder="请选择"
          @click="showCityPicker = true"
        ></van-field>
        <van-popup
          v-model="showCityPicker"
          position="bottom"
          :style="{ height: '40%' }"
        >
          <van-picker
            show-toolbar
            :columns="cityList"
            :value-key="'label'"
            @cancle="showCityPicker = false"
            @confirm="onCityConfirm"
            @cancel="cancelCity"
          ></van-picker>
        </van-popup>
        <div class="item_title">区县</div>
        <van-field
          v-model="addressForm.xian"
          is-link
          readonly
          placeholder="请选择"
          @click="showXianPicker = true"
        ></van-field>
        <van-popup
          v-model="showXianPicker"
          position="bottom"
          :style="{ height: '40%' }"
        >
          <van-picker
            show-toolbar
            :columns="xianList"
            :value-key="'label'"
            @cancle="showXianPicker = false"
            @confirm="onXianConfirm"
            @cancel="cancelXian"
          ></van-picker>
        </van-popup>
        <div class="item_title">详细地址</div>
        <van-field
          v-model="addressForm.detail"
          name="detail"
          placeholder="请输入"
          type="textarea"
        ></van-field>
        <div class="footer_btn">
          <div class="gb" @click="handleCancle">关闭</div>
          <div class="save" @click="handleSave">保存</div>
        </div>
      </div>
    </van-dialog>
    <van-dialog 
      v-model="signInWayVisible"
      title="签到方式选择"
      message="请选择签到方式"
      confirm-button-text="实地走访"
      cancel-button-text="非实地走访"
      show-cancel-button
      style="width: 320px; border-radius: 16px; font-size: 16px"
      @cancel="handleGONonOnSitesignIn()"
      @confirm="handleGOsignIn()" />
  </div>
</template>
<script>
import navbar from "../../components/navbar/navbar.vue";
import {
  getTargetList,
  addAddress,
  getApponitmentList,
} from "@/service/api/visiting";
import { getRegStatus } from "@/service/api/custome";
import { getIndicator } from "@/service/api/dzTree";
import { translateLocApi } from "@/service/api/myGrid.js";
import {
  Tab,
  Tabs,
  Icon,
  Button,
  Search,
  List,
  PullRefresh,
  Field,
  Toast,
  Picker,
  Dialog
} from "vant";
export default {
  data() {
    return {
      activeTab: 0,
      searchValue: "",
      campaignId: "",
      custType: "",

      list: [],

      currentPage: 1,
      statusList: [],
      show: false,
      addressForm: {
        sf: "浙江省",
        city: "",
        xian: "",
        detail: "",
      },
      showCityPicker: false,
      cityList: [],
      showXianPicker: false,
      xianList: [],
      dkInfo: {
        custName: "",
        custId: "",
        address: "",
      },
      location: {
        lat: 30.248307,
        lng: 120.25551,
      },
      refreshing: false,
      loading: false,
      finished: false,
      pageSize: 10,
      pageNum: 1,
      signInWayVisible: false,
      tempRow: null
    };
  },
  components: {
    navbar: navbar,
    VanTab: Tab,
    VanTabs: Tabs,
    VanIcon: Icon,
    VanButton: Button,
    VanSearch: Search,
    VanList: List,
    VanPullRefresh: PullRefresh,
    VanField: Field,
    VanPicker: Picker,
    VanToast: Toast,
  },
  created() {
    this.campaignId = sessionStorage.getItem("campaignId");
    this.custType = sessionStorage.getItem("custType");
    this.onRefresh();
    this.initRegStatus();
  },
  mounted() {},
  methods: {
    //下拉刷新
    onRefresh() {
      this.list = [];
      this.finished = false; //解除上拉加载之后数据不能再次上拉
      this.currentPage = 1;
      this.pageNum = this.currentPage;
      this.initList();
    },
    //上拉加载
    onLoad() {
      this.pageNum = this.currentPage + "";
      this.initList();
    },
    async initList() {
      const loading=Toast.loading({
        duration:0,
        forbidClick:true,
        message:"加载中..."
      })
      const params = {
        custType: this.custType,
        campaignId: this.campaignId,
        custId: this.searchValue,
        finishFlag: this.activeTab === 0 ? false : true,
        pageSize: this.pageSize,
        pageNum: this.pageNum,
        size: this.pageSize,
        num: this.pageNum,
      };
      const Api = this.campaignId === "-1" ? getApponitmentList : getTargetList;
      const res = await Api(params);
      loading.clear();
      if (res.code == 200) {
        if (this.refreshing) {
          this.refreshing = false;
        }
        this.loading = false;
        if (res.rows) {
          this.list = params.pageNum == "1" ? res.rows : [...this.list, ...res.rows];
          if (res.rows.length < params.pageSize) {
              this.finished = true;
          }
          this.currentPage=Number(params.pageNum)+1;
        } else {
          this.finished = true;
        }
      }
    },
    handleChangeTab() {
      this.onRefresh();
    },
    handleGoBefore() {
      this.$router.push("/visitingTaskHome");
    },
    handleSearch() {
      this.onRefresh();
    },
    handleViewDetail(item) {
      sessionStorage.setItem("custId", item.custId);
      if (this.custType == "0") {
        this.$router.push("/customePersonDetail");
      } else if (this.custType == "1") {
        this.$router.push("/customeCommercialDetail");
      } else if (this.custType == "2") {
        this.$router.push("/customerFirmDetails");
      }
    },
    initRegStatus() {
      getRegStatus().then((res) => {
        if (res.code == 200) {
          this.statusList = res.data.map((item) => {
            return {
              label: item.dictLabel,
              value: item.dictValue,
            };
          });
        }
      });
    },
    initStatus(data) {
      let arr = this.statusList.filter((item) => item.value === data);
      if (arr && arr.length > 0) {
        return arr[0].label;
      }
    },
    handleSelectWay(item) {
      this.tempRow = item
      sessionStorage.setItem("custId", item.custId);
      console.log(JSON.parse(sessionStorage.getItem('userInfo')).userName.substring(0, 3))
      if (JSON.parse(sessionStorage.getItem('userInfo')).userName.substring(0, 3) === '932') {
        this.signInWayVisible = true
      } else {
        this.handleGOsignIn()
      }
    },
    handleGOsignIn() {
      sessionStorage.setItem("baseInfo", JSON.stringify(this.tempRow));
      this.$router.push("/signIn");
    },
    handleGONonOnSitesignIn() {
      sessionStorage.setItem("baseInfo", JSON.stringify(this.tempRow));
      this.$router.push("/nonOnSiteSignIn");
    },
    handleGosignOut(item) {
      sessionStorage.setItem("baseInfo", JSON.stringify(item));
      this.$router.push("/signOut");
    },
    handleGoHistory(item) {
      sessionStorage.setItem("baseInfo", JSON.stringify(item));
      this.$router.push("/visitingHistory");
    },
    handleFeedBack(item) {
      sessionStorage.setItem("custId", item.custId);
      if (item.feedbackType === "2") {
        sessionStorage.setItem("baseInfo", JSON.stringify(item));
        this.$router.push({
          path: "/customVisit",
          query: {
            feedbackId: item.feedbackId,
            feedbackTemplateId: item.feedbackTemplateId,
            recordId: item.recordId,
          },
        });
      } else {
        let visitType = sessionStorage.getItem("visitType");
        //预约走访任务特殊处理
        if(this.campaignId == "-1"){
          if(item.custType == 0){
            visitType="个人走访"
          }else{
            visitType="商户走访"
          }
        }
        sessionStorage.setItem("baseInfo", JSON.stringify(item));
        if (visitType == "催收走访") {
          this.$router.push("/collectionVisit");
        } else if (visitType == "个人走访") {
          this.$router.push("/personalVisit");
        } else if (
          visitType == "商户走访" ||
          visitType == "域外商会走访" ||
          visitType == "收单商户走访" ||
          visitType == "企业走访"
        ) {
          this.$router.push("/firmVisit");
        }
      }
    },
    handleDwdk(item) {
      let that = this;
      if (window.wx) {
        wx.ready(() => {
          wx.getLocation({
            type: "gcj02",
            success: (res) => {
              that.translateLocation({
                lat: res.latitude,
                lng: res.longitude,
              });
            },
            fail: (err) => {
              console.error("错误码：", err);
            },
          });
        });
      } else {
        this.initMap();
      }
      this.dkInfo.custName = item.custName;
      this.dkInfo.address = item.address;
      this.dkInfo.custId = item.custId;
      this.show = true;
      this.initCity();
    },
    handleCxdw() {
      let that = this;
      wx.ready(() => {
        wx.getLocation({
          type: "gcj02",
          success: (res) => {
            that.translateLocation({
              lat: res.latitude,
              lng: res.longitude,
            });
          },
          fail: (err) => {
            console.error("错误码：", err);
          },
        });
      });
    },
    async translateLocation(params) {
      const res = await translateLocApi(params);
      if (res.code == 200) {
        this.location = {
          lat: res?.data[1],
          lng: res?.data[0],
        };
        this.initMap();
      }
    },
    // 初始化地图
    initMap() {
      console.log(1111);
      let myGeo = new BMapGL.Geocoder();
      myGeo.getLocation(
        new BMapGL.Point(this.location.lng, this.location.lat),
        (res) => {
          if (res) {
            console.log(res, "resresresresres");
            this.addressForm.city = res.addressComponents.city;
            this.addressForm.xian = res.addressComponents.district;
            this.addressForm.detail = res.addressComponents.street;
          }
        }
      );
      this.mapLoading = false;
    },
    initCity() {
      const query = {
        level: "1",
        code: 33,
      };
      getIndicator(query).then((res) => {
        if (res.code == 200) {
          this.cityList = res.data.map((item) => {
            return {
              label: item.label,
              value: item.value,
            };
          });
        }
      });
    },
    initXian(value) {
      const query = {
        level: "2",
        code: value,
      };
      getIndicator(query).then((res) => {
        if (res.code == 200) {
          this.xianList = res.data.map((item) => {
            return {
              label: item.label,
              value: item.value,
            };
          });
        }
      });
    },
    onCityConfirm(value) {
      this.addressForm.city = value.label;
      this.showCityPicker = false;
      this.initXian(value.value);
    },
    cancelCity() {
      this.showCityPicker = false;
      this.addressForm.city = "";
    },
    onXianConfirm(value) {
      this.addressForm.xian = value.label;
      this.showXianPicker = false;
    },
    cancelXian() {
      this.showXianPicker = false;
      this.addressForm.xian = "";
    },
    handleCancle() {
      this.show = false;
      this.addressForm.city = "";
      this.addressForm.xian = "";
      this.addressForm.detail = "";
    },
    handleSave() {
      const params = {
        city: this.addressForm.city,
        county: this.addressForm.xian,
        custId: this.dkInfo.custId,
        detailAddress: this.addressForm.detail,
        province: this.addressForm.sf,
        lat: this.location.lat,
        lng: this.location.lng,
      };
      addAddress(params).then((res) => {
        if (res.code == 200) {
          this.show = false;
          Toast.success(res.msg);
          this.initList();
        }
      });
    },
  },
};
</script>
<style lang="less" scoped>
.wrapper {
  padding-top: 46px;
  min-height: 100vh;
  font-size: 16px;
  padding-bottom: 60px;
}

.search-input {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 12px;
  background: #fff;
}

.search_btn {
  background-color: rgb(24, 144, 255);
  border-radius: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  color: #fff;
  font-size: 20px;
}

/deep/ .van-search {
  width: 100%;
  padding: 5px 8px;
}

.item {
  margin: 10px 0;
  background-color: #fff;
  padding: 15px 20px 0 20px;
}

.item_top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.item_top_left {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 70%;
}

.item_name {
  font-size: 18px;
  font-weight: 600;
  margin-left: 10px;
  display: flex;
  flex-wrap: wrap;
  word-break: break-all;
}

.item_viewDetail_one {
  background-color: rgba(255, 248, 240);
  color: rgb(233, 157, 66);
  padding: 10px 0;
  border-radius: 5px;
  width: 30%;
  text-align: center;
}

.item_viewDetail {
  background-color: rgba(233, 241, 253);
  color: rgb(35, 114, 235);
  padding: 10px 0;
  border-radius: 5px;
  width: 30%;
  margin-left: 5px;
  text-align: center;
}

.item_main {
  margin-top: 10px;
}

.main_item {
  font-size: 16px;
  line-height: 25px;
  word-break: break-all;
}

.mian_title {
  color: rgb(140, 140, 140);
}

.item_user {
  font-size: 25px;
  color: #fff;
}

.userMan_box {
  background-color: rgb(35, 114, 235);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 5px;
}

.userWoMan_box {
  background-color: rgb(252, 123, 80);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 5px;
}

.item_footer {
  display: flex;
  margin-top: 15px;
  justify-content: space-between;
  line-height: 60px;
  border-top: 1px solid rgb(242, 243, 245);
}

.footer_item {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.line {
  background-color: rgb(218, 220, 224);
  width: 1px;
  margin: 10px 0;
}

.edit_icon {
  color: rgb(22, 132, 252);
  margin-right: 10px;
  font-size: 20px;
}

.footer_title {
  margin-left: 10px;
}

.address_box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dwdk {
  color: rgb(35, 114, 235);
  width: 22%;
}

.address {
  width: 75%;
  white-space: normal;
}

.top {
  display: flex;
  background-color: #fff;
  align-items: center;
  padding: 15px;
}

.top_name {
  font-size: 16px;
  font-weight: 600;
  margin-left: 10px;
}

/deep/ .van-dialog {
  width: 100%;
  border-radius: 0;
}

.adress {
  margin-left: 30px;
  font-size: 12px;
}

.cxdw {
  margin-left: 30px;
  font-size: 12px;
  margin-top: 20px;
  color: rgb(35, 114, 235);
}

.dialog_main {
  padding: 15px;

  /deep/ .van-cell {
    background-color: rgba(140, 140, 140, 0.1);
  }

  .item_title {
    margin: 15px 0 10px 0;
  }

  /deep/ .van-button {
    display: none;
  }
}

.footer_btn {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
}

.gb {
  width: 43%;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(140, 140, 140, 0.5);
}

.save {
  width: 43%;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(140, 140, 140, 0.5);
  background-color: rgb(35, 114, 235);
  color: #fff;
}
.navb {
  background-color: #fff;
  display: flex;
  line-height: 46px;
  padding-left: 16px;
}

.navLeft {
  color: #1989fa;
  width: 40%;
}

.mobile-confirm {
  position: fixed !important;
  top: 50% !important;
  left:50% !important;
  transform: translate(-50%, -50%) !important;
  width: 85% !important;
  max-width: 340px !important;
  border-radius: 12px !important;
  margin: 0 !important;
}
</style>
