createPotential.wxml 6.15 KB
<!--packageCustomer/pages/createPotential/createPotential.wxml-->
<glsx-privacy appletName="销售助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar showBack="{{true}}" bind:navbarReady="onNavbarReady">{{pageType == 'edit' ? '信息完善' : '新增潜客'}}</navigation-bar>
<view class="potential-create" style="padding-top: {{navHeight}}px;">
  <view class="card">
    <view class="section-title">基础信息</view>
    <block wx:for="{{baseForm}}" wx:key="index">
      <view class="row">
        <view class="label">{{item.label}} <text class="star">*</text></view>
        <view class="value" bindtap="showPopup" data-target="{{item}}">
          <block wx:if="{{item.type == 'textarea'}}">
            <textarea value="{{infoData[item.key]}}" class="textarea {{item.disabled ? 'disabled': ''}}" placeholder="请输入" placeholder-class="placeholder-class" auto-height="true" maxlength="{{item.maxLength}}" disabled="{{item.disabled || showSelectPopup || textareaDisabled}}" cursor-spacing="16" bindinput="onInput" data-key="{{item.key}}"/>
          </block>
          <block wx:else>
            <block wx:if="{{infoData[item.key]}}">
              <text class="value-text {{item.disabled ? 'disabled' : ''}}" style="word-break: break-all;">{{infoData[item.key]}}</text>
            </block>
            <block wx:else>
              <text class="placeholder">点击选择</text>
            </block>
            <image src="{{IMG_URL}}customer/arrow.png" mode=""/>
          </block>
        </view>
      </view>
    </block>
    <view class="section-title">地址信息</view>
    <block wx:for="{{addressForm}}" wx:key="index">
      <view class="row">
        <view class="label">{{item.label}} <text class="star">*</text></view>
        <view class="value" bindtap="showArea" data-type="{{item.type}}">
          <block wx:if="{{item.type == 'textarea'}}">
            <textarea value="{{infoData[item.key]}}" class="textarea" placeholder="请输入" placeholder-class="placeholder-class" auto-height="true" maxlength="{{item.maxLength}}" disabled="{{showSelectPopup || textareaDisabled}}" cursor-spacing="16" bindinput="onInput" data-key="{{item.key}}"/>
          </block>
          <block wx:else>
            <block wx:if="{{infoData[item.key]}}">
              <text>{{infoData[item.key]}}</text>
            </block>
            <block wx:else>
              <text class="placeholder">点击选择</text>
            </block>
            <image src="{{IMG_URL}}customer/arrow.png" mode=""/>
          </block>
        </view>
      </view>
    </block>
    <view class="section-title">附加信息</view>
    <view class="row no-border">
      <view class="label">店面门头照片</view>
    </view>
    <view class="uploader-wrap">
      <view class="content_box">
        <view class="image_content" wx:for="{{infoData.attachmentList}}" wx:key="index">
          <image bindtap="previewImage" class="image_box" data-url="{{infoData.attachmentList}}" data-index="{{index}}" src="{{item}}"/>
          <image class="del_icon" src="{{IMG_URL}}customer/del-icon.png" mode="" bindtap="deleteFile" data-index="{{index}}" />
        </view>
        <view class="upload_content" bindtap="uploadImages" wx:if="{{!infoData.attachmentList.length}}">
          <image src="{{IMG_URL}}customer/add-icon.png"></image>
        </view>
      </view>
    </view>
    <view class="row no-border">
      <view class="label">备注信息</view>
    </view>
    <view class="textarea-wrap">
      <textarea class="textarea" maxlength="200" disabled="{{showSelectPopup || textareaDisabled}}" auto-height placeholder="请输入" placeholder-class="input-ph" value="{{infoData.remark}}" bindinput="onRemarkInput" />
      <view class="counter">{{remarkLength}}/200</view>
    </view>
  </view>
  <view class="card">
    <view class="manange-box">
      <block wx:for="{{managerRoles}}" wx:key="index">
        <view class="item">
          <view class="check-box" bindtap="changeManage" data-target="{{item}}" data-index="{{index}}">
            <image wx:if="{{!item.checked}}" src="{{IMG_URL}}customer/check.png" mode=""/>
            <image wx:else src="{{IMG_URL}}customer/check-active.png" mode=""/>
            <view class="label">{{item.label}}</view>
          </view>
          <block wx:if="{{item.checked}}">
            <view class="row">
              <view class="label">名称</view>
              <view class="value">
                <input value="{{item.personnelName}}" class="input" bindinput="manangeInput" data-index="{{index}}" data-type="personnelName" placeholder="请输入" placeholder-class="placeholder-class" maxlength="{{10}}"  />
              </view>
            </view>
            <view class="row">
              <view class="label">手机号</view>
              <view class="value">
                <input value="{{item.personnelPhone}}" class="input" bindinput="manangeInput" data-index="{{index}}" data-type="personnelPhone" type="number" placeholder="请输入" placeholder-class="placeholder-class" maxlength="{{11}}"  />
              </view>
            </view>
          </block>
        </view>
      </block>
    </view>
  </view>
  <view class="isFullSucreen btn">
    <view class="cancel" bindtap="handleCancel">取消</view>
    <view class="confirm" bindtap="handleConfirm">提交</view>
  </view>
</view>
<popup show="{{carBrandPopupShow}}" title="选择品牌" bind:hidePopup="hideBrandPopup" customPopupSlotStyle="{{'height: calc(100% - 282rpx)'}}" bindconfirm="brandConfirm" height="90%">
  <car-brand id="car-brand" popupShow="{{carBrandPopupShow}}" multiple selectedList="{{selectedMainBrand}}"></car-brand>
</popup>
<select-popup show="{{showSelectPopup}}" options="{{selectOptions}}" multiple="{{selectMultiple}}" values="{{selectValues}}" value="{{selectValue}}" bindconfirm="handlePopupConfirm" bindcancel="hideSelectPopup" title="{{selectTitle}}"></select-popup>
<select-area show="{{showSelectArea}}" areaList="{{areaList}}" bindconfirm="areaConfirm" bindcancel="areaCancel" value="{{infoData.districtId || infoData.cityId || ''}}"></select-area>
<!-- 结果弹窗组件:统一反馈弹窗 -->
<result-dialog id="resultDialog" bind:ok="onDialogOk" bind:close="onDialogClose" />