<template>
  <div class="addintention">
    <div class="form">
      <uni-forms ref="baseForm" label-width="100%">
        <uni-forms-item label="项目/企业名称:">
          <!--					<uni-easyinput v-model="form.name" placeholder="请输入"/>-->
          <input
            style="
              border: 1px solid #dcdfe6;
              border-radius: 4px;
              padding: 9px 5px;
            "
            @input="getInputValue('projectName', $event)"
            placeholder="请输入"
          />
        </uni-forms-item>
        <uni-forms-item label="项目简介：">
          <uni-easyinput
            type="textarea"
            class="bgcF9F9F9 height218rpx"
            v-model="form.projectInfo"
            placeholder="请输入"
          />
        </uni-forms-item>
        <uni-forms-item label="企业需求：">
          <uni-easyinput
            type="textarea"
            class="bgcF9F9F9 height218rpx"
            v-model="form.companyNeed"
            placeholder="请输入"
          />
        </uni-forms-item>
        <uni-forms-item label="项目/企业联系人：">
          <uni-easyinput v-model="form.projectManager" placeholder="请输入" />
        </uni-forms-item>
        <uni-forms-item label="联系电话：">
          <input
            style="
              border: 1px solid #dcdfe6;
              border-radius: 4px;
              padding: 9px 5px;
            "
            :value="managerPhone"
            @input="getNum"
            placeholder="请输入"
          />
        </uni-forms-item>
      </uni-forms>
    </div>

    <div class="form">
      <uni-forms ref="baseForm" :modelValue="form" label-width="100%">
        <uni-forms-item label="招商负责人：">
          <picker @change="getUser" range-key="truename" :range="userList">
            <div class="userbox">
              {{ form.createrName }}
            </div>
          </picker>
        </uni-forms-item>
        <uni-forms-item label="所在部门：">
          <div class="userbox">
            {{ form.deptName }}
          </div>
        </uni-forms-item>
      </uni-forms>
    </div>
    <div class="list">
      <div class="project-column pdt32 pdl32 pdr32 border_bottom_ccc">
        <div
          class="pdb16 height50rpx chuzuborder lh50rpx disflex align_items_center"
        >
          <div class="lh50rpx">关联房源</div>
          <van-icon
            name="add"
            class="ml16"
            size="50rpx"
            color="#2527AA"
            @click="jumpChosseHouse('房源')"
          />
        </div>
      </div>
      <div
        class="list-row"
        v-if="fangyuanList.length != 0"
        v-for="(item, index) in fangyuanList"
        :key="item.id"
      >
        <div class="cell_1">
          <div class="width100 height50rpx mgb20">
            <div class="first_title float_left">
              {{ item.roomString }}
            </div>
          </div>
          <div class="width100 height40rpx">
            <div class="second_title height40rpx">预约日期：{{ today }}</div>
          </div>
          <div class="width100 height40rpx">
            <div
              class="second_title height40rpx"
              v-if="item.reservationStatus == 7"
            >
              状态：解锁
            </div>

            <div
              class="second_title height40rpx"
              v-if="item.reservationStatus == 2"
            >
              状态：锁定
            </div>
          </div>

          <div class="width100 height40rpx">
            <div
              class="second_title height40rpx"
              style="display: flex; align-items: center"
            >
              <picker
                @change="getNeedDays($event, index)"
                :range="needDaysList"
                range-key="text"
              >
                锁定到期日期：{{
                  item.needDaysIndex == 0 || item.needDaysIndex
                    ? needDaysList[item.needDaysIndex].text
                    : "请选择"
                }}
              </picker>
            </div>
          </div>
          <div class="width100 height40rpx pdb16 border_bottom_ccc">
            <div class="second_title height40rpx">
              解锁日期：{{ item.endTime ? item.endTime : "" }}
            </div>
          </div>
          <div class="button_list pdb20 pdt20">
            <div class="bottom_cell">
              <div
                class="button_row"
                @click="fangyuanListSplice(index)"
                v-if="item.reservationStatus != 7"
              >
                解锁
              </div>
              <div
                class="disable-btn"
                @click="fangyuanListSplice(index)"
                v-if="item.reservationStatus == 7"
              >
                解锁
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="form" style="padding-bottom: 192rpx">
      <uni-forms ref="baseForm" :modelValue="form" label-width="100%">
        <!-- <uni-forms-item
          label="签约日期："
          required
          v-if="form.projectStatus == 3"
        >
          <uni-datetime-picker
            type="date"
            :clear-icon="false"
            v-model="form.successTime"
          />
        </uni-forms-item>
        <uni-forms-item
          label="签约载体："
          required
          v-if="form.projectStatus == 3"
        >
          <van-icon
            @click="jumpChosseHouse('载体')"
            name="add"
            class="marginl8"
            size="40rpx"
            color="#2527AA"
            style="position: absolute; top: -28px; left: 68px"
          />
          <div class="zaiti_list">
            <div
              v-for="(item, index) in zaitiList"
              :key="index"
              style="display: flex"
            >
              <div class="pdb8 zaiti ml16 float_left">
                {{ item.roomString }}#
              </div>
              <van-icon
                class="ml8 float_left"
                name="clear"
                size="50rpx"
                color="#777777"
                @click="zaitiListSplice(index)"
              />
            </div>
          </div>
        </uni-forms-item> -->
        <uni-forms-item label="其它附件" :deletable="true">
          <van-button
            type="primary"
            size="small"
            @click="choosePDf()"
            style="margin-bottom: 15rpx"
            >文件选择</van-button
          >
          <div class="pdflist">
            <div
              class="pdflist-row"
              v-for="(item, index) in fileList"
              :key="item.url"
            >
              <div class="pdfname">{{ item.name }}</div>
              <van-icon
                name="clear"
                class="delete_icon"
                @click="uploadAddressExcelSplice(index)"
              />
            </div>
          </div>
        </uni-forms-item>
      </uni-forms>
    </div>
    <tki-tree
      ref="tkitreerefs"
      :multiple="true"
      :range="range"
      :selectParent="true"
      :foldAll="true"
      rangeKey="name"
      idKey="id"
      @confirm="userSelectorConfirm"
    />
    <select-dengjiyuan
      ref="selectDengjiyuan"
      :multiple="false"
      :range="range"
      :selectParent="false"
      :foldAll="true"
      rangeKey="name"
      idKey="id"
      @selectDengjiyuan="selectDengjiyuan"
    >
    </select-dengjiyuan>
    <select-dengjiren
      ref="selectXiangmanger"
      :multiple="true"
      :range="range"
      :selectParent="true"
      :foldAll="true"
      rangeKey="name"
      idKey="id"
      @xiangmudengji="xiangmudengji"
    >
    </select-dengjiren>
    <select-genzongdep
      ref="selectGenzongDep"
      :multiple="false"
      :range="range"
      :selectParent="false"
      :foldAll="true"
      rangeKey="name"
      idKey="id"
      @selectGenzongDep="selectGenzongDep"
    />
    <select-xiangguandep
      ref="selectXiangguanDep"
      :multiple="true"
      :range="range"
      :selectParent="true"
      :foldAll="true"
      rangeKey="name"
      idKey="id"
      @selectXiangguanDep="selectXiangguanDep"
    />
    <multiple-select
      v-model="show"
      :data="aboutDept"
      :default-selected="defaultSelected"
      @confirm="confirm"
    ></multiple-select>
    <choose-time @getEndTime="getEndTime()" ref="chooseTime"></choose-time>
    <view class="‘btn-view‘">
      <div class="btn" @click="addyixiang()">添加</div>
    </view>
  </div>
</template>
  
  <script>
import tkiTree from "../../subPackages/components/tkitree/tkitree.vue";
import selectDengjiyuan from "../../subPackages/components/select_dengjiyuan/tkitree.vue";
import selectDengjiren from "../../subPackages/components/select_dengjiren/tkitree.vue";
import selectGenzongdep from "../../subPackages/components/selectGenzongDep/tkitree.vue";
import selectXiangguandep from "../../subPackages/components/selectXiangguanDep/tkitree.vue";
import tools from "../../subPackages/components/tkitree/tools.js";
import vantUploader from "../../../wxcomponents/weapp/dist/uploader";
import chooseTime from "./chooseTime.vue";
import multipleSelect from "../../subPackages/components/momo-multipleSelect/momo-multipleSelect";

import {
  getSelectUserTwo,
  getSelectDeptTwo,
  findRoomInfoListByIds,
  findCompanyList,
  addyixiang,
  findDeptList,
  getDeptById,
  getUserLocalStorageInfo,
  findUserList,
  uploadPDF,
} from "@/js_sdk/http";
import vanPicker from "../../../wxcomponents/weapp/dist/picker";
export default {
  name: "addintention",
  components: {
    tkiTree,
    multipleSelect,
    chooseTime,
    selectDengjiyuan,
    selectDengjiren,
    vantUploader,
    vanPicker,
    selectGenzongdep,
    selectXiangguandep,
  },
  data() {
    return {
      userList: [],
      managerPhone: "",
      show: false,
      needDaysList: [
        { value: 5, text: "5天" },
        { value: 10, text: "10天" },
        { value: 20, text: "20天" },
        { value: 30, text: "30天" },
        { value: 180, text: "180天" },
        { value: 36500, text: "永久" },
      ],
      aboutDept: [],
      defaultSelected: [],
      companyList_index: 0,
      companyList: [],
      range: [],
      fileList: [],
      fangyuanList: [],
      zaitiList: [],
      today: "",
      form: {
        createdBy: "",
        projectType: 1,
        projectStatus: 1,
        successTime: "",
        companyId: null,
        xiangguanren: "",
        xinxidengji: "",
        xiangmudengji: "",
        relevantUserId: "",
        manageMessengerId: "",
        xiangmudengjiIds: "",
        genzongbumen: "",
        manageTrackingDepId: "",
        xiangguanbumen: "",
        relevantDepId: "",
        fangyuanlistIds: "",
        successSaleRoomList: "",
        projectManager: "",
        managerPhone: "",
        projectName: "",
        projectInfo: "",
        leaseRequirements: "",
      },
      currentDate: new Date().getTime(),
      minDate: new Date().getTime(),
      formatter(type, value) {
        if (type === "year") {
          return `${value}年`;
        }
        if (type === "month") {
          return `${value}月`;
        }
        return value;
      },
      value: null,
      rules: {
        // 对name字段进行必填验证
        name: {
          rules: [
            {
              required: true,
              errorMessage: "请输入",
            },
            {
              minLength: 3,
              maxLength: 5,
              errorMessage: "姓名长度在 {minLength} 到 {maxLength} 个字符",
            },
          ],
        },
        // 对email字段进行必填验证
        email: {
          rules: [
            {
              format: "email",
              errorMessage: "请输入正确的邮箱地址",
            },
          ],
        },
      },
      muqianjieduan: [
        { text: "跟进中", value: 1 },
        { text: "已确认", value: 2 },
        { text: "已签约", value: 3 },
        { text: "关闭", value: 4 },
      ],
    };
  },
  onLoad(option) {
    let that = this;

    this.form.createrName = getUserLocalStorageInfo().user.truename;
    that.getDeptById(getUserLocalStorageInfo().user.department);
    that.getCurrentDate();
    console.log(option);
    this.findUserList();
    that.findCompanyList();
    that.form.createdBy = JSON.parse(
      uni.getStorageSync("laocui_user_info")
    ).user.id;
    that.findDeptList();
  },
  onShow() {
    let that = this;

    uni.$on("getuser", function (e) {
      console.log(e);
      findRoomInfoListByIds(e.result.join(",")).then((data) => {
        if (e.type == "房源") {
          //   that.fangyuanList = [];
          data.forEach((a, index) => {
            var dd = new Date();
            const dd2 = new Date(dd.getFullYear(), dd.getMonth(), dd.getDate());
            console.log(new Date(dd2.getTime()));
            const endTime = that.getMyDate(new Date(dd2.getTime()));
            console.log(endTime);
            a.reservationStatus = 2;
            a.needDaysIndex = "0";
            a.needDays = 5;
            a.endTime = endTime;
            that.fangyuanList.push({
              ...a,
              reservationStatus: 2,
            });

            that.getNeedDays({ detail: { value: 0 } }, index);
          });
          that.fangyuanList = [...that.fangyuanList];
          console.log(data);
          that.form.fangyuanlist = that.fangyuanList;
          for (let i = 0; i < that.form.fangyuanlist.length; i++) {
            for (let j = i + 1; j < that.form.fangyuanlist.length; j++) {
              if (
                that.form.fangyuanlist[i].id == that.form.fangyuanlist[j].id
              ) {
                if (!that.form.fangyuanlist[i].endTime) {
                  that.form.fangyuanlist.splice(i, 1);
                } else if (!that.form.fangyuanlist[j].endTime) {
                  that.form.fangyuanlist.splice(j, 1);
                } else {
                  that.form.fangyuanlist.splice(j, 1);
                }
              }
            }
          }
          that.form.fangyuanlistIds = "";
          that.form.fangyuanlistIds = e.result.join(",");
        }
        if (e.type == "载体") {
          let all = [...that.zaitiList, ...data];
          //   for (let i = 0; i < all.length; i++) {
          //     for (let j = 1; j < all.length; j++) {
          //       if (all[i] == all[j]) {
          //         all.splice(i, 1);
          //       }
          //     }
          //   }
          for (let i = 0; i < all.sort().length; i++) {
            for (let j = i + 1; j < all.sort().length; j++) {
              if (all[i].id == all[j].id) {
                all.splice(i, 1);
                j--;
              }
            }
          }
          that.zaitiList = all;
          //   that.form.successSaleRoomList = "";
          //   that.form.successSaleRoomList = e.result.join(",");
        }
      });
    });
  },
  methods: {
    uploadAddressExcelSplice(index) {
      this.fileList.splice(index, 1);
    },
    async choosePDf() {
      let that = this;
      uploadPDF().then((data) => {
        that.fileList.push({
          imgUrl: "/FileController/download/" + data.url,
          imageUrl: "/FileController/download/" + data.url,
          id: data.url,
          url: that.$constant.BASE_URI + "/FileController/download/" + data.url,
          isImage: true,
          name: data.name,
        });
        console.log(that.fileList);
        this.$forceUpdate();
      });
    },
    async findUserList() {
      let data = await findUserList();
      this.userList = data;
      console.log(data);
    },
    getInputValue(key, e) {
      console.log(e);
      this.form[key] = e.detail.value;
    },
    getNum(e) {
      console.log(e);
      this.form.managerPhone = e.detail.value;
      console.log(this.form.managerPhone);
    },
    getUser(e) {
      this.form.createdBy = this.userList[e.detail.value].id;
      this.form.createrName = this.userList[e.detail.value].truename;
      this.getDeptById(this.userList[e.detail.value].department);
    },
    async getDeptById(e) {
      let data = await getDeptById({
        id: e,
      });
      console.log(data);
      this.form.deptName = "";
      this.form.deptName = data.deptName;
      this.form = { ...this.form };
    },
    getNeedDays(event, index) {
      this.fangyuanList[index].needDays =
        this.needDaysList[event.detail.value].value;
      this.fangyuanList[index].needDaysIndex = event.detail.value;
      var dd = new Date();
      const dd2 = new Date(dd.getFullYear(), dd.getMonth(), dd.getDate());
      dd2.setDate(dd2.getDate() + Number(this.fangyuanList[index].needDays));
      const endTime = this.getMyDate(new Date(dd2.getTime()));
      console.log(endTime);
      this.fangyuanList[index].endTime = endTime;
      console.log("this.fangyuanList[index].endTime", this.fangyuanList, index);
      this.$forceUpdate();
    },

    getMyDate(str) {
      var oDate = str;
      let oYear = oDate.getFullYear();
      let oMonth = oDate.getMonth() + 1;
      let oDay = oDate.getDate();
      let oHour = oDate.getHours();
      let oMin = oDate.getMinutes();
      let oSen = oDate.getSeconds();
      let oTime = oYear + "-" + this.addZero(oMonth) + "-" + this.addZero(oDay);
      return oTime;
    },

    //补零操作
    addZero(num) {
      if (parseInt(num) < 10) {
        num = "0" + num;
      }
      return num;
    },
    timestampToYMD(timestamp) {
      const date = new Date(timestamp * 1000);
      const year = date.getFullYear();
      const month = String(date.getMonth() + 1).padStart(2, "0");
      const day = String(date.getDate()).padStart(2, "0");
      return `${year}-${month}-${day}`;
    },
    getCurrentDate() {
      const nowDate = new Date();
      const date = {
        year: nowDate.getFullYear(),
        month: nowDate.getMonth() + 1,
        date: nowDate.getDate(),
      };
      console.log(date.month);
      console.log(date.date);
      this.today =
        date.year +
        "-" +
        (date.month < 10 ? 0 : "") +
        date.month +
        "-" +
        (date.date < 10 ? 0 : "") +
        date.date;
      console.log(this.today);
    },
    async findDeptList() {
      let aboutDept = await findDeptList();
      this.aboutDept = aboutDept.map((e) => {
        return {
          label: e.deptName,
          value: e.id,
        };
      });
    },
    confirm(e) {
      var xiangguanbumen = [];
      var relevantDepId = [];
      for (var p in e) {
        xiangguanbumen.push(e[p].label);
        relevantDepId.push(e[p].value);
      }
      this.form.xiangguanbumen = xiangguanbumen.join(",");
      this.form.relevantDepId = relevantDepId.join(",");
    },
    chosseAboutCompany() {
      this.show = true;
    },
    signing(i) {
      let that = this;
      if (that.zaitiList.length > 0) {
        let isReport = false;
        for (let index = 0; index < that.zaitiList.length; index++) {
          if (that.zaitiList[index].id === that.fangyuanList[i].id) {
            that.$showToast("该载体已存在与签约载体列表内");
            isReport = true;
            return;
          }
        }
        if (!isReport) {
          that.zaitiList.push(this.fangyuanList[i]);
        }
      } else {
        that.zaitiList.push(this.fangyuanList[i]);
      }
    },
    getEndTime(i, time, type) {
      this.fangyuanList[i].endTime = "";
      this.fangyuanList[i].reservationStatus = "";
      this.fangyuanList[i].reservationStatus = type;
      this.fangyuanList[i].endTime = time;
      this.$forceUpdate();
    },
    yuyueChooseTime(i, type) {
      this.$refs.chooseTime.onOpen(i, type);
    },
    fangyuanListSplice(i) {
      if (this.fangyuanList[i].reservationStatus == 7) {
        this.$showToast("该房源已解锁");
      } else {
        this.fangyuanList[i].reservationStatus = 7;
        this.$forceUpdate();
      }
    },
    getjieduan(e) {},
    deleteFileList(event) {
      this.fileList.splice(event.detail.index, 1);
    },
    async addyixiang() {
      let that = this;
      let saleRoomList;

      if (that.form.fangyuanlist && that.form.fangyuanlist.length > 0) {
        saleRoomList = that.form.fangyuanlist.map((e) => {
          return {
            remark: !e.roomString ? null : e.roomString,
            reservationStatus: !e.reservationStatus ? 1 : e.reservationStatus,
            parkRoomId: e.id,
            needDays: e.needDays ? e.needDays : 0,
            endTime: !e.endTime ? null : e.endTime,
            successStatus: null,
          };
        });
        // console.log("fangyuanlist", that.form.fangyuanlist);
        // console.log("saleRoomList", saleRoomList);
        // return;
      } else {
        saleRoomList = [];
      }
      let successSaleRoomList;
      if (that.zaitiList && that.zaitiList.length > 0) {
        successSaleRoomList = that.zaitiList.map((e) => {
          return {
            remark: !e.roomString ? "" : e.roomString,
            reservationStatus: !e.reservationStatus ? 1 : e.reservationStatus,
            parkRoomId: e.id,
            endTime: !e.endTime ? null : e.endTime,
            successStatus: null,
          };
        });
      } else {
        successSaleRoomList = [];
      }
      let successPictureAddress = [];
      if (that.fileList.length > 0) {
        successPictureAddress = that.fileList.map((e) => {
          return {
            name: e.name,
            size: e.size,
            url: e.url,
          };
        });
      }
      let data = await addyixiang({
        ...that.form,
        saleRoomList: JSON.stringify(saleRoomList),
        successPictureAddress: JSON.stringify(successPictureAddress),
        successSaleRoomList: JSON.stringify(successSaleRoomList),
        successRoom: this.zaitiList
          .map((e) => {
            return e.roomString;
          })
          .join(","),
      });
      console.log(JSON.stringify(successPictureAddress));
      console.log(data);
      if (data.code == 200) {
        that.$showToast("添加成功");
        uni.navigateBack({});
      } else {
        that.$showToast(data.msg);
      }
    },
    getQymc(index) {
      let that = this;
      that.form.companyId = that.companyList[index].id;
      return that.companyList[index].qymc;
    },
    bindPickerChange(e) {
      let that = this;
      that.companyList_index = e.detail.value;
    },
    async findCompanyList() {
      let data = await findCompanyList();
      this.companyList = data;
      this.companyList[0].id;
    },
    zaitiListSplice(index) {
      this.zaitiList.splice(index, 1);
    },
    // /wx/SaleController/findRoomInfoListByIds
    async findRoomInfoListByIds() {
      let data = await findRoomInfoListByIds(ids);
      return data;
    },
    xiangmudengji(e) {
      var names = [];
      var ids = [];
      for (var p in e) {
        if (e[p].type == "u") {
          names.push(e[p].name);
          ids.push(e[p].id);
        }
      }
      this.form.xiangmudengji = names.join(",");
      this.form.xiangmudengjiIds = ids.join(",");
    },
    selectGenzongDep(e) {
      var names = [];
      var ids = [];
      for (var p in e) {
        names.push(e[p].name);
        ids.push(e[p].id);
      }
      this.form.genzongbumen = names[names.length - 1];
      this.form.manageTrackingDepId = ids[ids.length - 1];
    },
    selectXiangguanDep(e) {
      var names = [];
      var ids = [];
      for (var p in e) {
        names.push(e[p].name);
        ids.push(e[p].id);
      }
      this.form.xiangguanbumen = names.join(",");
      this.form.relevantDepId = ids.join(",");
    },
    selectDengjiyuan(e) {
      var names = [];
      var ids = [];

      for (var p in e) {
        if (e[p].type == "u") {
          names.push(e[p].name);
          ids.push(e[p].id);
        }
      }
      this.form.xinxidengji = names.join(",");
      this.form.manageMessengerId = ids.join(",");
    },
    userSelectorConfirm(e) {
      var names = [];
      var ids = [];
      for (var p in e) {
        if (e[p].type == "u") {
          names.push(e[p].name);
          ids.push(e[p].id);
        }
      }
      this.form.xiangguanren = names.join(",");
      this.form.relevantUserId = ids.join(",");
    },
    // 取消回调事件
    treeCancel(e) {},

    async getSelectUserTwo(key) {
      let that = this;
      let departmentList = await getSelectUserTwo("");
      that.range = tools.transData(
        departmentList.data,
        "id",
        "parentid",
        "children"
      );
      that.$refs[key]._show();
    },
    async getSelectDeptTwo(key) {
      let that = this;
      let departmentList = await getSelectDeptTwo("");
      that.range = tools.transData(
        departmentList.data,
        "id",
        "parentid",
        "children"
      );
      that.$refs[key]._show();
    },
    jumpChosseHouse(e) {
      uni.navigateTo({
        url: "/pages/subPackages/chosseHouse/chosseHouse?type=" + e,
      });
    },
    afterRead(event) {
      let that = this;
      const { file } = event.detail;
      uni.uploadFile({
        url: that.$constant.BASE_URI + "/wx/fileController/upload2",
        filePath: file.url,
        name: "file",
        formData: { user: "test" },
        success(res) {
          // 上传完成需要更新 fileList
          let data = JSON.parse(res.data);
          that.fileList.push({
            name: JSON.parse(data.data[0]).name,
            size: JSON.parse(data.data[0]).size,
            imgUrl: "/FileController/download/" + data.data[1],
            url:
              that.$constant.BASE_URI +
              "/FileController/download/" +
              data.data[1],
            isImage: true,
          });
        },
        fail(res) {},
      });
    },
    beforeRead(event) {
      const { file, callback } = event.detail;

      callback(file.type === "image");
    },
    binddata() {},
    submit() {},
  },
};
</script>
  
  <style lang="scss">
.pdfname {
  color: #777777;
  font-size: 28rpx;
  width: 75%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 16rpx;
  float: left;
}
.pdflist-row {
  margin: 15rpx 0 15rpx 0;
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.pdflist {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}
.form_row {
  height: 40rpx;
  font-weight: 400;
  font-size: 24rpx;
}
.userbox {
  font-size: 28rpx;
  height: 61rpx;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding-left: 10px;
  line-height: 61rpx;
}
.addintention {
  .btn-view {
    width: 100%;
    height: 100rpx;
    padding: 20rpx 10%;
    background-color: #ffffff;
    position: fixed;
    bottom: 0;
    z-index: 9999;
    left: 0;
  }
  .btn {
    border-radius: 8rpx 8rpx 8rpx 8rpx;
    width: 80%;
    height: 90rpx;
    background: #1d18bc;
    line-height: 90rpx;
    text-align: center;
    color: white;
  }
  .uni-forms-item__label {
    text {
      font-size: 28rpx;
      font-weight: 500;
      //color: #333333;
    }
  }

  .zaiti_list {
    width: 100%;
    min-height: 50rpx;
    line-height: 50rpx;
  }

  .zaiti {
    color: #777777;
  }

  .zaiti:first-child {
    margin: 0 !important;
  }

  .bottom_cell {
    float: right;
    height: 42rpx;
  }

  .button_row {
    color: #1d18bc;
    width: 96rpx;
    height: 42rpx;
    border-radius: 60rpx 60rpx 60rpx 60rpx;
    opacity: 1;
    margin-left: 16rpx;
    float: left;
    text-align: center;
    line-height: 42rpx;
    font-size: 24rpx;
    border: 2rpx solid #1d18bc;
  }
  .disable-btn {
    color: #cccccc;
    width: 96rpx;
    height: 42rpx;
    border-radius: 60rpx 60rpx 60rpx 60rpx;
    opacity: 1;
    margin-left: 16rpx;
    float: left;
    text-align: center;
    line-height: 42rpx;
    font-size: 24rpx;
    border: 2rpx solid #cccccc;
  }
  .project-column {
    border-radius: 8rpx 8rpx 0rpx 0rpx;
    //height: 44rpx;
    font-size: 32rpx;
    font-family: PingFang SC-Medium, PingFang SC;
    font-weight: 500;
    color: #333333;
    background: #ffffff;
  }

  .status_label {
    width: 96rpx;
    height: 50rpx;
    line-height: 50rpx;
    background: rgba(29, 24, 188, 0.05);
    color: #1d18bc;
    font-weight: 500;
    font-size: 24rpx;
    border-radius: 8rpx 8rpx 8rpx 8rpx;
  }

  .first_title {
    line-height: 50rpx;

    font-weight: 500;
  }

  .uni-forms-item {
    display: block !important;
    margin: 0;
  }

  .addyixiang {
    color: #3f3fb4;
    background: #eaeaf2;
    width: 170rpx;
    height: 50rpx;
    text-align: center;
    line-height: 50rpx;
    border: 2rpx #a6a6a9 dashed;
  }

  .list-row {
    width: calc(100% - 64rpx);
    padding: 16rpx 32rpx 18rpx 32rpx;
    background: #ffffff;
    margin-bottom: 16rpx;
    display: flex;
    //height: 278rpx;
    border-radius: 8rpx 8rpx 8rpx 8rpx;
  }

  .icon_phone {
  }

  .list-row {
    width: calc(100% - 64rpx);
    padding: 32rpx 32rpx 38rpx 32rpx;
    background: #ffffff;
    margin-bottom: 16rpx;
    display: flex;
    //height: 278rpx;
    border-radius: 8rpx 8rpx 8rpx 8rpx;
  }

  .mb32rpx {
    margin-bottom: 32rpx;
  }

  .second_title {
    float: left;
    font-size: 28rpx;
    font-family: PingFang SC-Medium, PingFang SC;
    font-weight: 500;
    color: #777777;
    width: 100%;
  }

  .call_icon {
    height: 40rpx;
    width: 40rpx;
    margin-top: -5rpx;
    margin-left: 5rpx;
    float: left;
  }

  .second_title_2 {
    float: left;
    width: 38%;
    font-size: 28rpx;
    font-family: PingFang SC-Medium, PingFang SC;
    font-weight: 500;
    text-align: right;
    color: #777777;
  }

  .list {
    width: calc(100% - 64rpx);

    margin: 32rpx;
  }

  .form {
    width: calc(100% - 128rpx);
    margin: 32rpx;
    background: #ffffff;
    padding: 32rpx;

    .label {
      height: 53rpx;
      line-height: 53rpx;
    }
  }

  .checklist-box {
    margin: 0 !important;
    margin-right: 16rpx !important;
  }

  .labelcolmt26 {
    .van-cell {
      padding: 0 0 0 28rpx !important;
    }

    .van-col {
      margin-top: 26rpx !important;
    }

    label {
      color: #333333;
      font-size: 30rpx;
      margin-top: 10rpx !important;
    }

    .uni-data-checklist {
      margin-top: -10rpx !important;
    }
  }

  .status {
    .uni-data-checklist {
      margin-top: 0rpx !important;
    }

    label {
      color: #333333;
      font-size: 30rpx;
      padding-right: 0rpx !important;
    }
  }
}
</style>
  
  